Решение:
EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all" Подробнее: If you want to disable all constraints in the database just run this code:-- disable all constraints EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all" To switch them back on, run: (the print is optional of course and it is just listing the tables) -- enable all constraints exec sp_msforeachtable @command1="print '?'", @command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all" http://stackoverflow.com/questions/159038/can-foreign-key-constraints-be-temporarily-disabled-using-t-sql