--Following script will provide name of all the stored procedure which
--were modified in last 7 days.
SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < 2
----Change 7 to any other day value
--Following script will provide name of all the stored procedure which
--were created in last 7 days, they may or may not be modified after that.
SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,create_date, GETDATE()) < 2
----Change 7 to any other day value.
--Other type options
--U for user table
--PK for primary key constraint
--F for foriegn key constraint
--P for sql stored procedure
Reference : http://blog.sqlauthority.com/2007/07/10/sql-server-2005-list-all-stored-procedure-modified-in-last-n-days/
No comments:
Post a Comment