Saturday 28 October 2017

List All Stored Procedure Created and Modified in Last N Days


Find last N days created Stored procedures

Use the below code which is shown what are the stored procedure createdin last 'N' days

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

Note: Change 7 to any other day value

List-All-Stored-Procedure-created-in-Last-N-Days
List All Stored Procedure Created in Last N Days



Find last N days modified Stored procedures

Use the below code which is shown what are the stored procedure modified in last 'N' days

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

Note: Change 7 to any other day value

List All Stored Procedure Modified in Last N Days
List All Stored Procedure Modified in Last N Days