When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles
ASPFAQs.com
Message Board
Related Web Technologies
User Tips!
Coding Tips

Sections:
Sample Chapters
Commonly Asked Message Board Questions
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Security
Stump the SQL Guru!
XML Info
Information:
Feedback
Author an Article
ASP ASP.NET ASP FAQs Message Board Feedback
Print this page.
The SQL Guru Answers your Questions...


Today's question comes from Irete P.:

Hi,

I'd like to know the last date all of the tables in a database were updated. Is there some stored procedure I can use?

Thank You,
Irete P.

Irete,

Sort of. The sysobjects table contains the creation date of the table - a column called crdate, I believe.

But I'm guessing that you'd like to know the last date/time the *data* in the table was updated. Sorry, you'll have to do this manually by creating an INSERT/UPDATE trigger on the table that modifies the "last updated" date in another table - probably some sort of master "last updated" table that you've created.

You could also add a "last updated" column to every table and have a trigger update that. Then you could select the max value out of the column.

Sean


Read Other SQL Guru Questions


ASP.NET [1.x] [2.0] | ASPMessageboard.com | ASPFAQs.com | Advertise | Feedback | Author an Article