SQL log


The 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 the Log-entry-format.

 By default, the log file is named arsql.log. Each line of a plug-in log file begins with <SQL>, which identifies the entry as an SQL logging line.

Important

This mode of debugging can quickly generate a large amount of information. 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 FTS searches in this file.

The following example shows a portion of an SQL log file:

<SQL > <TrID: Ycc4EXa4Q_2u8fKTGcAcOg:0000064> <TID: 0000000400> <RPC ID: 0000001731> <Queue: Fast      > <Client-RPC: 390620   > <USER: Demo                                         > <Overlay-Group: 1         > /* Tue Oct 13 2015 22:37:46.9640 */ SQL Trace Log -- ON (AR Server 9.0.01 201508191530)
<SQL > <TrID: Ycc4EXa4Q_2u8fKTGcAcOg:0000064> <TID: 0000000400> <RPC ID: 0000001731> <Queue: Fast      > <Client-RPC: 390620   > <USER: Demo                                         > <Overlay-Group: 1         > /* Tue Oct 13 2015 22:37:47.0030 */ SELECT T6.C1, T6.C7, T6.C8, T6.C179, T6.C3200, T6.C3201, T6.C3202, T6.C3209, T6.C3210 FROM T6 WHERE (T6.C179 = N'CPGAA5V0HGRO2ANWH3FCAAABEALG97') ORDER BY T6.C1 ASC
<SQL > <TrID: Ycc4EXa4Q_2u8fKTGcAcOg:0000064> <TID: 0000000400> <RPC ID: 0000001731> <Queue: Fast      > <Client-RPC: 390620   > <USER: Demo                                         > <Overlay-Group: 1         > /* Tue Oct 13 2015 22:37:47.0050 */ OK
<SQL > <TrID: Ycc4EXa4Q_2u8fKTGcAcOg:0000064> <TID: 0000000400> <RPC ID: 0000001731> <Queue: Fast      > <Client-RPC: 390620   > <USER: Demo                                         > <Overlay-Group: 1         > /* Tue Oct 13 2015 22:37:47.0100 */ SELECT T7.C3207, T7.C1 FROM T7 WHERE (T7.C3206 = N'CIGAA5V0HGRO2ANWH3FDAAABECLGLE') ORDER BY T7.C1 ASC
<SQL > <TrID: Ycc4EXa4Q_2u8fKTGcAcOg:0000064> <TID: 0000000400> <RPC ID: 0000001731> <Queue: Fast      > <Client-RPC: 390620   > <USER: Demo                                         > <Overlay-Group: 1         > /* Tue Oct 13 2015 22:37:47.0110 */ OK
<SQL > <TrID: Ycc4EXa4Q_2u8fKTGcAcOg:0000064> <TID: 0000000400> <RPC ID: 0000001731> <Queue: Fast      > <Client-RPC: 390620   > <USER: Demo                                         > <Overlay-Group: 1         > /* Tue Oct 13 2015 22:37:47.0150 */ UPDATE T6 SET T6.C3209 = 1444819067, T6.C5 = N'Demo', T6.C6 = 1444819067 WHERE (T6.C1 = N'000000000000201')
<SQL > <TrID: Ycc4EXa4Q_2u8fKTGcAcOg:0000064> <TID: 0000000400> <RPC ID: 0000001731> <Queue: Fast      > <Client-RPC: 390620   > <USER: Demo                                         > <Overlay-Group: 1         > /* Tue Oct 13 2015 22:37:47.0170 */ 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 *** along with an error or warning message. The message also 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*