SQL 2005 Replication and NOT FOR REPLICATION attribute
Posted on 2006-05-12
I am not a DBA or an SQL expert, but I’ve been around long enough to understand things (specially if you treat me like if I were Forest “Dumb” ja,ja )
• SBS Box running SQL 2005 (Workgroup Edition – Processor License) holding a DB in SQL 2000 compatible mode
• Third party development company develop and app that uses that DB through a web site hosted on the same box
• Application is being in use since Dec. 2005
• Snapshot replication was set to produce a daily COMPLETE snapshot of the DB with the respective publication. On an another SBS box, running SQL 2000, a subscription is created to daily pull the snapshot
• Suddenly, update to tables started to fail. Developer review code and DB structure and pointed out the only visible difference : there was a “column property” for the table primary key called “Not for replication” that was set to YES. Developers said that his affect the IDENTITY and caused the application not to update the table contents.
• We focus primarily on the most important table and never checked if the update problem happened on other tables as well.
• In sake of time, we drop replication and change that property to NO in all tables. The update works now.
1. Does this make sense to you experts?
2. Could replication cause all this and if so, what measures need to be taken in consideration for the application to work with replication?
Thanks in advance