DBCC Clone Database error

  • when I try to issue DBCC clone database on one of my database it throws an error-

    Msg 2601, Level 14, State 1, Line 1

    Cannot insert duplicate key row in object 'sys.sysschobjs' with unique index 'clst'. The duplicate key value is…

    I tried finding the object in user db and it turned out to be type "TT". I was able to delete that row from user and model db.

    Again same error was thrown but with new object id. This id was type "IT" and I dont want to mess with it.

    The command works perfect on another server having same sql version.

    What other can be root cause ? How can i rectify.

     

    SQL Server 2017 RTM CU18 version

  • Just a shot in the dark, but is there already a database with the same name as the clone you're attempting to create?

    John

  • Or is the database corrupt? Have you run DBCC on it recently?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • The database is not corrupt and is accessible  normally.

    no there isn’t any existing db with the same name.

    i had deleted tables which were user n type TT but don’t want to mess with IT type with sys schema.

    strangely it works on another server which hosts diff set of dB.

    I have copied over model dB backup and restored but still same error

  • Does it work on other databases on the same server? If so, the problem is strictly with this database.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Same error on all the databases on same server

  • OK. That's odd. I'm not sure.

    Do you have customizations in the model database? It's possible that if you have stuff there, it gets created when you create the new database, then, when attempting to clone the user database, you get the duplication and the error.

     

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply