You can use following script to accomplish the given task:

DECLARE @exec bit

DECLARE @db   varchar(100)

DECLARE @sql  VARCHAR(255)

DECLARE @trg varchar(100)

DECLARE @table varchar(100)

/*init*/
select @db = DB_NAME()

SET @exec = 0

DECLARE gd CURSOR LOCAL FOR
SELECT
    sop.name as name_parent ,
    so.name
FROM sysobjects AS so
INNER JOIN sysobjects AS sop ON sop.id = so.parent_obj
WHERE
    so.xtype = 'TR'
   
OPEN gd

FETCH NEXT FROM gd INTO @table , @trg

WHILE @@FETCH_STATUS = 0
BEGIN
    SET @sql = 'DISABLE TRIGGER ' + @db  + '.' + @trg + ' ON ' + @db + '.' + @table
   
    PRINT @sql
   
    if @exec = 1 
        EXEC( @sql )
       
    FETCH NEXT FROM gd INTO @table , @trg
END

CLOSE gd

DEALLOCATE gd

Tags
Comments
Write the first comment
Leave a trace
Name *
Email *
Website
Anti SPAM * Code (8 + 9) =
Leave me a comment *
 
All comments are subject to editorial review
Post being viewed right now
Item date: 21.07.2009
Views: 2000
Item date: 01.03.2009
Views: 1800
Item date: 31.03.2009
Views: 483
Item date: 16.06.2009
Views: 790
Item date: 08.03.2009
Views: 1200
Item date: 08.03.2009
Views: 1766
Item date: 13.05.2009
Views: 1250
Item date: 03.01.2009
Views: 1049