SQL Server recently changed objects

List recently changed procedures and views in a database:

SELECT name , create_date , modify_date
FROM sys.objects
WHERE ( create_date >= DATEADD ( DAY , -7 , GETDATE() )
     OR modify_date >= DATEADD ( DAY , -7 , GETDATE() ) )
AND type_desc IN ( 'VIEW' , 'SQL_STORED_PROCEDURE' )
ORDER BY name
Posted in SQL server

Leave a Reply

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

*