Querying Traces

The trace query commands tell you which trace components and levels are either activated or deactivated for every component. Be aware that these commands may show a voluminous amount of information that does not pertain to the components in which you are interested.

To list all of the trace level/component combinations currently active, issue the following command:

SET TRACEON = ?

To list all of the trace level/component combinations not currently active, issue the following command:

SET TRACEOFF = ?

Top of page

Example: Querying Traces

The following command queries the active traces. None are activated:

>  > set traceon = ?
Name     Level Description                       Set  Comp.ID
>  >

The next commands activate the SQLCALL and STMTRACE traces:

SET TRACEON = SQLCALL//CLIENT
SET TRACEON = STMTRACE//CLIENT

Now, issuing the query command generates a list of all active trace components:

>  > set traceon = ?
Name     Level Description                       Set  Comp.ID
STMTRACE  1    SQL/MDX Generated Statement Trace             
STMTRACE  2    SQL/MDX Generated Substatement Trc            
SQLCALL   1    SQL Call to Physical Layer                    

Information Builders