sqlnIGHTS.COM

My Sql Server info repository

Monitor when a Stored Proc Gets Changed

Check When A Stored Proc Changed

Knowing if a stored procedure has been modified can be useful when you need to check the database in case of a sudden change in performance. The method I will show you will not tell you who changed the stored proc but at least you’ll know if it has been changed.

Just run a scheduled job either daily or weekly that executes the the stored procedure below:

Check For Modifed Procs.sql

This is script to create the table:

Table for Modifed Procs.sql

This will log into a table the stored procedure name, the database name and the date it changed.

If you suddenly have a stored procedure that isn’t performing as it should, then this is a quick 1st check to see if it has been changed without you being aware.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s