Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop Triggers 1

Status
Not open for further replies.
Mar 12, 2003
678
US
Is there a stored procedure or script that will drop all of my triggers on a database?
 
If you run this it will create a script to that you can then run to drop all your triggers. I haven't tested this so you should run this in test first to make sure it doesn't drop anything you need to keep.

Code:
select 'DROP TRIGGER '+name
from sysobjects
WHERE xtype = 'TR'

- Paul
10qkyfp.gif

- If at first you don't succeed, find out if the loser gets anything.
 
Perfect. I just added a like condition to the name, because I named custom triggers different
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top