Stored procedure modified time
Is there a way to find out when a stored procedure or table was last modified? I tried checking the properties via SQL Management Stu开发者_开发知识库dio, but only found the creation date.
Thanks!
You can use this to find the last modified date for a stored procedure:
select name, create_date, modify_date
from sys.procedures
where name = 'sp_MyStoredProcedure'
You can use this to find the last modified date for a table:
select name, create_date, modify_date
from sys.tables
where name = 'MyTable'
To find the last modified date and other info for other objects, you can query sys.objects
. http://msdn.microsoft.com/en-us/library/ms190324.aspx contains a full list of types you can search for.
select top 10 *
from sys.objects
where type in ('p', 'u')
精彩评论