Bookmarks for March 29th through March 30th

These are my links for March 29th through March 30th:

SQL – Find all triggers in a MS SQL database.

This script will find all the triggers in a Microsoft SQL database, its come in handy when I’ve been trying to work out where in the system people have tied there code into. I’m not a huge fan of triggers as they tend to make things behave unpredictably, its even worse if you don’t know there is a trigger or where it is.

SELECT S2.[name] TableName, S1.[name] TriggerName, 
WHEN S2.deltrig =  THEN 'Delete' 
WHEN S2.instrig = THEN 'Insert' 
WHEN S2.updtrig = THEN 'Update' 
END 'TriggerType' , 'S1',s1.*,'S2',s2.*
FROM sysobjects S1 JOIN sysobjects S2 ON S1.parent_obj = S2.[id] WHERE S1.xtype='TR'

Found this little script on this site.