Today, I encountered a problem where several tables in the database were cleared. Because the data was deleted last night and was not accessed by users at that time, data can be restored Based on log backup without data loss. But who deleted the data?
Many tools were available before MySQL 2008 to analyze the online logs and backup files of databases, but not many of them support MySQL 2008 and later versions. Here, I used apexsql log 2011. The functions of apexsql log 2011 are as follows:
Apexsql log is a SQL Server transaction log reader that allows viewing transaction log data in read-friendly format. Audit and undo SQL database changes of your choosing. Determine who changed the data
And when the change occurred.
Read the transaction log to find out who created, changed or dropped a database object
This is exactly what I need, and there is a 14-day free trial, there is no function restrictions. Download, install, and open the online log, and select the log file after the problem occurs for analysis, easily find the statement that was executed at that time. The result is not a data deletion as we imagined, but an application.ProgramA function of is used without error at the same time. As a result, the database table is dropped and re-created.
Select online logs and backup files
One disadvantage is that the display bar is a little small, and the name of the application executed at that time is more perfect. However, database log analysis is indeed a good product.