-zr server option

Enables request logging of operations.

Syntax
{ dbsrv11 | dbeng11 } -zr { SQL | HOSTVARS | PLAN | PROCEDURES | TRIGGERS | OTHER | BLOCKS | REPLACE | ALL | YES | NONE | NO } ...
Applies to

All operating systems and database servers.

Remarks

This option should only be used when tracking problems. The information appears in the database server messages window or is sent to the request log.

The values for -zr return the following types of information:

  • SQL   enables logging of the following:

    • START DATABASE statements
    • STOP DATABASE statements
    • STOP ENGINE statements
    • Statement preparation and execution
    • EXECUTE IMMEDIATE statement
    • Option settings
    • COMMIT statements
    • ROLLBACK statements
    • PREPARE TO COMMIT operations
    • Connects and disconnects
    • Beginnings of transactions
    • DROP STATEMENT statements
    • Cursor explanations
    • Cursor open, close, and resume
    • Errors

  • PLAN   enables logging of execution plans (short form). Execution plans for procedures are also recorded if logging of procedures (PROCEDURES) is enabled.

  • HOSTVARS   enables logging of host variable values. If you specify HOSTVARS, the information listed for SQL is also logged.

  • PROCEDURES   enables logging of statements executed from within procedures.

  • TRIGGERS   enables logging of statements executed from within triggers.

  • OTHER   enables logging of additional request types not included by SQL, such as FETCH and PREFETCH. However, if you specify OTHER but do not specify SQL, it is the equivalent of specifying SQL+OTHER. Including OTHER can cause the log file to grow rapidly and could negatively impact server performance.

  • BLOCKS   enables logging of details showing when a connection is blocked and unblocked on another connection.

  • REPLACE   at the start of logging, the existing request log is replaced with a new (empty) one of the same name. Otherwise, the existing request log is opened and new entries are appended to the end of the file.

  • ALL   logs all supported information. This setting is equivalent to specifying SQL+PLAN+HOSTVARS+PROCEDURES+TRIGGERS+OTHER+BLOCKS. This setting can cause the log file to grow rapidly and could negatively impact server performance.

  • NO or NONE   turns off logging to the request log.

Once the database server is started, you can change the request log settings to log more or less information using the sa_server_option system procedure. See sa_server_option system procedure.

You can find the current value of the RequestLogging setting using the following query:

SELECT PROPERTY( 'RequestLogging' );
See also