The dbtran utility uses the specified transaction log to produce a SQL script that contains all the transactions, and information about what user executed each command.
Prerequisites
You must have the BACKUP DATABASE system privilege to retrieve auditing information from a running database server. No privileges are required to retrieve auditing information from a database transaction log file.
Context and remarks
By using the -g database server option, dbtran includes additional comments containing auditing information. The -g option is equivalent to specifying the -d, -t, and -a database server options.
Connect to the database.
You can run the dbtran utility against a running database server or against a database transaction log file.
Option | Action | ||
---|---|---|---|
Retrieve auditing information from a running database server |
Run the following command:
|
||
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:
|
Example
In this example, the auditing information is saved to the demo.sql file, and the file contains information about the sample database.
dbtran -g -c "UID=DBA;PWD=sql;DBN=demo" -n demo.sql |
In the following example, the auditing information from the transaction log file demo.log is placed into the file demo.sql.
dbtran -g demo.log demo.sql |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0 |