set sql tracing session argument: Control tracing for a session (SQL administration API)

Use the set sql tracing session argument with the admin() or task() function to change SQL tracing for the current session.

Syntax

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

                                                 .-,"current_session_id"-.   
>--(--"set sql tracing session"--,--+-"clear"-+--+-----------------------+-->
                                    +-"off"---+  '-,--"session_id"-------'   
                                    '-"on"----'                              

>--)--;--------------------------------------------------------><

Element Description Key Considerations
current_session_id The ID of the current session. This is the default session ID.  
session_id The ID of the session to which this command applies.  

Usage

Use the clear argument to clear any global tracing overrides. The session will conform to the global tracing policy.

Use the off argument to turn off tracing for the session, even if the global tracing policy is set to enable tracing.

Use the on argument to turn on tracing for the session, even if the global tracing policy is set to disable tracing.

Example

The following example stops tracing for the current session:
EXECUTE FUNCTION task("set sql tracing session","off");

Copyright© 2019 HCL Technologies Limited