We have to do database replication with SQL Server; the two database are on different servers.
We achieve replication, but our scenario is when live is down so we use replicated server as our production server.
Here is where the problem occurred: when we insert anything on replicated server from application it fails because of violation of a primary key constraint.
And yes, it violates b/c on replicated server primary key starts from 1
How to overcome this problem? Or it is correct way to convert replicated server to production server?
Best Answer
In case of aligning identity columns, run this on the source:
The code to run on the replica is in a column