Below is the query used to find the modified tables,functions and stored procedures in last 1 day.
SELECT * FROM sys.objects
WHERE DATEDIFF(D,modify_date, GETDATE()) < 1
To find only modified functions in last one day below query is used
SELECT * FROM sys.objects
WHERE TYPE = 'fn' AND DATEDIFF(D,modify_date, GETDATE()) < 1
To find only modified tables in last one day below query is used
SELECT * FROM sys.objects
WHERE TYPE = 'U' AND DATEDIFF(D,modify_date, GETDATE()) < 1
To find only modified procedures in last one day below query is used
SELECT * FROM sys.objects
WHERE TYPE = 'P' AND DATEDIFF(D,modify_date, GETDATE()) < 1
Comments
Post a Comment