RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSession.TraceFlags Property

Specifies the database operations to track with the SQL Monitor at runtime.

Pascal
property TraceFlags: TTraceFlags;
C++
__property TTraceFlags TraceFlags;

Use TraceFlags to specify which database operations the SQL Monitor should track in an application at runtime. TraceFlags is only meaningful for the SQL Monitor, which is provided to enable performance tuning and SQL debugging when working with remote SQL database servers.

Note: Normally trace options are set from the SQL Monitor rather than setting TraceFlags in application code.
The value of a session component's TraceFlags property determines the initial settings of the TraceFlags property for database components associated with the session. 

The TTraceFlags type defines the individual values that can be included in the TraceFlags property. The following table summarizes those values:

Values 
Meaning 
tfQPrepare  
Monitor Prepare statements.  
tfQExecute  
Monitor ExecSQL statements.  
tfError  
Monitor server error messages. Such messages may include an error code.  
tfStmt  
Monitor all SQL statements.  
tfConnect  
Monitor database connect and disconnect operations, including allocation of connection handles, and freeing connection handles.  
tfTransact  
Monitor transaction statements, such as StartTransaction, Commit, and Rollback.  
tfBlob  
Monitor operations on blob data types.  
tfMisc  
Monitor any statements not covered by other flag options.  
tfVendor  
Monitor direct API function calls to the database server.  
tfDataIn  
Monitor data received from a server.  
tfDataOut  
Monitor data sent to a server.  

Because TraceFlags is a set property, an application can specify different combinations of flags to monitor different combinations of statements. For example, the following statement limits monitoring to database connections and SQL statement preparation:

TraceFlags := [tfConnect, tfQPrepare];

 

TraceFlags << tfConnect << tfQPrepare;

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!