When you enable tracing for an individual transaction, TDSETSPT adds the transaction to a trace table, which can contain up to eight entries. For examples, see “Specific tracing example”.
When you disable tracing for a transaction, its position in the trace table becomes available for another transaction. If all eight positions are in use, you can trace more transactions only if you turn tracing off for one of the transactions in the list or set global tracing on.
You can query the trace table one of two ways:
Call TDINFSPT to determine if tracing is enabled for a specific transaction. You specify the transaction ID, and TDINFSPT returns the trace flag setting, or
Call TDLSTSPT to get a list of all transactions for which tracing is currently enabled. TDLSTSPT returns this list as an array.