Issue
When attempting to detach a Nintex content database using the NWAdmin.exe -o DetachDatabase command, more than one matching database is found.
Error Code
More than one matching content databases were found. Please specify database name using -databaseName parameter.
Resolution
- Open SQL Management Studio on the database server.
- Perform a select query on the 'dbo.Databases' table in the Nintex configuration database.
- Compare the database name entries in the table to identify the duplicate entries.
- The database name with the highest Database ID is most likely the duplicate database.
- Perform a SELECT query on the 'dbo.Storage' table. Make sure the Database ID identified as the duplicate entry is not being used by a Site Collection.
- Once the Database Id has been identified, perform the below command.
DELETE FROM database WHERE DatabaseID = <Insert DatabaseID here>
Once the entry is removed from the table, disconnect and remove the database from SQL Management Studio.
Related Links
NWAdmin Guide: DetachDatabase
https://help.nintex.com/en-US/nintex2016/sp2016/NWAdmin/DetachDatabase.htm