ApexSQL Audit includes the capability to reverse audited transactions down to the cell level. To open the form click on "Undo Transaction" from the Outlook Bar, Audit Menu or Toolbar as shown here:
|
|
|
|

|
Button |
Description |
|
|
Searches for the transactions that match your filter criteria. |
|
|
|
|
|
Reverses the selected transactions you make. |
|
|
|
|
|
Displays the help file. |
|
|
|
|
|
Exits the dialog. |
|
|
|
|
See Also:
For information about the context menu commands, click here.
|
The Undo Transaction module is structured in 4 steps.

Use the Filter criteria to select a subset of transactions. These are individual database operations that may affect one or more rows. You can filter by any number of criteria including the date the operation was executed, table, user, application, computer and action.
Table Name: You may chose to search for only one table. It can be used to narrow the search criteria.
Modified By: Designates the user who made the change.
Host: This is the computer on which the database operation was initiated.
Application: This is the Application through which the database operation was performed. Examples are Visual Basic, Query Analyzer and SQL Enterprise manager.
From Date and To Date: Allows the user to select actions within, greater than or less than specific dates.
Action: Can be Update, Insert or Delete. If you don't select this option will return all actions.
To search for the transactions that match your filter criteria simply hit
button.
|
FAQ: What is a transaction in the context of ApexSQL Audit UnDo?
A transaction is any atomic database operation against an audited table. A transaction may affect one or more row and originate from any SQL Server client.
|
Examples of transactions are as follows:
1) "Delete From MyTable" executed in Query Analyzer
2) Editing a row in Enterprise Manager that changes the value of a cell
The following graphic illustrates some transactions including batch updates, deletes and individual inserts.

Now that you have filtered out a subset of transactions you can select the transactions you wish to reverse. ApexSQL Audit provides the granularity to reverse transactions at the row and cell level if you don't want to reverse the entire transaction. We refer to Row and Cell level as the Transaction's Data.
|
FAQ: What is the Transaction's Data?
Each Transaction affects at least one row of data. Each row of data consists of at least one Cell, meaning the point of data for a particular row in a particular field.
|
The "Transaction's Data" grid will display all of the cells for all of the affected rows. If only one row is affected then only the affected cells in that row will be displayed. If more than one row is affected then all of the affected cells for all of the affected rows will be affected.
The following graphic illustrates the Cell level data for a particular Insert. Each row in this grid represents the data for a particular field affected by the inserted row, where the row level insert and field intersect is a referred to here as a Cell.
|
FAQ: Does ApexSQL Audit have the ability to rollback changes on multiple related tables at once?
No. The Undo procedure of ApexSQL Audit does not track data related to the transaction. Data that will be reversed by the Undo functionality will only undo one transaction.
|

|
See Also:
For information about the context menu commands, click here.
|
Once you have selected the transactions you want to reverse click
. A preliminary analysis will be conducted as to the feasibility of the UnDo transaction and a report will be displayed.

Key Information
UnDo Status: Doable = this UnDo is possible, Undoable = this UnDo is not possible. Note Comment field for explanation.
The Cardview control on the right is just a vertical representation of the row you have currently selected. This offers a more convenient view of the row's data.
The UnDo operations are executed as soon as you click
in the above step but within a transaction. This allows you to view the results via the following interface and provides an opportunity to Rollback the transaction thus cancelling the entire UnDo operation.
If you choose Commit, the undo operation will be committed against the database and the original transactions will be undone.

We recommend auditing identity fields along with others to avoid problems in incorrect undoing. Incorrect undoing would if you try to undo deleted rows, the identity fields will get new values instead of ones that were before delete. If other data reference to them then the undo procedure will not work correctly.
By default we exclude primary key, row key fields and BLOB fields to reduce amount of storage data. But you can change this behavior. See more information here.
The table below contains the commands in the context menus of the two grids above:
|
Item |
Description |
|
Check All Transactions |
This will select all transactions in the grid. |
|
|
|
|
Uncheck All Transactions |
This will deselect all transactions in the grid. |
|
|
|
|
Check All Data Elements For This Transaction |
This will check all data elements for the selected transaction. |
|
|
|
|
Uncheck All Data Elements For This Transaction |
This will un-check all data elements for the selected transaction. |
|
|
|
|
Check All |
This will select all transaction's data. |
|
|
|
|
Uncheck All |
This will deselect all transaction's data. |
|
|
|
Copyright © 2008 ApexSQL LLC. All Rights Reserved.