December 19, 2003 at 2:36 pm
Hi gurus,
Was just wondering if there is a straight forward way of finding when was the database last updated in SQL. Meaning, when was the last time a change was made to one of the DB tables.
thank you,
v
December 22, 2003 at 7:31 am
If you want to know when the db was last changed for example adding a new table you can query the creation date in sysobjects table...but if you mean the last time a record was updated in a table, then there is no a straight way.
December 22, 2003 at 8:52 am
Thank you for replying racosta. I am looking for a way to find out last time a record was updated in a table.
any thoughts,
thank you,
v
December 22, 2003 at 9:54 am
You can add a field and set a default of "getdate()" for inserts, but for updates you'd have to set a trigger.
Lumigent's Log Explorer or any of the log reader products can tell you this as well.
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
December 22, 2003 at 10:18 am
Thank you Steve, can you point me to some examples on triggers. I am kind of newbie in writing trigger/sp's.
thank you for all your help,
v
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply