locked
Identity attribute is missing in all the tables after back and restore f the database SQL server2016 RRS feed

  • Question

  • Hi All,

    I tried to backup and restore a database from one SQL server to another. Sql server version is 2016. Almost all my tables has Identity enabled in the primary keys which was not there after restore.  The column values are there but Identity attribute alone missed. I am not able to see if this is a known issue anywhere except in of the SQL express link 

    which  suggests to enable keep replication 

    But when I tried to reproduce the issue from my local server SQL server 2017, I am able to see Identity in my tables even though  I have not selected Keep Replication while trying to backup. 

    Any help would be greatly appreciated as We really dont want to see this problem while moving to production

    Monday, February 3, 2020 6:41 PM

All replies

  • What command exactly did you run?

    An actual backup and restore cannot change the database in any way.  It sounds like you scripted the database and ran a script.

    Monday, February 3, 2020 7:05 PM