setting identity not for replication property help needed

  • I am sure that this is a common problem but I can't find an aswer anywhere so here goes.

    I am going to do replication by restoring a backup of my production database on the replication server.

    When I do this there are about 50 tables that have an identity column set in the production database.  In order to avoid the "identity insert" error with these tables on the replication server I need to change the identity columns to "identity not for replication" so the replicated transactions can be updated in the replication database.

    So, what is the santax to change the idx field in table.info from identity to identity not for replication?

    alter table info ?????

    I have looked at the script that is generated with a change of a diagram doing this change but the script creates another database and copies the data.  This is not a practical solution for me because of the size of some of the tables, it would be quicker to just create the snapshot normally.

    Thanks,

    John Campbell

     

     

     

  • This was removed by the editor as SPAM

  • I do not think that you can make this change to an existing column.   You will need to re-create the table with NOT FOR REPLICATION set.

Viewing 3 posts - 1 through 2 (of 2 total)

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