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

Identity insert without reseed of identity column

$
0
0
I have a Peer-to-Peer replication which is not performing optimally because of BLOB data , so I have come up with customized replication wherein each server has a partitioned Identity insert range eg ( 1st server indentity range from 1 - 300 million ) and my second server the identity range starts from 300 million + . I am sure that the inserts will not cross over the range in each server.

I am using custom stored procedures to replicate data. When replicating data from the second server to the first , I do not want to reseed the identity column because of the insert . Microsoft replication is able to do so with the "NOT FOR REPLICATION" and bypass the reseed of the identity columns. How do I implement similar functionality for my custom stored procs. I tried to profile capture the sp's called but did not find anything.

It is not possible for me store and then reseed the identity on the column after every insert because the system is heavily concurrently used and may result in a primary key violation if the reseeding is not proper. 

How is Microsoft able to bypass the reseeding with the "NOT FOR REPLICATION". I was not able to find any documentation online. Please help.

Viewing all articles
Browse latest Browse all 4054

Trending Articles



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