The SYSPACKSTMTCOPY table records statement-level information for the non-current package copies (previous, original, and phased-out). The schema is SYSIBM.
Table 1. SYSIBM.SYSPACKSTMTCOPY table column descriptions
Column name |
Data type |
Description |
Use |
LOCATION |
VARCHAR(128)
NOT NULL
|
Always contains blanks |
S |
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
|
Sequence number of the statement. |
G |
BINDERROR |
CHAR(1)
NOT NULL
|
Whether an SQL error was detected at bind time:
- N
- No
- Y
- Yes
|
G |
STATUS |
CHAR(1)
NOT NULL
|
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.
- O
- Compiled for acceleration. The static query was bound successfully for acceleration and will be routed to an accelerator when executed.
- blank
- The statement is non-executable.
|
|
ACCESSPATH |
CHAR(1)
NOT NULL
|
For static statements, indicates if the access path for the statement is based on user-specified optimization hints:
- H
- Optimization hints were used.
- A
- The access path was reused because of the APREUSE bind option.
- blank
- One of the following situations:
- The access path was determined without the use of hints, and a previous access path was not reused.
- No access path is associated with the statement.
- The statement is a dynamic SQL statement
|
G |
SECTNOI |
INTEGER
NOT NULL
|
The section number of the statement. For generated packages for SQL routines (such as procedures and user-defined functions) and for advanced triggers, a value of 1 indicates the control statement for the routine or advanced trigger. For basic trigger packages, a value of 1 indicates the WHEN clause for activating the trigger.
|
G |
EXPLAINABLE |
CHAR(1)
NOT NULL
|
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.
|
G |
STMT_ID |
BIGINT
NOT NULL
|
A statement identifier. |
G |
EXPANSION_REASON |
CHAR(2)
NOT NULL
|
For dynamic statements, this column is blank. For static statements, one of the following values to indicate the reason that an implicit query transformation occurred when the package was bound:
- A
- The statement was bound with implicit query transformation as a result of the SYSIBMADM.GET_ARCHIVE built-in global variable.
- B
- The statement was bound with implicit query transformation as a result of the CURRENT TEMPORAL BUSINESS_TIME special register.
- S
- The statement was bound with implicit query transformation as a result of the CURRENT TEMPORAL SYSTEM_TIME special register.
- SB
- The statement was bound with implicit query transformation as a result of the CURRENT TEMPORAL SYSTEM_TIME special register and the CURRENT TEMPORAL BUSINESS_TIME special register.
- blank
- One of the following occurred:
- The statement did not bind successfully and the VALIDATE(RUN) bind option was used.
- The statement was bound without implicit query transformation.
|
G |
QUERY_HASH |
CHAR(16) NOT NULL FOR BIT DATA |
The hash key for locating records in the SYSIBM.SYSQUERY catalog table. A '00'x value indicates that no hash key was generated for the SQL statement when the package was bound. |
G |
QUERY_HASH_
VERSION
|
INTEGER NOT NULL |
The hash version for locating records in the SYSIBM.SYSQUERY catalog table. A -1 value indicates that no hash version was generated for the SQL statement when the package was bound. |
G |
COPYID |
INTEGER
NO NULL
|
The copy ID of the package. |
G |
VALID |
CHAR(1) NULLABLE |
Whether the statement is valid:
- A
- An ALTER statement changed the description of the table or base table of a view referred to by the statement. The changes do not invalidate the statement. However, a rebind might be required for the statement to pick up the changes from the ALTER statement.
- N
- No
- Y
- Yes
|
G |