Issue
After migrating Nintex databases to a new SharePoint environment, attaching or upgrading a Nintex Configuration database fails and the version number is set to 1.0.3.0.
Resolution
- Update the source environment to the latest release of Nintex Workflow. Updating guidance can be found here
- Create a new backup of the Nintex databases.
- Migrate the Nintex databases again.
Error Code
The error you see while updating in the Central Administration:
Unexpected SQL Error occurred while updating the configuration database.
Error in the logs:
Failed to update databases.: System.Data.SqlClient.SqlException (0x80131904): The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.StringFunction' and the index name 'IX_FunctionAliasUnique'. The duplicate key value is (fn-Abs). Changed database context to 'NTX_Config'. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite) at
Additional Information
This is a defect that occurred in Nintex Workflow versions 3.5.2.0, 4.5.2.0, and 5.1.2.0 and was addressed in versions 3.5.2.11, 4.5.2.11, and 5.1.2.11.
If a source environment is on an affected version, the database will present the error when arriving in the destination environment. For example, if Nintex databases are backed up in SharePoint 2013, Nintex Workflow version 3.5.2.0 and restored in any version of SharePoint 2016, the database will be impacted.