Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Reset auto identity range

$
0
0

Hi

I need to import data from an old replicated database, and keep the identity columns.
The data is to be imported to a new database that is replicated to a set of subscribers.

The identity ranges for each subscriber for each table is different in the old database and the new database.

* Is it possible to set the assigned ranges in the new database to be equal to the ranges in the old database, and reset next available id for each subscriber?
* Is it possible to reset the identiy ranges in the new database for all subscribers to ensure the ranges starts on a higher id then max id in the old database?
   (for example max id + 1000 for subscriber 1, max id + 2000 for subscriber 2 etc)

The identities should still after the change be managed automatically.
(SQL Server 2008 R2)

best regards
Johannes


Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>