|
#1
|
|||
|
|||
|
We are looking into how to do replication on a SQL Server 2000 db, for
disaster recovery. One thing we found was that FK contraints won't replicate well. So we decided to drop the FK constraint, then add it back with a bit of code that says it is not for replication. We got this idea from someone who is using DB2 or Oracle (I can't remember which). Will this work on SQL Server as well? Here's my code (with some table and field names replaced for this post): ALTER TABLE tablename DROP CONSTRAINT FKwhatever ALTER TABLE tablename ADD CONSTRAINT FKwhatever FOREIGN KEY (REGIONID) REFERENCES whatever NOT FOR REPLICATION |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|