March 17, 2011 at 11:01 am
Hi,
Does anyone know which store procedure allow us to check when the database or table last updated?
Kindly advice.
Thanks.
Regards,monkeyDBAWe dont grow when things are easy; We grow when we face challenges.
March 17, 2011 at 11:17 am
There isn't a reliable, persistent one. You can query the index_usage DMVs, but that's only since the last database start.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 21, 2011 at 2:12 pm
You can try out something like this.
SELECT name, create_date, modify_date
FROM sys.objects
WHERE type = 'U'
order by modify_date desc
March 21, 2011 at 2:23 pm
mail.pnreddy (3/21/2011)
You can try out something like this.SELECT name, create_date, modify_date
FROM sys.objects
WHERE type = 'U'
order by modify_date desc
That will give you the date that the object's definition was changed, not the data in the table.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 21, 2011 at 11:53 pm
Thanks for your help on this. The script is really helpful. 😀
Regards,monkeyDBAWe dont grow when things are easy; We grow when we face challenges.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply