Monday 29 October 2012

How can I quickly identify most recently modified stored procedures or table in SQL Server


1. Select * From sys.objects where type='u' and modify_date between GETDATE()-1 and GETDATE()

Note :  use p for store procedure,tr for trigger and fn for function

OR
2. Select * From sys.objects where type='u' order by modify_date desc

Note :  use p for store procedure,tr for trigger and fn for function

you change the date accodingly in first Query
use type='p' for storeprocedure in this Query



ROHIT SRIVASTAVA

No comments:

Post a Comment