Default language.

Viewing database audit records


The database SQL log is similar to the filter log, but the SQL log file consists of a series of SQL commands (one per line), each of which contains the information listed in Log-entry-format. In this case, the log type is (<SQL>), which identifies the entry as an SQL logging line. By default, the log file is named arsql.log.

Note

This mode of debugging can generate a large amount of information quickly. It is not unusual to have several hundred megabytes of information logged in one day.

If the server is licensed for full text search, the SQL debug mode also logs full text search (FTS) searches in this file. 

SQL log file: sample section


<SQL > <TID: 0000000620> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:28.8280 */SQL Trace Log -- ON
<SQL > <TID: 0000002064> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:29.1560 */CONNECT ARSystem, USER ARAdmin
<SQL > <TID: 0000002064> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:30.5780 */SET CONCAT_NULL_YIELDS_NULL OFF
<SQL > <TID: 0000002064> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:30.5780 */OK
<SQL > <TID: 0000002064> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:30.5780 */SELECT @@version
<SQL > <TID: 0000002064> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:30.5780 */OK
<SQL > <TID: 0000002064> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:31.0000 */SELECT dbVersion FROM control
<SQL > <TID: 0000002064> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:31.3900 */OK
<SQL > <TID: 0000002064> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:31.3900 */SELECT MAX(serverId) FROM server_cache
<SQL > <TID: 0000002064> <RPC ID: 0000000000> <Queue: Admin >
<Client-RPC: 000000 > <USER: > /* Wed Oct 04 2006 13:18:31.7500 */OK

The SQL log file includes an "OK" line that displays the end time for each transaction that is logged.

If an SQL error or warning is encountered as a result of the command, the command is followed by another line with the same header, but the SQL command is replaced with *** ERROR *** or **** WARNING ****. The text of the error or warning from the database follows. This information associates an operation with the user who performed the operation, and is useful for identifying database issues.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*