Process to Know How to Analyze SQL Server Log (.ldf) Files

This section explains how to read your database transaction log file regarding the changes and modification taken place in the corresponding database.

STEP 1

Go to Start menu » Programs » SysTools SQL Server Recovery Manager Tool » SysTools SQL Server Recovery Manager Software
Choose 'Analyze SQL Server Log (.ldf) File' module from the software panel.

SQL Server Manager
STEP 2

Click on Open to add the SQL Log (.ldf) file to be analyzed.

open-sql-log-file
STEP 3

Here user will get two options to add file to the software:

  • Online DB Option
  • Offline DB Option

Online Database Option

If user select Online DB Option, Software allow you to select the Server Name from available list. If the Server Name not available in the list then you can enter it manually.

online db option

Choose Authentication either Windows Authentication or SQL Server Authentication.

authentication mode
STEP 4

Now, choose the desired database by clicking the drop down arrow and click on Ok button.

click ok
STEP 5

Offline Database Option

If users select Offline DB Option, click on the LDF File Path Browse button to load the Log file.

browse ldf file
STEP 6

Select the LDF file & click on Open.

Note:The Software easily reads multiple .ldf files of a database. For this, you just need to add primary .ldf file of the database and it will auto fetch the transaction logs of all associated .ldf files.
select log file
STEP 7

Note: The software will auto detect the corresponding MDF file only if it is saved at the same location.

User can Check Get all Login\User names checkbox if you want to identify who has done the transaction (Optional). For this you need to provide the Login Credentials (Server Name, User Name and Password).

get all user name
STEP 8

A prompt up window will open saying Scanning completed successfully.

scanning completed successfully
STEP 9

Now view scanning details and click on Ok button.

view scanning details
STEP 10

Click on Save if you want to save scanned file into .str file format.

save scanned file
STEP 11

Save the the .str file into desired location.

save .str file to desired location
STEP 12

Preview of log file data.

preview log data
STEP 13

Select a Table and preview / analyze the log file.

analyze-sql-server-log-data
STEP 14

Arrange the transaction attributes upside-down or vice versa to sort them in an ascending / descending order accordingly:

sort-elements-according-to-transaction
STEP 15

You can sort the information of transactions by Login Name.

sort according to login name
STEP 16

You can sort the table fields according to the transaction time:

sort-elements-according-to-time
STEP 17

Sort Log file according to Table Name

sort-elements-according-to-table-name
STEP 18

Sort details according to Transaction Name:

sort-elements-according-to-transaction-name
STEP 19

Preview the row of selected transaction:

preview-the-row-of-selected-transaction
STEP 20

After selecting the table(s), click on Export button from the software menu:

export-log-report
STEP 21

Select Insert, Update, and/or Delete record using check boxes, and apply filter on the transaction type to be exported.

apply-filter-options
STEP 22

Similarly, apply "Date Filter" to export records of a selected date range.

apply-date-filter
STEP 23

Choose Export Type to Save Records:

  1. SQL Server Database: For SQL Server Database you need to provide server credentials: Server Name, Database Name, and Username & Password.
  2. SQL Server Compatible SQL Scripts: Select a location on your machine to save transactions as .sql file.
  3. CSV: Similarly, select a folder or path on the local machine to save Log File as a CSV file.
Export Options
STEP 24

Enter Database credentials: choose Server Name by clicking on drop down arrow & Authentication type. If you are using SQL Server Authentication then fill the appropriate User Name & Password.

enter database credentials
STEP 25

Select the destination database to export On: Create New Database or Export to Existing Database. Then, Provide the Database Name, If you want to save as Create New Database and Click on Export

enter database credentials
STEP 26

Select SQL Server Compatible SQL Scripts, if you want to export as a .sql script format.

destination-location
STEP 27

Now browse and select a location for saving the output.

destination-location
STEP 28

Select the destination location and click OK:

choose-location
STEP 29

Click on Export button to begin the process:

start-export-process
STEP 30

Once the export process completes, click OK on the pop up window notifying the same.

export-ldf-data-completed-successfully
STEP 31

Take a look at the complete status report.

complete-status-report-of-ldf-data
STEP 32

After Exporting Log File navigate to the location where you have saved the file after conversion:

exported-log-files
STEP 33

Select CSV File Format if you want to export as .csv file.

exported-log-files-to-csv
STEP 34

Browse and select the location for saving the output file.

export-as-csv
STEP 35

Choose destination path and click OK.

exported-log-files
STEP 36

Now, click on Exportto begin the process.

click export
STEP 37

Once export process is completed, click OK.

exported-files
STEP 38

Now, look at the complete export report.

click export

Free Download SQL Server Recovery Manager Tool Download Now