Wednesday, May 19, 2010

How to get the listing of modified stored procedure from last n numbers of days in SQL Server

You can try this query for finding out the modified stored procedure names and modified date.

USE DATABASE_NAME;
GO
SELECT name, modify_date
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < N
GO



N - Change the N as the no of last days