Applies to
ApexSQL Log
Summary
This article provides information about exporting options available in ApexSQL Log.
Description
The information exported are operation details and transaction information, as shown in appropriate panes for each grid row.
In case of DDL operation, the Operation details pane shows:
- Begin time
- Operation
- Schema
- Object
- Username
- End time
- Transaction ID, and
- LSN
In case of INSERT and DELETE operations, the Operation details pane shows:
- Field name
- Field type
- Field value
In case of UPDATE operations, the Operation details pane shows:
- Field name
- Field type
- Field old value, and
- Field new value
The Transaction information pane shows:
- Begin time
- State
- Operation
- Schema
- Object
- Parent schema
- Parent object
- User
- User ID
- End time
- Transaction name
- Transaction ID
- Transaction duration
- LSN
- SPID
- Page ID
- Slot ID
- Previous LSN
ApexSQL Log provides several export formats accessible via the Export option in the Home tab in the menu.
Additionally, all of the exporting options are available in the Export results and Create Before-after report options, in the last step of the session wizard.
SQL script
The Export to SQL script option generates a T-SQL script which inserts the transaction information into the APEXSQL_LOG_OPERATION table and the operation details in the APEXSQL_LOG_OPERATION_DETAIL table. The script can be executed against any database you decide to use as a repository. The script creates required tables if they do not exist in the database.
SQL bulk script
The Export to SQL bulk option generates a T-SQL script that utilizes the bulk INSERT method for importing data. This method processes large volumes of information more quickly than the standard INSERT method, but the result is the same as with the previously described SQL script option.
HTML file
The Export to HTML option generates an HTML report containing all transaction information and operation details.
XML file
The Export to XML option creates a report file with transaction information and operation details in XML format.
Comma Separated Value (CSV) file
CSV files generated by ApexSQL Log have the following format:
- All values separated by commas are in double quotes
- If a value contains a double quote, then a pair of consecutive double quotes represents the double quote
- For each INSERT or DELETE operation, there are two rows in the CSV file; a header row with the transaction information and column names, and a second row with the corresponding values
- For each UPDATE operation, there is a header row with transaction information, row clustered index column names and affected field names, two lines with clustered index field values, and before/after field values
Database export
The Export to database option is similar to the Export to SQL script option, and exports data directly to the chosen database into the APEXSQL_LOG_OPERATION table and the operation details in the APEXSQL_LOG_OPERATION_DETAIL table which are automatically created if they do not exist in the database already.
Before-after report
The Before-after report can be created in any of the previously described formats. The result of this action is a report and appropriate information on values before the change has occurred and after it was committed.