Documentation

SQL Operations Guide

Previous Topic

Next Topic

SYSLOG

SYSLOG <option>

The FairCom DB Server maintains two system files, SYSLOGDT.FCS and SYSLOGIX.FCS, for recording system events. Unlike the CTSTATUS.FCS file, the system log files can be encrypted such that entries cannot be added, deleted, or modified with a simple text editor, and vendors can add application-specific entries to the log.

The System Event Log contents are entered as pairs in the form of: SYSLOG <keyword>. As many of these pairs as desired may be used at the direction of your vendor. Current SYSLOG options include:

ADMIN_API

CTSTATUS

DELETE_FILE

DISABLE_API

DYNAMIC_DUMP

ENCRYPT

USER_INFO

NONE

LOGFAIL_PURGE

LOGFAIL_CTSTATUS

LOGFAIL_TERMINATE

SQL_STATEMENTS

Refer to the Server System Event Log section for complete details of all SYSLOG feature options available.

Note: Build 210901 and earlier had a 4GB limit to the SYSLOG files. It is highly recommended to limit information recorded in this file in high volume systems, and include the LOGFAIL_PURGE option to clear data as the file grows. Builds after 210901 no longer have a 4GB file size limit.

History

  • V11.8 and later support SQL_STATEMENTS for detailed statement logging.
  • V11.8. and later support auditing SQL logon/logoff events with USER_INFO.

Previous Topic

Next Topic

SYSLOG SQL_STATEMENTS Configuration Keyword

This configuration keyword logs executed SQL statements in SYSLOG:

SYSLOG SQL_STATEMENTS

A SYSLOG SQL_STATEMENTS (SYSLOG, SYSLOG) log entry is written after statement execution so it can also include the error code (if any).

The variable part of the SYSLOG entry contains statement information in JSON format similar to SQL_DEBUG LOG_STMT (SQL_DEBUG LOG_STMT, SQL_DEBUG LOG_STMT). (SQL_DEBUG LOG_STMT, SQL_DEBUG LOG_STMT)

Below is a sample showing how it is displayed by the ctalog utility:

Class = 16 (SQL)

Event = 1 (SQL statement)

Date = 09/24/2020

Time = 17:40:11

Sequence number = 37

Error code = -20005

User ID = 'admin'

Node name = 'isql'

Variable-length information:

---------------------------------------------------

{"timestamp":"Tue Sep 24 17:40:27 2020","ipaddr":"127.0.0.1","db":"CTREESQL","user":"admin","thread":29,"statement":"select * from missingtable"}

---------------------------------------------------

TOCIndex