ISSUEWhen accessing Setup Database in Central Administration, after a migration has been performed, the following error might occur:
Object reference is not set to an instance of an object.
RESOLUTIONFirst verify that the connection string shows the correct server and database name, using SharePoint 2013 Management Shell:
$farm = Get-SPFarm; $farm.properties["NWConfigurationDataBaseName"];
- If the server and database names are correct skip the next step.
$farm = Get-SPFarm; $farm.properties["NWConfigurationDataBaseName"]; $farm.properties["NWConfigurationDataBaseName"] = ??; $farm.Update();Try the Database Setup page again.
If the error still appears:
- Open SQL Manager and navigate to the Nintex Configuration database
- Go to: Tables > dbo.Databases > Right click "Select Top 1000 Rows"
- Run the stored procedure (Programmability > Stored Procedures) "dbo._PrepareForNewEnvironment", this will purge all of the old data from the Databases and Storage tables.
- In Central Administration > Nintex Workflow Management > Database Setup, add the new Config and Content databases, please ensure that the "connect to an existing database" check box is selected.