Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last updated table

Status
Not open for further replies.

pthalacker

Programmer
Aug 30, 2004
150
How can I tell when the most recent update was made to a database. I would like to know the date, time and which table.

pamela
 
Last update of a the schema or of the data? Also what version of SQL Server are you using?


- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
I don't believe there is a way unless you created a DATETIME column in each table called something line "Updated" and have a trigger update that value when UPDATEs are done.

-SQLBill

Posting advice: FAQ481-4875
 
There is no way to tell when the data was last updated unless you have programed it into your schema. For example I always put the following fields into my tables.

CreateDT
CreatedBy
UpdateDt
UpdatedBy

There are a few third party products that could help. Such as log explorer by lumigent. This will allow you to read your transaction log.
You can also run SQL profiler to collect data on current connections and processes.

- Paul
- If at first you don't succeed, find out if the loser gets anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top