设为首页 收藏本站
查看: 973|回复: 0

[经验分享] SYSIBM.SYSPACKSTMT db2 存储statement的表

[复制链接]

尚未签到

发表于 2016-11-18 10:55:58 | 显示全部楼层 |阅读模式
SYSIBM.SYSPACKSTMT table



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

Column nameData typeDescriptionUseLOCATION

VARCHAR(128)
NOT NULLAlways contains blanksSCOLLID

VARCHAR(128)
NOT NULLName of the package collection.GNAME

VARCHAR(128)
NOT NULLName of the package.GCONTOKEN

CHAR(8)
NOT NULL
FOR BIT DATAConsistency 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
SSEQNO

INTEGER
NOT NULL DSC0000.gif Not used. DSC0001.gif GSTMTNO

SMALLINT
NOT NULLThe 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.GSECTNO

SMALLINT
NOT NULLThe section number of the statement.2GBINDERROR

CHAR(1)
NOT NULLWhether an SQL error was detected at bind time:NNoYYesGIBMREQD

CHAR(1)
NOT NULLA 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.
GVERSION

VARCHAR(122)
NOT NULLVersion identifier for the package.G

VARCHAR(3500)
NOT NULL WITH
DEFAULT
FOR BIT DATAInternal use only.IISOLATION

CHAR(1)
NOT NULL WITH
DEFAULT
Isolation level for the SQL statement:RRR (repeatable read)TRS (read stability)SCS (cursor stability)UUR (uncommitted read)LRS isolation, with a lock-clauseXRR isolation, with a lock-clauseblankThe WITH clause was not specified on this statement. The isolation level is recorded in SYSPACKAGE.ISOLATION and in SYSPLAN.ISOLATION.GSTATUS

CHAR(1)
NOT NULL WITH
DEFAULTStatus of binding the statement:ADistributed - 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.BDistributed - 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.CCompiled - statement was bound successfully using defaults for input variables during access path selection.DDistributed - 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.EExplain - statement is an SQL EXPLAIN statement. The explain is done at bind time using defaults for input variables during access path selection.FParsed - 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.GCompiled - statement bound successfully, but REOPT is specified. The statement will be rebound at execution time using values for input variables during access path selection.HParsed - 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.IIndefinite - statement is dynamic. The statement will be bound at execution time using defaults for input variables during access path selection.SSTATUS (cont.) JIndefinite - statement is dynamic. The statement will be bound at execution time using values for input variables during access path selection.KControl - CALL statement.LBad - the statement has some allowable error. The bind continues but the statement cannot be executed.MParsed - 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.OCompiled for acceleration. The static query was bound successfully for acceleration and will be routed to an accelerator when executed.blankThe statement is non-executable, or was bound in a DB2 release prior to Version 5. ACCESSPATH

CHAR(1)
NOT NULL WITH
DEFAULTFor static statements, indicates if the access path for the statement is based on user-specified optimization hints:HOptimization hints were used.AThe access path was reused because of the APREUSE bind option.blankOne 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
GSTMTNOI

INTEGER
NOT NULL WITH
DEFAULTIf 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.GSECTNOI

INTEGER
NOT NULL WITH
DEFAULTThe section number of the statement.GEXPLAINABLE

CHAR(1)
NOT NULL WITH
DEFAULTContains one of the following values:YIndicates that the SQL statement can be used with the EXPLAIN function and might have rows describing its access path in the owner.PLAN_TABLE.NIndicates that the SQL statement does not have any rows describing its access path in the owner.PLAN_TABLE.blankIndicates that the SQL statement was bound prior to Version 7.GQUERYNO

INTEGER
NOT NULL WITH
DEFAULT –1The 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.GROWID

ROWID
NULL GENERATED
ALWAYSROWID column, created for the lob columns in this table.GSTMT_ID

BIGINT
NOT NULLA unique statement identifier.GSTATEMENT

CLOB(2M)
NOT NULL
WITH DEFAULTThe complete text for the SQL statement that the row represents.G

BLOB(2M)
NOT NULL
WITH DEFAULTInternal use only.I
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).

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-302075-1-1.html 上篇帖子: [转]用于数据仓库的 DB2 产品 下篇帖子: db2数据导出导入
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表