SYSSTMT catalog table

The SYSSTMT table contains one or more rows for each SQL statement of each DBRM. The schema is SYSIBM.

Table 1. SYSIBM.SYSSTMT table column descriptions
Column name Data type Description Use
NAME
VARCHAR(24)
NOT NULL
Name of the DBRM. G
PLNAME
VARCHAR(24)
NOT NULL
Name of the application plan. G
PLCREATOR
VARCHAR(128)
NOT NULL
Authorization ID of the owner of the application plan. G
SEQNO
INTEGER
NOT NULL
Sequence number of this row with respect to a statement of the plan.Rows in which the values of SEQNO, STMTNO, and SECTNO are zero are for internal use. The numbering starts with zero. G
STMTNO
SMALLINT
NOT NULL
The statement number of the statement in the source program. A statement number greater than 32767 is stored as zero. If the value is zero, see STMTNOI for the statement number. Rows in which the values of SEQNO, STMTNO, and SECTNO are zero are for internal use. G
SECTNO
SMALLINT
NOT NULL
The section number of the statement. Rows in which the values of SEQNO, STMTNO, and SECTNO are zero are for internal use. G
IBMREQD
CHAR(1)
NOT NULL
A value of Y indicates that the row was provided with the Db2 product code. For all other values, see Release dependency indicators.

The value in this field is not a reliable indicator of release dependencies.

G
TEXT
VARCHAR(3800)
NOT NULL
FOR BIT DATA
Text or portion of the text of the SQL statement. S
ISOLATION
CHAR(1)
NOT NULL WITH
DEFAULT
Isolation level for the SQL statement:
R
RR (repeatable read)
T
RS (read stability)
S
CS (cursor stability)
U
UR (uncommitted read)
L
RS isolation, with a lock-clause
X
RR isolation, with a lock-clause
blank
The WITH clause was not specified on this statement. The isolation level is recorded in SYSPACKAGE.ISOLATION and in SYSPLAN.ISOLATION.
G
STATUS
CHAR(1)
NOT NULL WITH
DEFAULT
Status of binding the statement:
A
Distributed - statement uses Db2 private protocol access. The statement will be parsed and executed at the server using defaults for input variables during access path selection.
B
Distributed - statement uses Db2 private protocol access. The statement will be parsed and executed at the server using values for input variables during access path selection.
C
Compiled - statement was bound successfully using defaults for input variables during access path selection.
D
Distributed - statement references a remote object using a three-part name. Db2 will implicitly use DRDA access either because the DBPROTOCOL bind option was not specified (defaults to DRDA), or the bind option DBPROTOCOL(DRDA) was explicitly specified. This option allows the use of three-part names with DRDA access but it requires that the package be bound at the target remote site.
E
Explain - statement is an SQL EXPLAIN statement. The explain is done at bind time using defaults for input variables during access path selection.
F
Parsed - statement did not bind successfully and VALIDATE(RUN) was used. The statement will be rebound at execution time using values for input variables during access path selection.
G
Compiled - statement bound successfully, but REOPT is specified. The statement will be rebound at execution time using values for input variables during access path selection.
H
Parsed - statement is either a data definition statement or a statement that did not bind successfully and VALIDATE(RUN) was used. The statement will be rebound at execution time using defaults for input variables during access path selection. Data manipulation statements use defaults for input variables during access path selection.
I
Indefinite - statement is dynamic. The statement will be bound at execution time using defaults for input variables during access path selection.
S
STATUS  
J
Indefinite - statement is dynamic. The statement will be bound at execution time using values for input variables during access path selection.
K
Control - CALL statement.
L
Bad - the statement has some allowable error. The bind continues but the statement cannot be executed.
M
Parsed - statement references a table that is qualified with SESSION and was not bound because the table reference could be for a declared temporary table that will not be defined until the package or plan is run. The SQL statement will be rebound at execution time using values for input variables during access path selection.
blank
The statement is non-executable, or was bound in a Db2 release prior to Version 5.
 
ACCESSPATH
CHAR(1)
NOT NULL WITH
DEFAULT
For static statements, indicates if the access path for the statement is based on user-specified optimization hints. A value of 'H' indicates that optimization hints were used. A blank value indicates that the access path was determined without the use of optimization hints, or that there is no access path associated with the statement.

For dynamic statements, the value is blank.

G
STMTNOI
INTEGER
NOT NULL WITH
DEFAULT
If the value of STMTNOI is not zero, the column contains the statement number of the statement in the source program. G
SECTNOI
INTEGER
NOT NULL WITH
DEFAULT
The section number of the statement. G
EXPLAINABLE
CHAR(1)
NOT NULL WITH
DEFAULT
Contains one of the following values:
Y
Indicates that the SQL statement can be used with the EXPLAIN function and might have rows describing its access path in the owner.PLAN_TABLE.
N
Indicates that the SQL statement does not have any rows describing its access path in the owner.PLAN_TABLE.
blank
Indicates that the SQL statement was bound prior to Version 7.
G
QUERYNO
INTEGER
NOT NULL WITH
DEFAULT –1
The query number of the SQL statement in the source program. SQL statements bound prior to Version 7 have a default value of –1. Statements bound in Version 7 or later use the value specified on the QUERYNO clause on SELECT, UPDATE, INSERT, DELETE, EXPLAIN, and DECLARE CURSOR statements. If the QUERYNO clause is not specified, the query number is set to the statement number. G
PLCREATORTYPE
CHAR(1)
NOT NULL WITH
DEFAULT
Indicates the type of creator:
blank
Authorization ID
L
Role
G