March 11, 2009 at 8:35 am
is there a way to find when was the database last updated time though i dont have any kind of triggers.
March 11, 2009 at 8:41 am
Just as a matter of practice, you should probably have a lastUpdated column in your tables, as well as a dateCreated column, so that you can tell when each row was last updated, not just the table.
That said, the information you want should be in the logs. If you repost this over in one of the DBA forums, you will probably get an answer pretty quickly.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 11, 2009 at 8:42 am
Try something like this:
select last_user_update
from sys.dm_db_index_usage_stats
where database_id = db_id( 'databasename' )
and object_id = object_id('tablename')
March 11, 2009 at 8:46 am
Easier than I thought it would be !!
Thanks, Simon.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
March 11, 2009 at 9:47 am
but i think that is the created date.
I am getting all NULL values when i execute that query by giveing the databasename.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply