List All Stored Procedure Modified in Last N Days


SQL SERVER – 2005 – List All Stored Procedure Modified in Last N Days


SELECT 
nameFROM sys.objectsWHERE type 'P'AND DATEDIFF(D,modify_dateGETDATE()) < 7----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 nameFROM sys.objectsWHERE type 'P'AND DATEDIFF(D,create_dateGETDATE()) < 7----Change 7 to any other day value.
Date condition in above script can be adjusted to retrieve required data.

Comments

Post a Comment

Popular posts from this blog

MOLAP, ROLAP, And HOLAP

Difference Between CURRENT_TIMESTAMP and GETDATE()

Convert Seconds to HH:MM:SS