use your_database

DECLARE @exec    SMALLINT

DECLARE @sql    VARCHAR(500)

DECLARE @id        INT

DECLARE @name    VARCHAR(255)

SET @exec = 1

DECLARE gd CURSOR LOCAL FOR

SELECT TOP 1 name , id FROM sysobjects WHERE xtype = 'TR' ORDER BY id ASC

OPEN gd

FETCH NEXT FROM gd INTO @name , @id

WHILE @@FETCH_STATUS = 0
BEGIN
    PRINT '+++++++++++++++++++++++++++++++++++++++'
   
    SET @sql = 'DROP TRIGGER ' + @name
   
    PRINT '--->' + @sql
   
    IF @exec = 1
        EXEC( @sql )
   
    FETCH NEXT FROM gd INTO @name , @id
END
Tags
Comments
Write the first comment
Leave a trace
Name *
Email *
Website
Anti SPAM * Code (9 + 2) =
Leave me a comment *
 
All comments are subject to editorial review
Post being viewed right now
Item date: 15.05.2009
Views: 980
Item date: 12.04.2009
Views: 686
Item date: 16.06.2009
Views: 1864
Item date: 14.05.2009
Views: 1247
Item date: 23.08.2009
Views: 1633
Item date: 05.02.2009
Views: 919
Item date: 22.08.2009
Views: 2134
Item date: 01.01.2009
Views: 1564