Solved

Query for last database updated date in MySQL

Posted on 2015-01-13
4
47 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to count in a table in php 22 50
sort in mysql based off of query param 4 30
Incorrect definition of table mysql.proc 7 88
reverse engineer .sql from php files 11 54
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
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 …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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