October 13, 2008 at 12:38 pm
Does anyone know of a way to change all "Enforce for Replication" From "Yes" to "No"?
I found a way to identify them but would like to find a way to change all of them quickly instead of going in each table and editing in design mode.
(qry for identifying all enforce for replication = yes:
SELECT OBJECT_NAME(constid) AS [Relationship Name],
OBJECT_NAME(rkeyid) AS [Primary Key Table],
OBJECT_NAME(fkeyid) AS [Foreign Key Table]
FROM sysreferences WITH (NOLOCK)
WHERE OBJECTPROPERTY(constid, 'CnstIsNotRepl') = 0 )
Thanks in advance, I appreciate it!
October 13, 2008 at 2:58 pm
That is basically the NOT FOR REPLICATION setting in the definition of the FKs. You will have to drop them and re-create them without the NFR part.
Now, make sure that is what you actually want!
* Noel
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply