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.
Author |
Topic |
indersshekhawat
Starting Member
26 Posts |
Posted - 2011-11-18 : 00:41:19
|
Dear,i am new for sql replication.my scenario is like this. one database is replication to second server and if first server is not available application will switch to second server for this i use replication. publication database on first server and subscribe database on second server after successful replication i saw that all foreign keys in subscribers database are deleted plz how can i solve this |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2011-11-18 : 10:38:19
|
Replication doesn't drop Foreign Keys. Probably, whoever set it up dropped them on the subscriber on purpose. This isn't unusual. Subscriber should be treated as read only, so it's fair to say that FKs aren't needed on the subscriber.First, talk with your DBA or whoever setup replication to see why they were dropped.You could, in the article properties, set Copy Foreign Key Constraints to TRUE (default is false) then rerun the snapshot agent.The default trace on the subscriber should show you who and when the FKs were dropped. |
|
|
|
|
|