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 2008 Forums
 Replication (2008)
 modifying "Enforce For Replication" in script

Author  Topic 

musdbguy
Starting Member

1 Post

Posted - 2011-07-11 : 18:51:34
Is there a way to set the "Enforce for Replication" setting on all foreign keys within a published database without having to modify each one individually? I haven't found a way to modify the property "Enforce For Replication" using a sql statement and am currently stuck having to modify this setting manually for each foreign key. What I'd like to do is build a generic script that can do this to any database with foreign keys, basically finding all the foreign keys that don't have "Enforce For Replication" set the way I need it set, and then set them that way.

Thanks,
Jon
   

- Advertisement -