Compartir a través de


xSession.setSysTraceActive(Boolean) Method

Definition

Switches system tracing on or off.

public:
 static void setSysTraceActive(bool _nValue);
public static void setSysTraceActive (bool _nValue);
static member setSysTraceActive : bool -> unit
Public Shared Sub setSysTraceActive (_nValue As Boolean)

Parameters

_nValue
Boolean

A Boolean value that determines whether tracing should be switched on or off. Set to true to switch tracing on.

Remarks

The following example uses the setSysTraceActive method to turn system tracing off when data is imported.

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