sql server disable all constraints and triggers
USEEXEC sp_MSforeachtable @command1="ALTER TABLE ? DISABLE TRIGGER ALL"
GO
EXEC sp_MSforeachtable @command1="ALTER TABLE ? NOCHECK CONSTRAINT ALL"
GO
Reference: http://www.sqlusa.com/bestpractices2005/disabletriggerconstraint/
页:
[1]