Wednesday, January 5, 2011

How to set Identit Seed to all tables that have auto Increment Primarykey and seeds set to 1

In SQL Replication if we disconnect the replication between subscriber DB and publisher DB and then want to make subscriber DB as our primary Database on production server , then we face a common problem regarding the auto increment primary key because its seed set to 1 and that causes a duplicate records problem , here is the script to set seed to the maxim value.

please find the attachment for script. Click here to downlaod

No comments:

Post a Comment