Provides the most recently executed SQL text, or the SQL text currently executing. The maximum number of rows returned can be tuned with sql text pipe max messages.
Enable the enable monitoring configuration parameter for this monitoring table to collect data.
monSysSQLText is a historical monitoring table. See Performance and Tuning: Monitoring Tables.
The columns for monSysSQLText are:
Name |
Datatype |
Attributes |
Description |
---|---|---|---|
SPID |
smallint |
Session process identifier. |
|
InstanceID |
int |
(Cluster environments only) ID of an instance in a shared-disk cluster. |
|
KPID |
int |
Kernel process identifier. |
|
ServerUserID |
int |
Server user identifier (SUID) of the user who executed this SQL text. The ServerUserID matches the value in syslogins.suid. Use the suser_name function to obtain the corresponding name. |
|
BatchID |
int |
Unique identifier for the SQL batch containing the SQL text. |
|
SequenceInBatch |
int |
Indicates the position of this portion of SQL text within a batch (the SQL text for a batch may span multiple rows). |
|
SQLText |
varchar(255) |
Null |
SQL text. |
In many cases the text for a query spans multiple rows
in this table. Arrange rows in proper order by sorting on the SequenceInBatch column
in ascending order.