CREATE PROC DisableTriggers
AS
DECLARE @Table_Triggers SYSNAME
DECLARE Cursor_Disabletriggers CURSOR FOR
SELECT object_name(parent_id)
FROM sys.triggers
OPEN Cursor_Disabletriggers
FETCH NEXT FROM Cursor_Disabletriggers
INTO @Table_Triggers
WHILE @@FETCH_STATUS = 0
BEGIN
ALTER TABLE @Table_Triggers DISABLE TRIGGER ALL
END
CLOSE Cursor_Disabletriggers
DEALLOCATE Cursor_Disabletriggers
AS
DECLARE @Table_Triggers SYSNAME
DECLARE Cursor_Disabletriggers CURSOR FOR
SELECT object_name(parent_id)
FROM sys.triggers
OPEN Cursor_Disabletriggers
FETCH NEXT FROM Cursor_Disabletriggers
INTO @Table_Triggers
WHILE @@FETCH_STATUS = 0
BEGIN
ALTER TABLE @Table_Triggers DISABLE TRIGGER ALL
END
CLOSE Cursor_Disabletriggers
DEALLOCATE Cursor_Disabletriggers