SQL Server - DBCC Clonedatabase Error - MSG 2601
SQL Server - DBCC Clonedatabase Error - MSG 2601
Here is another error received by me while running DBCC CLONEDATABASE. The message
looks very similar but different system table.
SQL SERVER - DBCC CLONEDATABASE Error - Msg 2601: Cannot Insert Duplicate Key Row
in Object 'sys.sysowners' With Unique Index 'nc1'. cloneing-800x291
Solarwinds
Database cloning for �SQLAUTH� has started with target as �SQLAUTH_CLONE�.
Msg 2601, Level 14, State 1, Line 1
Cannot insert duplicate key row in object �sys.sysowners� with unique index �nc1�.
The duplicate key value is (Domain\DBReader).
DBCC CLONEDATABASE doesn�t support the creation of a clone if there are any user
objects (tables, indexes, schemas, roles, and so on) that were created in the model
database. If user objects are present in the model database, the database clone
fails with the following error message:
That makes perfect sense. As per documentation, I need to drop the object from the
model database. As per error message which I received, it was due to a user in the
model database. Once I dropped user, it went fine.