ISSUEDatabase fails to mount in Central Administration or using the NWAdmin.exe and throws "Specified cast is not valid" error.
This is caused by a null or otherwise invalid GUID value present in the dbo.WorkflowInstance table of that specific Nintex Content Database.
- Launch SQL Management Studio and establish a connection to your SharePoint/Nintex SQL Server.Execute the following Query against the problematic Database:
SELECT DISTINCT SiteId, WebApplicationID FROM WorkflowInstance
- You should see a collection of Site Collection ID's and Web Application ID's
- Make note of any rows that contain invalid or NULL values.
- For each row that has an invalid value, there should be another row that contains the correct set of values that would otherwise match.
- You will need to execute the following Query (Adjusted to fit your requirement) to update the invalid row:
UPDATE WorkflowInstance SET WebApplicationID='YourGuidHere' WHERE WebApplicationID IS NULL
- Retry the attach operation.