You can use Sybase Central or the Log Translation utility (dbtran) to retrieve audit information from the transaction log. Before attempting to retrieve audit information, ensure that you are connected to your database as a user with DBA, Remote, or Backup authority.
To retrieve auditing information (Sybase Central)
Select the database.
Click the Auditing tab.
Click Retrieve Audit Messages.
A window appears displaying the dbtran messages. Ignore the warning about chronological ordered output.
The auditing information appears on the Auditing tab in the right pane.
Use the filter options to control which audit information you want to display.
You can choose to display all audit information, or to show only errors, or only audit messages containing the text you specify.
Select an entry in the audit entries table to display details about the entry.
To retrieve up-to-date auditing information, press F5, and then follow all of the previous steps.
For more information, see Auditing example.
You can access the dbtran utility from Sybase Central or from a command prompt. The dbtran utility uses the specified transaction log to produce a SQL script that contains all of the transactions, along with some information about what user executed each command. By using the -g option, dbtran includes more comments containing the auditing information. The -g option is equivalent to specifying the following options:
-d Display output in chronological order.
-t Include trigger-generated operations in the output.
-a Include rolled back transactions in the output.
For more information about these options, see Log Translation utility (dbtran).
You can run the dbtran utility against a running database server or against a database log file.
To retrieve auditing information from a running database server
With the database server running, run the following command:
dbtran -g -c connection-string -n SQL-file
dbtran -g -c "UID=DBA;PWD=sql" -n demo.sql
A readable version of the transaction log is saved to your current directory. In the example, the auditing information is saved to the demo.sql file, and the file contains information about the sample database.
For more information about connection strings, see Connection parameters.
To retrieve auditing information from a transaction log file
Shut down the database server to ensure the transaction log file is available.
Run the following command:
dbtran -g transaction-log SQL-file
dbtran -g demo.log demo.sql
In the example, the auditing information from the transaction log file demo.log is placed into the file demo.sql.
For more information, see Log Translation utility (dbtran).
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|