Accidental DBA here. I am managing a merge replication and the Identity Management fields are not updating with new ranges and are constantly needing me to reseed or run sp_adjustpublisheridentityrange. I have noticed the following oddities:
- When running DBCC CHECKIDENT([tablename]) the current identity value is a lot smaller than the current column value
- When running DBCC CHECKIDENT([tablename]), sometimes the current identity value is set to under 100 when the Current Identity Value is 500,000 plus. But it will do it more than once with the same number.
- The MSarticles in the distribution database is empty as well as the MSrepl_identity_range (I kind of thought that this should have the ranges in it, no?)
- Sometimes it's the code throwing the error that the identity range is incorrect and a simple refresh fixes it.
- The sync is run every 4 hours (which seems a bit long to me as I was used to running the sync more often at last job)
I was thinking I could run sp_adjustpublisheridentityrange in a job in the agent every hour in between syncs to fix this, but it seems to easy.
Any ideas? Thanks in advance.
Also, if anyone knows a really great book on replication, troubleshooting replication, and fixing replication that would be helpful.