Wednesday 6 August 2008

Code to Identify the user and date stored procedure modified

I have come across so many posting in Microsoft SQL Server newsgroup asking for how to identify the user and date a stored procedure was modified. Unfortunately SQL 2000 does not record when a stored procedure is modified, unless it is dropped and recreated. Fortunately SQL 2005 does have this feature. Use the following code to identify the user and the date that the stored procedure was modified

select name,modify_date from sys.procedures
order by modify_date desc

1 comment:

Anonymous said...

This doesn't give the user. Just the name of the SP.