Sunday, December 04, 2011

Recently modified Objects in sql server database

If you want to find a recently changed (or) modified objects list in sql server. The simplest way to find this below query.

SELECT * FROM sys.objects

WHERE DATEDIFF(D,modify_date, GETDATE()) < 2 -- (Last 2 days)
 
-- you can also filter stored procedure or tables etc
SELECT * FROM sys.objects

WHERE type='P' and DATEDIFF(D,modify_date, GETDATE()) < 2 -- (Last 2 days)

No comments: