Adding WITH CHECK to Foreign Keys

Forum for users of SQL Compare schema synchronization utility

Adding WITH CHECK to Foreign Keys

Postby dblanchett » Fri Sep 07, 2012 8:48 am

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.

Posts: 1
Joined: Fri Sep 07, 2012 8:44 am

Postby Brian Donahue » Mon Sep 10, 2012 2:26 pm


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.
Brian Donahue
Posts: 6590
Joined: Mon Aug 23, 2004 9:48 am

Return to SQL Compare Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests