xSession::setSysTraceActive Method [AX 2012]

Switches system tracing on or off.

client server public static void setSysTraceActive(boolean nValue)

Run On

Called

Parameters

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

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); 
}
Show: