I would put triggers on the tables in question, which insert rows into a
log table. You can use functions like CURRENT_USER, SYSTEM_USER,
HOST_NAME(), APP_NAME() to record who and what is actually writing to
the table.
You could also use CHECKSUM_AGG to record the aggregate checksum for the
whole table, and then compare that every day/hour/minute/whatever to see
if any changes were made to the table. It won't tell you what or who
did it, or even what those changes are.
-----Original Message-----
From: Singh Bijay (ODC - Satyam)
[mailto:mssqldba-ezmlmshield-x84431957.[Email address protected]
Sent: Wednesday, June 30, 2004 7:20 AM
To: LazyDBA Discussion
Subject: RE: table update date
Guys
I am also looking for the below solution.In addition is it possible to
get last database access date by a given login?
Thanks
B
-----Original Message-----
From: mdefnet
[mailto:mssqldba-ezmlmshield-x49937099.[Email address protected]
Sent: Wednesday, June 30, 2004 2:27 AM
To: LazyDBA Discussion
Subject: table update date
I have searched high and wide trying to find a means to find a way to
easily determine the last time any record in a table was updated. We
have a database that (unfortunately) has tables defined that may no
longer be used ... but there doesn't appear to be any means of
determining the last time a table was either accessed, or better yet
updated. If we could determine these it would allow us to delete those
tables that are no longer accessed/used. Any ideas are greatly
appreciated. I have run this by several DBAs with no answer.
The ideal scenario would have another column shown in Enterprise Manager
showing last access date and another column showing last update date.
Mike
========================================================================
======
If you are not an intended recipient of this e-mail, please notify the
sender, delete it and do not read, act upon, print, disclose, copy,
retain or redistribute it.
Click here for important additional terms relating to this e-mail.
<http://www.ml.com/email_terms/>
========================================================================
======
---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]
MS Sql Server LazyDBA home page