|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Friday, August 24, 2012 8:11 AM
Points: 1,097,
Visits: 2,157
|
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 4:45 PM
Points: 5,297,
Visits: 7,240
|
|
I don't have a test setup here to quickly double-check, but if I read the documentation correctly the NOT FOR REPLICATION will not cause the constraint to exist only at the publisher. Here's the quote:
"The check constraint is not enforced when a replication agent performs an insert, update, or delete operation."
I interpret this as "the constraint itself is replicated to the subscriber and it will also be enforced there with respect to 'local' (manual) inserts and updates, but inserts and updates from a replication agent are explicitly exempted".
Can someone who can easily create a test setup please double check if this is a documentation error, or just a badly formulated QotD?
Oh, and Steve might also want to fix the two identical answer options in this question...
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Wednesday, August 19, 2009 8:09 AM
Points: 664,
Visits: 48
|
|
I have not cross checked it but gone through some of the articles.
in one of blog I found that Constraints should be on Subscriber database.
Plz refer : http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=113154
Plz correct me if I am wrong.
-Navnath
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Tuesday, May 28, 2013 1:34 AM
Points: 1,263,
Visits: 1,080
|
|
Unfortunately I don't have a test setup at hand either and perhaps I'm again misinterpreting the information in the MSDN article the QotD is referring to, but in my opinion a 'choose all that apply' would have been the proper option for the question:
The NOT FOR REPLICATION option can be specified in the following ways:
- [...]
- Directly in Transact-SQL syntax or in Microsoft SQL Server Management Studio when:
- Creating or modifying an object in the publication database. - Creating or modifying an object in the subscription database. [...]
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Thursday, June 06, 2013 9:12 AM
Points: 6,260,
Visits: 1,980
|
|
This is a BAD formulated question. I got right because I guessed the intentions of the author. The constraint DOES gets created on the subscriber just not enforced!
If you don't want the definition at all on the subscriber, you suppress it with the schema_option parameter of the article.
* Noel
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: 2 days ago @ 3:02 AM
Points: 276,
Visits: 381
|
|
Answers C and D appear to be identical...
Disable CHECK constraint at the Subscriber database
|
|
|
|