Tuesday, 30 October 2012

Find out the stored procedure which were created/modified in last N Days:


Find out the stored procedure which were created/modified in last N Days

 

Here are some Queries to find out the list of stored procedure that were created in last N days..

Stored Procedure that were created in last N days :

SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,create_date, GETDATE()) < 7
order by create_date desc

SELECT name,create_date,modify_date
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,create_date, GETDATE()) < 7
order by create_date desc

Stored Procedure that were modified in last N days :

SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < 30
order by modify_date desc


SELECT name,create_date,modify_date
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,modify_date, GETDATE()) < 7
order by modify_date desc

No comments:

Post a Comment

Thank You for Your Comments. We will get back to you soon.

back to top