What is the best way to go through an exisiting database and review the triggers that are currently in place. I can create them but finding them is another matter...
-------------------------------------------
Ummm, we have a bit of a problem here....
the only way i've found so far is (in enterprise manager) to right-click on the table name & choose All Tasks --> Manage Triggers. I tried dropping them via Query Analyzer & it said it had never heard of them, but they were sitting in that view. Anyone have any idea why?
tigerjade
"Always code as if the person who ends up maintaining your code will be a violent psychopath who knows where you live." -- Martin Golding
select id, colID, text FROM syscomments where id in (select id from sysobjects where xtype = 'TR') order by id, colID
Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)
Sorry, don't want to take anything away from mwolf00, however if you do the following you get the table name and the triggers on it....
SELECT par.Name AS 'Table', trig.Name AS 'Trigger Name'
FROM sysObjects trig
JOIN sysObjects par
ON par.ID = trig.parent_obj
WHERE trig.xtype = 'TR'
If that isn't what you want, go to Enterprise Manager, choose to script all the tables and from the options tab click "Script Triggers". Then once it's done copy it into Notepad and bob's your uncle.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.