SYSIBM.SYSPACKSTMT db2 存储statement的表

SYSIBM.SYSPACKSTMT table

 

 

The SYSIBM.SYSPACKSTMT table contains one or more rows for each statement in a package.

Column nameData typeDescriptionUse
LOCATION
VARCHAR(128)
NOT NULL
Always contains blanksS
COLLID
VARCHAR(128)
NOT NULL
Name of the package collection.G
NAME
VARCHAR(128)
NOT NULL
Name of the package.G
CONTOKEN
CHAR(8)
NOT NULL
FOR BIT DATA
Consistency token for the package. This is either:
  • The "level" as specified by the LEVEL option when the package's program was precompiled
  • The timestamp indicating when the package's program was precompiled, in an internal format
S
SEQNO
INTEGER
NOT NULL
Start of changeNot used.End of changeG
STMTNO
SMALLINT
NOT NULL
The statement number of the statement in the source program. A statement number greater than 32767 is stored as zero1 or as a negative number2. If the value is zero, see STMTNOI for the statement number.G
SECTNO
SMALLINT
NOT NULL
The section number of the statement.2G
BINDERROR
CHAR(1)
NOT NULL
Whether an SQL error was detected at bind time:
N
No
Y
Yes
G
IBMREQD
CHAR(1)
NOT NULL
A value of Y indicates that the row came from the basic machine-readable material (MRM) tape. For all other values, see Release dependency indicators.

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

G
VERSION
VARCHAR(122)
NOT NULL
Version identifier for the package.G
Start of change End of changeStart of change
VARCHAR(3500)
NOT NULL WITH
DEFAULT
FOR BIT DATA
End of change
Start of changeInternal use only.End of changeStart of changeIEnd of change
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 (cont.) 
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.
Start of changeO End of change
Start of changeCompiled for acceleration. The static query was bound successfully for acceleration and will be routed to an accelerator when executed. End of change
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:
H
Optimization hints were used.
Start of changeA End of change
Start of changeThe access path was reused because of the APREUSE bind option. End of change
blank
One of the following situations:
  • Start of changeThe access path was determined without the use of hints, and a previous access path was not reused.End of change
  • No access path is associated with the statement.
  • The statement is a dynamic SQL statement
G
STMTNOI
INTEGER
NOT NULL WITH
DEFAULT
If the value of STMTNO is zero, the column contains the statement number of the statement in the source program. If both STMTNO and STMTNOI are zero, the statement number is greater than 32767.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, DECLARE CURSOR, or REFRESH TABLE statements. If the QUERYNO clause is not specified, the query number is set to the statement number.G
Start of changeROWIDEnd of changeStart of change
ROWID
NULL GENERATED
ALWAYS
End of change
Start of changeROWID column, created for the lob columns in this table.End of changeStart of changeGEnd of change
Start of changeSTMT_IDEnd of changeStart of change
BIGINT
NOT NULL
End of change
Start of changeA unique statement identifier.End of changeStart of changeGEnd of change
Start of changeSTATEMENTEnd of changeStart of change
CLOB(2M)
NOT NULL
WITH DEFAULT
End of change
Start of changeThe complete text for the SQL statement that the row represents.End of changeStart of changeGEnd of change
Start of change End of changeStart of change
BLOB(2M)
NOT NULL
WITH DEFAULT
End of change
Start of changeInternal use only.End of changeStart of changeIEnd of change
1 Rows in which the value of SEQNO, STMTNO, and SECTNO are zero are for internal use.
2 To convert a negative STMTNO to a meaningful statement number that corresponds to your precompile output, add 65536 to it. For example, -26472 is equivalent to +39064 (-26472 + 65536).

转载于:https://www.cnblogs.com/sthv/p/5563503.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值