set sql user tracing argument: Set global SQL tracing for a user session (SQL administration API)

Use the set sql user tracing argument with the admin() or task() function to set the mode of global SQL tracing for a specified user session.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-EXECUTE FUNCTION--+-admin-+---------------------------------->
                     '-task--'   

>--(--+-"set sql user tracing clear"-+--,--"session_id"--)--;--><
      +-"set sql user tracing off"---+                          
      '-"set sql user tracing on"----'                          

Element Description Key Considerations
session_id The ID for the session.  

Usage

Use the set sql user tracing clear to clear user tracing flags for the specified user session so that it adheres to the global tracing policy.

Use the set sql user tracing off to disable SQL tracing for a user session even if the global mode is ON.

Use the set sql user tracing on to enable user SQL tracing for a user session. Even if the global tracing mode is OFF, SQL statements for this user session are traced.

Example

The following example starts tracing for the session with the ID of 18:
EXECUTE FUNCTION task("set sql user tracing on","18");

Copyright© 2019 HCL Technologies Limited