Disable Enable All Triggers
DECLARE @maxid INT
DECLARE @string varchar(8000)
DECLARE @tbname varchar(100)
DECLARE @trname varchar(100)
DECLARE @ CHECK BIT
SET @ CHECK = 0 -- zero for disable / one for enable triggers
IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE NAME = '##trtemp' AND xtype = 'u' )
DROP TABLE ## trtemp
CREATE TABLE ## trtemp (trid INT IDENTITY (1,1), TABLE_NAME varchar(200))
INSERT INTO ## trtemp SELECT NAME AS tbname FROM sysobjects WHERE id IN (SELECT parent_obj FROM sysobjects WHERE xtype = 'tr' )
SELECT @maxid = MAX (trid) FROM ## trtemp
WHILE (@maxid >= 1)
BEGIN
SELECT @tbname = TABLE_NAME FROM ## trtemp WHERE trid = @maxid
IF @ CHECK = 0
SET @string = 'ALTER TABLE [' + @tbname + '] DISABLE TRIGGER ALL'
IF @ CHECK = 1
SET @string = 'ALTER TABLE [' + @tbname + '] ENABLE TRIGGER ALL'
EXEC (@string)
PRINT @string
SET @maxid = @maxid - 1
END
IF @ CHECK = 0
SELECT 'Triggers are DISABLED'
IF @ CHECK = 1
SELECT 'Triggers are ENABLED'
DROP TABLE ## trtemp