Trigger on system tables?

  • Hi,

    I need to monitor who is modifying my stored procedures in my development server.

    SP details are available in "syscomments" system table.

    Can we create triggers on system tables?

    regards

    Shankar Ramakrishnan.

  • rather just use profiler. Don't ever fiddle with system objects.

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • Or better yet use a DDL trigger on the CREATE/ALTER/DROP PROCEDURE statements. Query the EVENTDATA() function for UserName, LoginName, TSQLCommand information and relay that back to you or store it in an audit table and review later.

  • I use the DDL triggers to capture any change it can to a table.  Every morning it sends me an email with the changes in the last 24 hours.  Then I get to go beat on developers that made the changes.

    There is a decent example in Books Online how to do it, I modified it to actually save all the records into a table in a database I have secured anyone except myself from doing anything but inserts.

     

  • I am able to monitor the changes.Thanks for the timely help.

Viewing 5 posts - 1 through 4 (of 4 total)

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