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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-09-28 : 07:24:21
|
| Madhu K Nair writes "Setup : Windows 2000/sql 2000SQL Servers : SQL1 ,SQL2SQL1 is the publisher&Distributor and SQL2 is the subscriber. The SQL2 Server will have all the tables from SQL1 and few more tables (Local) of its own. After replicating the SQL1 tables to SQL2 foreignkeys are created on SQL2 Local Tables which reference the replicated table. Upto this point is initially working properly. When a user update/delete a row in SQL1 the replication fails. Initially we found that this is because the user was updating PK of SQL1 table and the replication was not able to update the same row in SQL2. So we restricted the user from updating PK. Now the problem when a user is deleting a row (in SQL1) which has referenced in child table the deletion fails in SQL1(which is normal due to foreignkey). But the problem is that, even though the deletion fails in SQL1, the replication stops. The error shown in the (Publication log is that the same row which was tried to delete could not be deleted).Anyhow my replication is never fine tuned. it create always some or other problem. Sometimes, our requierment of creating FK SQL2 referencing SQL1.replicated table, may be unique. The other thing i noticed is there is not much documentation done in BOL regarding Replication. If anybody can tell me is there any white paper on Replication in SQL--regardsMadhu" |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-10-01 : 03:44:53
|
if you're going to reference the replicated tables, be sure to have cascade updates or deletes, this may be dangerous, coz if the source tables were accidentally updated or deleted, the effect is a waterfall disaster. also keep in mind that you may want to restrict select only on the replicated tables.BOL is pretty helpful, but you just google your way to your questions and i'm pretty sure, you'll get your answers. anyways, i think there's a book out there. i learned from experience... |
 |
|
|
|
|
|
|
|