Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Replication (2005)
 Replication Disaster Recovery-Next Identity Seeds

Author  Topic 

charlesemerson
Starting Member

1 Post

Posted - 2008-01-22 : 15:02:13
We have implemented replication on SQL Server 2005 with 1 publisher and 1 snapshot (non-update) subscriber.

The purpose is for emergency disaster fail-over.

If the publisher (Primary) fails, then we switch the DNS so the subscriber (Secondary) becomes ‘live’ and we need it to be able to accept new records.

The problem is that the identity seeds start at 0 on the Secondary server - so no records can be input, as there are primary key violations.

We can set the increment value to -1 for all the seeds, and this works.

However there are config & replication issues with bringing up the database on the failed (Primary) server once it is restored and back online.

Does it really need to be this complicated?

Where are the ‘next identity seeds’ for all the tables in the database stored? Can they be restored on the database when fail-over occurs?

Or is there some setting in the Microsoft SQL Dba?

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-01-22 : 15:34:39
Why are you going for Replication for high availability? You can go for Database Mirroring in SQL server 2005. It takes care of automatic failover of databases and applications too.You need to have witness server in place.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-01-22 : 22:46:19
You can reset it in 'dbcc checkident' with reseed option.
Go to Top of Page
   

- Advertisement -