SET PRO_CONNECT LOG

Controls logging for the current SQL Server connection.

Syntax

SET PRO_CONNECT LOG [ ON | OFF ][ WITH ({ERROR ONLY, STATEMENT, INOUT, QUERY_PLAN, PRO_TABLESCAN_EVENT, ALL })]

[[AND] WITH LEVEL 1|LEVEL 2|LEVEL 3|LEVEL 4];

Parameters

ON

Indicates that logging is turned on.

OFF

Indicates that logging is turned off.

ERROR ONLY
Indicates that error tracing information is written to each log file.
STATEMENT
Indicates that statement tracing information is written to each log file.
QUERY_PLAN

Indicates that query plan information is written to the log file.

INOUT
Logs information to the output server log about the following:
  • Input LOB data and LOB locator information
  • Output LOB data
  • Output parameters for statements like the select list for the SELECT statement
PRO_TABLESCAN_EVENT
Information about tables on which table scan took place in the query.
ALL

It enables logging behavior for all other supported parameters such as STATEMENT, INOUT, QUERY_PLAN, and PRO_TABLESCAN_EVENT.

Log Level

The level of detail in the log entry depends on the level of logging that is chosen. Level 1 logs the most basic and most important information. Level 2 adds more details, and Level 3 adds still more details. Level 4 adds detailed information about connection events, when the client connects to SQL and to the database.

Notes

  • When logging is set ON, the current SQL connection begins logging to a file named as SQL_server_<server-id>_<thread-id>_<yyyymmdd>_<hhmmss>_<A/B>.log.

    For example: SQL_connection_1_14643_20180425_043722_A.log

  • The server-id corresponds to the server ID shown in database_name.log.
  • Logging files are created in the location from where you execute the proserve command.
  • The maximum size of each logging file is 500 MB. When SQL_server_<server-id>_<thread-id>_<yyyymmdd>_<_<hhmmss>_<A>.log reaches 500 MB, the OE SQL Server logs a message indicating the file was closed due to reaching the maximum size. After this message is written, the OE SQL server ceates another file with suffix ‘_B’ and writes into it. For every recurrence of 500 MB limit, the file contents are overwritten in a round-robin way between these two files.
  • When logging commences to a new file, the file contents begin with information about the SQL Server environment, including:
    • Environment variable settings
    • Logging the options passed while enabling the server log
    • Logging control values (such as size limits)
    • The SQL Server process ID
  • Each section of information written to the log file begins with the string
  • YYYYMMMDD_HH:MM:SS < user-id >:

    For example, 120180425_050934 37825: