Jaa


xSession.getSysTraceActive Method

Definition

Enables you to determine whether system tracing is turned on for the session.

public:
 static bool getSysTraceActive();
public static bool getSysTraceActive ();
static member getSysTraceActive : unit -> bool
Public Shared Function getSysTraceActive () As Boolean

Returns

true if system tracing is active; otherwise, false.

Remarks

To turn on system tracing, use xSession::setSysTraceActive.

The following example uses the getSysTraceActive method to determine the original setting for system tracing and to reset the setting after tracing is temporarily set to false.

server static void main(Args a) 
{ 
    SysDataImport sysDataImport; 
    boolean       sysTraceActive = xSession::getSysTraceActive(); 
    sysDataImport = SysDataImport::newTmpFilename(''); 
    sysDataImport.addTmpExpImpTable( 
        tablenum(SysTraceTableSQL), 
        false); 
    sysDataImport.addTmpExpImpTable( 
        tablenum(SysTraceTableSQLExecPlan), 
        false); 
    sysDataImport.addTmpExpImpTable( 
        tablenum(SysTraceTableSQLTabRef), 
        false); 
    xSession::setSysTraceActive(FALSE); 
    if (sysDataImport.prompt()) 
        sysDataImport.run(); 
    xSession::setSysTraceActive(sysTraceActive); 
}

Applies to