cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
ashishnathaniel
Nintex Newbie

Getting Error while Splitting Existing Nintex Content Database

I am getting a error while running the command to split the Nintex Content Database. I am logged in with the Farm Account.

Before I ran the command:

  1. Stopped the Timer Service
  2. Stopped the web application hosting the site collection

Here is the command that I am running

NWAdmin.exe -o MoveData -Url "https://x.xyz.com/sites/x"  -SourceDatabase NW2013DB -TargetDatabase Content_X_NW2013DB

Here is the error I get:

Unhandled Exception: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0.

   at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue)

   at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)

   at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)

   at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)

   at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)

   at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)

   at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)

   at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)

   at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)

   at Nintex.Workflow.NWAdmin.MoveData.TestSqlConnection(String connectionString)

   at Nintex.Workflow.NWAdmin.MoveData.ValidateParameters()

   at Nintex.Workflow.NWAdmin.Program.Main(String[] args)

Any help would be great.

0 Kudos
Reply
2 Replies
Automation Master
Automation Master

Re: Getting Error while Splitting Existing Nintex Content Database

Hi Ashish,

the "SourceDatabase" and "TargetDatabase" parameters expect a connection string as input not only the name of the DB. I think that might be the problem.

For more detailed information on NWAdmin.exe, please have a look at the documentation: NWAdmin Operations - Nintex Workflow 2013

Cheers

Philipp

Reply
jbradley1
Nintex Newbie

Re: Getting Error while Splitting Existing Nintex Content Database

Here's the command I used to move workflows to a new database.

.\NWAdmin.exe -o MoveData -Url 'https://webapplication.domain.com/[site collection]' -SourceDatabase 'Server=[SQL Server Name];Database=[Database Name];Trusted_Connection=True;' -TargetDatabase 'Server=[SQL Server Name];Database=[Database Name];Trusted_Connection=True;' -RetainSourceData

I keep the source data in case something goes wrong and I need to fail back to the other database.

Here is the full script I run to move content.

##### Step 1 - Change the directory to the NWAdmin install directory ####

## NWAdmin Directory C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\BIN

cd 'C:\Program Files\Common Files\microsoft shared\Web Server Extensions\16\BIN\'

#### Step 2 - Run this command to list all the Nintex databases and make sure verions match ####

# Check Nintex Database Version

.\NWAdmin.exe -o CheckDatabaseVersion

#### Step 3 - Stop the timer jobs in SharePoint that could cause the workflows to run ####

## Stop Timer Jobs in Central Admin

# It is recommended the workflow job in Central Admin is stopped in the target environment when a site

# collection migration with workflow is performed. If a workflow wakes up from a delay before the data has been

# imported, that workflow will fail. Stopping the workflow timer job will prevent workflows from executing.

Get-SPTimerJob -Identity 'job-workflow' | Disable-SPTimerJob

Get-SPTimerJob -Identity 'Nintex Workflow Scheduler' | Disable-SPTimerJob

#### Step 4 - Move all the data from the old database to the new database ####

# MoveData - This operation is used to move all workflow progress data for a site collection to a selected

# workflow content database.

$SourceDatabase = 'Server=[SQL Server Name];Database=[Database Name];Trusted_Connection=True;'

$TargetDatabase = 'Server=[SQL Server Name];Database=[Database Name];Trusted_Connection=True;'

$SiteCollection = 'https://[Web Application]/[site collection]'

.\NWAdmin.exe -o MoveData -Url $SiteCollection -SourceDatabase $SourceDatabase -TargetDatabase $TargetDatabase -RetainSourceData

#### Step 5 - Confirm that the old content database is no longer in use ####

# check if a content database is still in use after a MoveData command has been used to remove data from it.

#-Test simulates running the command without deleting any redirects

.\NWAdmin.exe -o CleanTaskRedirects #-test

#### Step 6 - Start the workflow timer jobs ####

#Start the SharePoint Timer Jobs back up by enabling them

Get-SPTimerJob -Identity 'job-workflow' | Enable-SPTimerJob

Get-SPTimerJob -Identity 'Nintex Workflow Scheduler' | Enable-SPTimerJob

#### Step 7 - Remove the old database from SharePoint ####

# Detach the empty database

.\NWAdmin.exe -o DetachDatabase -serverName '[servername]' -databaseName '[Nintex Database Name]'

 

Hope this helps.

Reply