Solved

Query for last database updated date in MySQL

Posted on 2015-01-13
4
45 Views
Last Modified: 2016-06-18
Hi All,

Could some body provide me query to find last updated of the database in mYSQL.

Regards,
Sreeni
0
Comment
Question by:GK GK
  • 2
4 Comments
 
LVL 8

Expert Comment

by:Jayaraja Jayaraman
ID: 40546885
SELECT max(last_user_update) last_user_update
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'YOUR_DBNAME_HERE')

or

This Blog entry contains information on how to do it on SQL Server 2008 and 2005.
http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx
0
 

Author Comment

by:GK GK
ID: 40548355
Thanks Jayaraj,

Will it work for MySQL ?


Regards.
Sreeni
0
 

Accepted Solution

by:
GK GK earned 0 total points
ID: 40549108
Hi All,

I found the query

Select table_Schema,max(UPDATE_TIME) FROM information_schema.TABLES group by table_Schema;

UPDATE_TIME works for MyISAM. If required other Engines  we will look into each table in each schema to see if there is any date columns that are populated with latest.

Lot of thanks for support.

Regards,
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

More Fun with XML and MySQL – Parsing Delimited String with a Single SQL Statement Are you ready for another of my SQL tidbits?  Hopefully so, as in this adventure, I will be covering a topic that comes up a lot which is parsing a comma (or other…
All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question