Solved

Query for last database updated date in MySQL

Posted on 2015-01-13
4
42 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now