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

Replicating identity column issue.

$
0
0

hi Replication experts 

After completing SNAPSHOT Replication from sql server 2012 to sql server 2005 , i'm getting an Primary key voilation Error though after reseeding the value to the max (column) value using DBCC checkident('TableName',Reseed,Max(ColumnValue)),
sql server loosing the identity current value for the tables all of a sudden and inserting the previous value which is already existing. for this causing primary key voilation.
For Example SalesID is 100 and Ident_current is 100 for the inital, after some moment Ident_current value will jump to 55 which causes the error for Primary key voilation 

Identity property is set : 

IdentitySeed IncrementNot For Replication
  RID1 10

i'm not restarting my sql server frequently.

why sql server loosing the identity Ident_current value for the tables?
is there any issue to fix this problem ??  
Now database restored in Sql server 2008 RTM Enterprise Edition & running in windows server 2008, but issue is same .
please give me solution or troubleshooting methods if found or faced any similar issues. 
is there any setting/configuration at database level to get rid of this issue.


Myself Troubleshooted steps:
Rebuilded Indexes using DBCC DBREINDEX()
Updated statistics using sp_updatestats
setted compatibility level to (100) and restarted, so that sql server will do recovery while startup for SS 2005 DataBase.  


Thanks in advance.


Pavicoolman


Viewing all articles
Browse latest Browse all 4054

Trending Articles



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