Log Explorer to view and recover database data

Source: Internet
Author: User
Tags save file

" from: Author source : Ronli (Http://Ronli.cnblogs.com/)"

"Log Explorer" to view and recover database data

Viewing and recovering data using Log Explorer

Log Explorer 4.1. Logs viewing tool available for SQL Server2005

How to use:

Open log Explorer--Attach log File--select SQL Server server and login method, Connect, and select Database--attach-> The log record is visible in the left dialog browse-> View log->

If you want to restore: Right-click Log record Undo transation-> Select Save file name and path and open the file to Query Analyzer to execute T-SQL code.

For example, if log is delete table where ...      , the generated file code is the Insert Table .... The code for this insert table is then placed in the query parser to execute. You can recover the data.

The

------------------------------------------------------------------------how to recover the data that was Delete/update-------------- --------------------------------------------------------  1 db connected to the deleted database open log explorer  select   "File"- > "Attach log File", select Server and login method, "Connect", select "Database", "Attach" 2   view Log in the dialog box to the left of the Action project, select " Browse "project," View Log "to see the current log record 3   recovery data      Right-click a log record, select" Undo Transation, select Save file name and path, and then open the file to Query Analyzer to execute T-SQL code, for example: If log is delete table where ... , the generated file code is the Insert Table ....

------------------------------------------------------------------------Log Explorer restored by drop table and truncate   Data after Table----------------------------------------------------------------------1 db operation connected to the deleted database Ibid. 2 Recovery Method 1) Select the "Salvaage dropped/truncate" menu, select the table name in the dialog box on the right, and the date of droped/trucated, select the location where the INSERT statement step is generated in File name, Condition Choose is droped or truncated, the last click "Create" will generate INSERT statement, the generated statements into the Query Analyzer inside the execution of 2) select "Viewddl Commands" menu, "tr Uncate table action Item, click Salvage, generate statement, Query Analyzer, execute

------------------------------------------------------------------------Several issues that log Explorer uses-------------------- --------------------------------------------------1) Make a full/differential/log backup of the database if you choose to delete the inactive entries in the transaction log and then use Log Explorer to try to read the log, Tip No log recorders found that match the filter,would your like to view unfiltered data Select Yes to see the record just now

If you do not choose to delete the inactive entries in the transaction log and then use Log Explorer to try to read the log, you can see the original log and do recovery 2) modify some of the data in one of the tables, at this time log Explorer to see logs, can be used for log recovery 3) and then restore the backup (note: Recovery is to disconnect the log Explorer from the database, or connect to other data, otherwise the database is in use unrecoverable) after the recovery, then open the Log Explorer prompt no log recorders found that match the filter, Would to view unfiltered data, select Yes to see the log record that you just modified in 2, so you cannot recover. 4) Do not use SQL Backup function Backup, do not make your log is destroyed.

The correct backup method is: Stop the SQL service, copy the data files and log files for file backup.

Then start the SQL service and use Log Explorer to recover the data

Log Explorer to view and recover database data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.