sa_set_tracing_level system procedure

Initializes the level of tracing information to be stored in the diagnostic tracing tables.

Syntax
sa_set_tracing_level( 
level 
[, specified_scope
, specified_name ]
[, do_commit ]
)
Arguments
  • level   Use this INTEGER parameter to specify the level of diagnostic tracing to perform. Possible values include:

    • 0   Do not generate any tracing data. This level keeps the tracing session open, but does not send any tracing data to the diagnostic tracing tables.

    • 1   Sets a basic level of tracing.

    • 2   Sets a medium level of tracing.

    • 3   Sets a high level of tracing.

  • specified_scope   Use this optional LONG VARCHAR parameter to specify the tracing scope; for example, USER, DATABASE, CONNECTION_NAME, TRIGGER, and so on.

  • specified_name   Use this optional LONG VARCHAR parameter to specify the identifier for the object indicated in specified_scope.

  • do_commit   Use this optional TINYINT parameter to specify whether to commit, automatically, rows inserted by this procedure. Specify 1 (the default) to commit the rows automatically (recommended), and 0 to not commit them automatically.

Remarks

This procedure replaces the rows into the sa_diagnostic_tracing_level table, changing the tracing level and scope to the settings specified when calling the procedure.

Setting the level 0 does not stop the tracing session. Instead, the tracing session remains attached to the tracing database, but no tracing data is sent. The tracing session is still active when the level is 0.

This system procedure must be called from the database being profiled.

Permissions

DBA authority required

Side effects

None

See also
Examples

The following example sets the tracing level to 1. This means that the entire database will be profiled for performance counter data, as well as some samples of executed statements:

CALL sa_set_tracing_level( 1 );

The following example sets the tracing level to 3, and specifies the user AG84756. This means that only activities associated with AG84756 will be traced:

CALL sa_set_tracing_level( 3, 'user', 'AG84756' );