Can I temporarily disable a foreign key constraint. How to do it?
To temporarily disable a constraint (foreign keys are constraints):
ALTER TABLE MyTable NOCHECK CONSTRAINT MyConstraint
To enable the restriction again
ALTER TABLE MyTable CHECK CONSTRAINT MyConstraint
By the way, that’s why you need Alter table permissions when you are BCP or Bulk Insert into a table. Using the default configuration, check the restrictions and foreign keys are not checked.