) Log Explorer instructions

Source: Internet
Author: User

Procedure

After downloading and installing the client and server on the database server, openLog Explorer,4.2The interface is highlighted in blue, and the running software is visible:

(1). Click<Attach Log File>Start data recovery.

(2) determine the server for data recovery and enter the login user name and password."WindowsAuthentication", Click<Connent>TestConnection.

(3 ).Select the database where the data to be restored is located, and click<Attach>Enter the data operation interface.

(4 ).After entering the data operation interface, select<View log>To display the operationLogsFor example, if a table has been added, deleted, or modified, the Operation records are displayed. If the logs have not been cleared for a long time, there will be a lot of these logs. You can use the "filter function" to set conditions for log filtering.


You can filter data by time, table, or user.

(5 ).The queried log content can be exported.XMLFile. ImportedXMLIf you want to transfer files to the database, you need to write them by yourself.CodeAnalysisXMLFile.

 Note: Be careful when deleting data.Not all data can be recovered. The recovered data operation is normal.

use Log Explorer to view and restore Data
usage:

open Log Explorer-> attach log file-> select SQL server and logon method-> connect->
in Database Name, select database-> attach-> left in the dialog box, browse-> view log-> you can see the log record

To restore the file, right-click the log record undo transation and choose Save file name and path> open the file and run it in the query analyzer.
T-SQL code.

For example, if log is delete table where..., the generated file code is Insert table ....
Then, put the insert table code in the query analyzer and execute it to restore the data.

restore
-- how to restore deleted/updated data
restore
1. Connect to the database to be deleted
open Log Explorer and select" file "-> "Attach Log File"-> Select Server and login method-> "Connect"-> select "Database"-> "Attach"
2. View logs
on the left in the "operation project" dialog box, select "Browse" Project-> "view log"-> the current log record is displayed.
3. recover data
right-click a log record., select "undo transation"-> "save file name and path"-> open the file and run it in the query analyzer
T-SQL code
for example: if log is delete table where... the generated file code is Insert table ....

restore
-- Log Explorer restores data after the drop table and truncate table.
restore
1. Connect to the dB of the deleted database.
the operation is the same as the operation above.
2 Recovery Method
1) select the "salvaage dropped/truncate" menu, select the table name and the date of droped/trucated in the dialog box on the right,
select the storage location where the insert statement is generated in file name, select droped or truncated for condition.
click "CREATE" to generate an insert statement. Run the generated statement in the query analyzer.
2) choose "viewddl commands"> select "truncate table"> click "Salvage"> Generate Statement> query analyzer

----------------------------------------------------------------------
-- Several questions about Log Explorer
----------------------------------------------------------------------
1) perform full/differential/log backup on the database
If you select to delete the non-active entries in the transaction log during backup
When I try to view logs again Using Log Explorer, the system prompts no log recorders found that matches the filter, wocould you like to view unfiltered data and select YES to see the record.

If you do not select to delete non-active entries in the transaction log
When Log Explorer is used to view logs, the original logs can be viewed and restored.
2) modified part of the data in one of the tables. At this time, Log Explorer is used to view the logs, which can be used for log recovery.
3) then recover the backup. (Note: The restoration is to disconnect Log Explorer from the database or connect to the database.OthersData,
Otherwise, the database is in use and cannot be recovered)
After the restoration, open Log Explorer and prompt no log recorders found that match the filter, wocould you like to view unfiltered data. If yes is selected, the log record modified in 2 is not displayed, therefore, it cannot be restored.
4) do not use the SQL backup function to back up your logs.

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

Start the SQL service and use Log Explorer to restore 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.