How to check date of last change in stored procedure or function in SQL server

SQL Query for Stored procedure Modification date and time

SELECT name, create_date, modify_date
FROM sys.objects
WHERE type = 'P'  
order by modify_date desc

Copy and Paste in SQL  query windown and execute.

SQL Query for Function Modification date and time

SELECT name, create_date, modify_date
FROM sys.objects
WHERE type = 'fn'
AND name = 'Function Name'

SQL Query for VIEW Modification date and time

SELECT name, create_date, modify_date
FROM sys.objects
WHERE type = 'VW' and  name = 'View Name'
order by modify_date desc

Leave a Reply

Your email address will not be published. Required fields are marked *