Red Gate forums :: View topic - Adding WITH CHECK to Foreign Keys
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

Adding WITH CHECK to Foreign Keys

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
dblanchett



Joined: 07 Sep 2012
Posts: 1

PostPosted: Fri Sep 07, 2012 9:48 am    Post subject: Adding WITH CHECK to Foreign Keys Reply with quote

Is there a way to have SQL Compare include the WITH CHECK option when it creates or alters a foreign key constraint? There is an option to do this in SQL Data Compare but I can not see how to do this in the Schema compare.

Thanks
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6674

PostPosted: Mon Sep 10, 2012 3:26 pm    Post subject: Reply with quote

Hello,

SQL Compare should script objects exactly as they were created. So if you did not specify, it should recreate foreign keys WITH CHECK. If the foreign key was originally created WITH NOCHECK, it should be recreated that way if it needed to be dropped and created or just newly-created. The way to override that would be to use the Ignore->WITH NOCHECK option.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group