Bde.DBTables.TSession.TraceFlags
Delphi
property TraceFlags: TTraceFlags read FTraceFlags write SetTraceFlags;
C++
__property TTraceFlags TraceFlags = {read=FTraceFlags, write=SetTraceFlags, nodefault};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Bde.DBTables.pas Bde.DBTables.hpp |
Bde.DBTables | TSession |
Description
Specifies the database operations to track with the SQL Monitor at runtime.
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;