You may want to disable all the constraints in the database by executing the following command:
EXEC sp_msforeachtable "ALTER TABLE ? NOCHECK CONSTRAINT all";
Then switching them back on with:
EXEC sp_msforeachtable @command1="print '?'",
@command2="ALTER TABLE ? WITH CHECK CHECK CONSTRAINT all";
Source: Stack Overflow - Can foreign key constraints be temporarily disabled using TSQL?Stack Overflow - Can foreign key constraints be temporarily disabled using TSQL?