SQL 6.5 or 7.0 Identity Problem

SQL 6.5 or 7.0 Identity Problem

I want to use replication between two SQL servers in which I used Identity properties in some tables. How can I preserve data integrity and maintain my application functionality on both servers, knowing that data syncronization must be done with dual direction?

If I understand you correctly, you have the same table in two databases. The table is updated in both databases. You’d like to replicate from one to another so that each database has a copy of the other database’s rows. Yet you have an identity field defined in the table. You want to avoid having a collision on the identity field when the application updates the table.

One possible and easy method might be to define the starting point of the identity column differently on each server. On one server you can set the initial value to 0 while on the other start off at ten million or some other large enough number.


Share the Post: