Checking for Triggers in a SQL2005 Database

  • I am currently working with a SQL2005 database that was specified to use triggers to log changes to certain key tables so that changes to k_fred were logged to l_fred

    Rather than trawl through a script dump of the entire database, can I use the system view SELECT * FROm sys.triggers with a join on object_id to identify the table and determine the prescence (or absence) of triggers?

  • Yep. Assuming you mean join the parent_id in sys.triggers to the object_id in sys.all_objects.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Thank you.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply