xSession::getSysTraceActive Method
Enables you to determine whether system tracing is turned on for the session.
Syntax
client server public static boolean getSysTraceActive()
Run On
Called
Return Value
Type: boolean
true if system tracing is active; otherwise, false.
Remarks
To turn on system tracing, use xSession::setSysTraceActive.
Examples
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);
}