owl

Tuesday, September 15, 2009

To show all the store procedures in a database

SELECT name
FROM sys.objects
WHERE type = 'P'


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 *
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,create_date,GETDATE()) < 7

No comments: