Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Database Administration » User and database security » Data security » Database activity audits

 

Retrieving auditing information (dbtran utility)

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.

Prérequis

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.

Contexte et remarques

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.

 Task
  1. Connect to the database.

  2. 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:

    dbtran -g -c connection-string -n SQL-file
    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

Résultat

Auditing information is retrieved and saved in a SQL script file.

Exemple

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

 See also