id="catalogtbls">i5/OS catalog tables and views
The i5/OS™ catalog includes the following views and tables in the QSYS2 schema:
DB2 for i5/OS name Corresponding ANSI/ISO name Description SYSCATALOGS CATALOGS Information about relational databases SYSCHKCST CHECK_CONSTRAINTS Information about check constraints SYSCOLUMNS COLUMNS Information about column attributes SYSCOLUMNSTAT Information about column statistics SYSCST TABLE_CONSTRAINTS Information about all constraints SYSCSTCOL CONSTRAINT_COLUMN_USAGE Information about the columns referenced in a constraint SYSCSTDEP CONSTRAINT_TABLE_USAGE Information about constraint dependencies on tables SYSFUNCS ROUTINES Information about user-defined functions SYSINDEXES Information about indexes SYSJARCONTENTS Information about jars for Java™ routines. SYSJAROBJECTS Information about jars for Java routines. SYSKEYCST KEY_COLUMN_USAGE Information about unique, primary, and foreign keys SYSKEYS Information about index keys SYSPACKAGE Information about packages SYSPARMS PARAMETERS Information about routine parameters SYSPARTITIONINDEXSTAT Information about partition index statistics SYSPARTITIONSTAT Information about partition statistics SYSPROCS ROUTINES Information about procedures SYSREFCST REFERENTIAL_CONSTRAINTS Information about referential constraints SYSROUTINES ROUTINES Information about functions and procedures SYSROUTINEDEP ROUTINE_TABLE_USAGE Information about function and procedure dependencies SYSSEQUENCES Information about sequences SYSTABLEDEP Information about materialized query table dependencies SYSTABLEINDEXSTAT Information about table index statistics SYSTABLES TABLES Information about tables and views SYSTABLESTAT Information about table statistics SYSTRIGCOL TRIGGER_COLUMN_USAGE Information about columns used in a trigger SYSTRIGDEP TRIGGER_TABLE_USAGE Information about objects used in a trigger SYSTRIGGERS TRIGGERS Information about triggers SYSTRIGUPD TRIGGERED_UPDATE_COLUMNS Information about columns in the WHEN clause of a trigger SYSTYPES USER_DEFINED_TYPES Information about built-in data types and distinct types SYSVIEWDEP VIEW_TABLE_USAGE Information about view dependencies on tables SYSVIEWS VIEWS Information about definition of a view
SYSCATALOGS
The SYSCATALOGS view contains one row for each relational database that a user can connect to. The following table describes the columns in the SYSCATALOGS view.
Table 113. SYSCATALOGS view Column Name System Column Name Data Type Description CATALOG_NAME LOCATION VARCHAR(18) Relational database name. CATALOG_STATUS RDBASPSTAT CHAR(10) Status of a relational database.
- ACTIVE
- The relational database is associated with an independent auxiliary storage pool (IASP) that is active, but not yet available.
- AVAILABLE
- The relational database is available.
- VARYOFF
- The relational database is associated with an independent auxiliary storage pool (IASP) that is varied off.
- VARYON
- The relational database is associated with an independent auxiliary storage pool (IASP) that is varied on, but not yet available.
- UNKNOWN
- The status of the relational database is unknown. The status of remote relational databases is always unknown.
CATALOG_TYPE RDBTYPE CHAR(7) Relational database type.
- LOCAL
- The relational database is local to this system.
- REMOTE
- The relational database is on a remote system.
CATALOG_ASPGRP RDBASPGRP VARCHAR(10) Nullable
Independent auxiliary storage pool (IASP) name. Contains the null value if the relational database status is UNKNOWN.
CATALOG_ASPNUM RDBASPNUM VARCHAR(10) Nullable
Independent auxiliary storage pool (IASP) number. Contains the null value if the relational database status is UNKNOWN.
CATALOG_TEXT RDBTEXT CHAR(50) Relational database text description.
SYSCHKCST
The SYSCHKCST view contains one row for each check constraint in the SQL schema. The following table describes the columns in the SYSCHKCST view.
Table 114. SYSCHKCST view Column Name System Column Name Data Type Description CONSTRAINT_SCHEMA DBNAME VARCHAR(128) Name of the schema containing the constraint. CONSTRAINT_NAME RELNAME VARCHAR(128) Name of the constraint CHECK_CLAUSE CHECK VARCHAR(2000)
Nullable
Text of the check constraint clause Contains the null value if the check clause cannot be expressed without truncation.
SYSCOLUMNS
The SYSCOLUMNS view contains one row for every column of each table and view in the SQL schema (including the columns of the SQL catalog). The following table describes the columns in the SYSCOLUMNS view:
Table 115. SYSCOLUMNS view Column name System Column Name Data Type Description COLUMN_NAME NAME VARCHAR(128) Name of the column. This will be the SQL column name if one exists; otherwise, it will be the system column name. TABLE_NAME TBNAME VARCHAR(128) Name of the table or view that contains the column. This will be the SQL table or view name if one exists; otherwise, it will be the system table or view name. TABLE_OWNER TBCREATOR VARCHAR(128) The owner of the table or view. ORDINAL_POSITION COLNO INTEGER Numeric place of the column in the table or view, ordered from left to right. DATA_TYPE COLTYPE VARCHAR(8) Type of column:
- BIGINT
- Big number
- INTEGER
- Large number
- SMALLINT
- Small number
- DECIMAL
- Packed decimal
- NUMERIC
- Zoned decimal
- FLOAT
- Floating point; FLOAT, REAL, or DOUBLE PRECISION
- CHAR
- Fixed-length character string
- VARCHAR
- Varying-length character string
- CLOB
- Character large object string
- GRAPHIC
- Fixed-length graphic string
- VARG
- Varying-length graphic string
- DBCLOB
- Double-byte character large object string
- BINARY
- Fixed-length binary string
- VARBIN
- Varying-length binary string
- BLOB
- Binary large object string
- DATE
- Date
- TIME
- Time
- TIMESTMP
- Timestamp
- DATALINK
- Datalink
- ROWID
- Row ID
- DISTINCT
- Distinct type
LENGTH LENGTH INTEGER The length attribute of the column; or, in the case of a decimal, numeric, or nonzero precision binary column, its precision:
- 8 bytes
- BIGINT
- 4 bytes
- INTEGER
- 2 bytes
- SMALLINT
- Precision of number
- DECIMAL
- Precision of number
- NUMERIC
- 8 bytes
- FLOAT, FLOAT(n) where n = 25 to 53, or DOUBLE PRECISION
- 4 bytes
- FLOAT(n) where n = 1 to 24, or REAL
- Length of string
- CHAR
- Maximum length of string
- VARCHAR or CLOB
- Length of graphic string
- GRAPHIC
- Maximum length of graphic string
- VARGRAPHIC or DBCLOB
- Length of string
- BINARY
- Maximum length of binary string
- VARBIN or BLOB
- 4 bytes
- DATE
- 3 bytes
- TIME
- 10 bytes
- TIMESTAMP
- Maximum length of datalink URL and comment
- DATALINK
- 40 bytes
- ROWID
- Same value as the source type
- DISTINCT
NUMERIC_SCALE SCALE INTEGER
Nullable
Scale of numeric data. Contains the null value if the column is not decimal, numeric, or binary.
IS_NULLABLE NULLS CHAR(1) If the column can contain null values:
- N
- No
- Y
- Yes
IS_UPDATABLE UPDATES CHAR(1) If the column can be updated:
- N
- No
- Y
- Yes
LONG_COMMENT REMARKS VARCHAR(2000)
Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
HAS_DEFAULT DEFAULT CHAR(1) If the column has a default value (DEFAULT clause or null capable):
- N
- No
- Y
- Yes
- A
- The column has a ROWID data type and the GENERATED ALWAYS attribute.
- D
- The column has a ROWID data type and the GENERATED BY DEFAULT attribute.
- I
- The column is defined with the AS IDENTITY and GENERATED ALWAYS attributes.
- J
- The column is defined with the AS IDENTITY and GENERATED BY DEFAULT attributes.
COLUMN_HEADING LABEL VARCHAR(60)
Nullable
A character string supplied with the LABEL statement (column headings) Contains the null value if there is no column heading.
STORAGE STORAGE INTEGER The storage requirements for the column:
- 8 bytes
- BIGINT
- 4 bytes
- INTEGER
- 2 bytes
- SMALLINT
- (Precision/2) + 1
- DECIMAL
- Precision of number
- NUMERIC
- 8 bytes
- FLOAT, FLOAT(n) where n = 25 to 53, or DOUBLE PRECISION
- 4 bytes
- FLOAT(n) where n = 1 to 24, or REAL
- Length of string
- CHAR or BINARY
- Maximum length of string + 2
- VARCHAR or VARBIN
- Maximum length of string + 29
- CLOB or BLOB
- Length of string * 2
- GRAPHIC
- Maximum length of string * 2 + 2
- VARGRAPHIC
- Maximum length of string * 2 + 29
- DBCLOB
- 4 bytes
- DATE
- 3 bytes
- TIME
- 10 bytes
- TIMESTAMP
- Maximum length of datalink URL and comment + 24
- DATALINK
- 42 bytes
- ROWID
- Same value as the source type
- DISTINCT
This column supplies the storage requirements for all data types.
NUMERIC_PRECISION PRECISION INTEGER
Nullable
The precision of all numeric columns. This column supplies the precision of all numeric data types, including single-and double-precision floating point. The NUMERIC_PRECISION_RADIX column indicates if the value in this column is in binary or decimal digits.
Contains the null value if the column is not numeric.
CCSID CCSID INTEGER
Nullable
The CCSID value for CHAR, VARCHAR, CLOB, DATE, TIME, TIMESTAMP, GRAPHIC, VARGRAPHIC, DBCLOB, and DATALINK columns. Contains 65535 if the column is a BINARY, VARBIN, BLOB, or ROWID.
Contains the null value if the column is a numeric data type.
TABLE_SCHEMA DBNAME VARCHAR(128) The name of the SQL schema containing the table or view. COLUMN_DEFAULT DFTVALUE VARCHAR(2000)
Nullable
The default value of a column, if one exists. If the default value of the column cannot be represented without truncation, then the value of the column is the string 'TRUNCATED'. The default value is stored in character form. The following special values also exist:
- CURRENT_DATE
- The default value is the current date.
- CURRENT_TIME
- The default value is the current time.
- CURRENT_TIMESTAMP
- The default value is the current timestamp.
- NULL
- The default value is the null value and DEFAULT NULL was explicitly specified.
- USER
- The default value is the current job user.
Contains the null value if:
- The column has no default value. For example, if the column has an IDENTITY attribute or is a row ID, or
- A DEFAULT value was not explicitly specified.
CHARACTER_MAXIMUM_LENGTH CHARLEN INTEGER
Nullable
Maximum length of the string for binary, character and graphic string data types. Contains the null value if the column is not a string.
CHARACTER_OCTET_LENGTH CHARBYTE INTEGER
Nullable
Number of bytes for binary, character and graphic string data types. Contains the null value if the column is not a string.
NUMERIC_PRECISION_RADIX RADIX INTEGER
Nullable
Indicates if the precision specified in column NUMERIC_PRECISION is specified as a number of binary or decimal digits
- 2
- Binary; floating-point precision is specified in binary digits.
- 10
- Decimal; all other numeric types are specified in decimal digits.
Contains the null value if the column is not numeric.
DATETIME_PRECISION DATPRC INTEGER
Nullable
The fractional part of a date, time, or timestamp.
- 0
- For DATE and TIME data types
- 6
- For TIMESTAMP data types (number of microseconds).
Contains the null value if the column is not a date, time, or timestamp.
COLUMN_TEXT LABELTEXT VARCHAR(50)
Nullable
A character string supplied with the LABEL statement (column text) Contains the null value if the column has no column text.
SYSTEM_COLUMN_NAME SYS_CNAME CHAR(10) The system name of the column SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) The system name of the table or view SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) The system name of the schema USER_DEFINED_TYPE_SCHEMA TYPESCHEMA VARCHAR(128)
Nullable
The name of the schema if this is a distinct type. Contains the null value if the column is not a distinct type.
USER_DEFINED_TYPE_NAME TYPENAME VARCHAR(128)
Nullable
The name of the distinct type. Contains the null value if the column is not a distinct type.
IS_IDENTITY IDENTITY VARCHAR(3) This column identifies whether the column is an identity column.
- NO
- The column is not an identity column.
- YES
- The column is an identity column.
IDENTITY_GENERATION GENERATED VARCHAR(10)
Nullable
This column identifies whether the column is GENERATED ALWAYS or GENERATED BY DEFAULT.
- ALWAYS
- The column value is always generated.
- BY DEFAULT
- The column value is generated by default.
Contains the null value if the column is not a ROWID or IDENTITY column.
IDENTITY_START START DECIMAL(31,0)
Nullable
Starting value of the identity column. Contains the null value if the column is not an IDENTITY column.
IDENTITY_INCREMENT INCREMENT DECIMAL(31,0)
Nullable
Increment value of the identity column. Contains the null value if the column is not an IDENTITY column.
IDENTITY_MINIMUM MINVALUE DECIMAL(31,0)
Nullable
Minimum value of the identity column. Contains the null value if the column is not an IDENTITY column.
IDENTITY_MAXIMUM MAXVALUE DECIMAL(31,0)
Nullable
Maximum value of the identity column. Contains the null value if the column is not an IDENTITY column.
IDENTITY_CYCLE CYCLE VARCHAR(3)
Nullable
This column identifies whether the identity column values will continue to be generated after the minimum or maximum value has been reached.
- NO
- Values will not continue to be generated.
- YES
- Values will continue to be generated.
Contains the null value if the column is not an IDENTITY column.
IDENTITY_CACHE CACHE INTEGER
Nullable
Specifies the number of identity values that may be preallocated for faster access. Zero indicates that the values will not be preallocated. Contains the null value if the column is not an IDENTITY column.
IDENTITY_ORDER ORDER VARCHAR(3)
Nullable
Specifies whether the identity values must be generated in order of the request.
- NO
- Values do not need to be generated in order of the request.
- YES
- Values must be generated in order of the request.
Contains the null value if the column is not an IDENTITY column.
SYSCOLUMNSTAT
The SYSCOLUMNSTAT view contains one row for every column in a table partition or table member and one row for every column statistics collection. If the table is a distributed table, the partitions that reside on other database nodes are not contained in this catalog view. They are contained in the catalog views of the other database nodes. The following table describes the columns in the SYSCOLUMNSTAT view:
Table 116. SYSCOLUMNSTAT view Column name System Column Name Data Type Description TABLE_SCHEMA TABSCHEMA VARCHAR(128) Name of the SQL schema that contains the table. TABLE_NAME TABNAME VARCHAR(128) Name of the table. TABLE_PARTITION TABPART VARCHAR(128) Name of the table partition or member. PARTITION_TYPE PARTTYPE CHAR(1) The type of the table partitioning:
- blank
- The table is not partitioned.
- H
- This is data hash partitioning.
- R
- This is data range partitioning.
- D
- This is distributed database hash partitioning.
PARTITION_NUMBER PARTNBR INTEGER Nullable
The partition number of this partition. If the table is a distributed table, contains null. NUMBER_DISTRIBUTED_PARTITIONS DSTPARTS INTEGER Nullable
If the table is a distributed table, contains the total number of partitions. If the table is not a distributed table, contains null. NUMBER_COLUMN_NAMES NBRCOLS INTEGER Number of column names in this collection. If only individual column statistics are desired, only select rows where NUMBER_COLUMN_NAMES is one. Currently, only one name is returned.
COLUMN_NAME COLNAME VARCHAR(1280) Name of the column(s). Up to 10 columns may be returned. Currently, only one name is returned.
NUMBER_DISTINCT_VALUES COLCARD BIGINT Number of distinct values in the column. Contains -1 if statistics are not collected. HIGH2KEY HIGH2KEY VARCHAR(254) Not applicable for DB2 for i5/OS. Contains the empty string. LOW2KEY LOW2KEY VARCHAR(254) Not applicable for DB2 for i5/OS. Contains the empty string. AVERAGE_COLUMN_LENGTH AVGCOLLEN INTEGER Not applicable for DB2 for i5/OS. Will always be -1. NUMBER_NULLS NUMNULLS BIGINT The estimated number of NULL values. -1 if statistics are not collected. SUB_COUNT SUB_COUNT SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. SUB_DELIM_LENGTH SUBDLENGTH SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. NUMBER_HISTOGRAM_RANGES NQUANTILES INTEGER Number of histogram ranges available for this statistics collection. The actual histogram range values can be obtained using the List Statistics Collection Details (QDBSTLDS, QdbstListDetailStatistics) API. Contains -1 if statistics are not collected. NUMBER_MOST_FREQUENT_VALUES NMOSTFREQ INTEGER Number of most frequent values available. The actual most frequent values can be obtained using the List Statistics Collection Details (QDBSTLDS, QdbstListDetailStatistics) API. Contains -1 if statistics are not collected. AVGDISTINCTPERPAGE AVGDSTPAGE DOUBLE Nullable
Not applicable for DB2 for i5/OS. Will always be NULL. PAGEVARIANCERATIO PVARRATIO DOUBLE Nullable
Not applicable for DB2 for i5/OS. Will always be NULL. STATISTICS_NAME STATNAME VARCHAR(128) Nullable
Unique name of this statistics collection for this table partition. NULL if statistics are not collected. INTERNAL_STATISTICS_ID STATID VARCHAR(16) FOR BIT DATA Nullable
Internal statistics identifier of this statistics collection for this table partition. NULL if statistics are not collected. STATISTIC_CREATED STATCREATE TIMESTAMP Nullable
Timestamp when the statistics collection was created. NULL if statistics are not collected. STATISTIC_CREATOR STATCUSER VARCHAR(128) Nullable
User that created the statistic collection. *SYS if the system created the statistic collection. NULL if statistics are not collected. STATISTIC_LAST_UPDATED UPDATEDTS TIMESTAMP Nullable
Timestamp when the statistics collection was last updated. NULL if statistics are not collected. STATISTIC_UPDATER STATUUSER VARCHAR(128) Nullable
User that last updated the statistic collection. *SYS if the system automatically updated the statistic collection. NULL if statistics are not collected. STATISTICS_SIZE STATSIZE BIGINT Nullable
Size of the statistics collection for this table partition. NULL if statistics are not collected. AGING_MODE AGING_MODE VARCHAR(10) Indicates whether the system can automatically age or remove statistics collections for this table partition.
- *SYS
- The statistic collection will be automatically refreshed or removed by the system when necessary.
- *USER
- The statistic collection will only be refreshed or removed when explicitly requested by the user.
AGING_STATUS AGING_STS CHAR(1) Nullable
Indicates how current the statistics collection is for this table partition.
NULL if statistics are not collected.
- 0
- There are no indications that the statistics data needs to be refreshed.
- 1
- There are indications that the statistics data needs to be refreshed.
BLOCK_OPTION BLKOPTION CHAR(1) Indicates whether automatic statistics collection create requests are allowed for this table partition.
- 0
- Automatic system initiated statistics collections are not blocked.
- 1
- Automatic system initiated statistics collections are blocked.
CURRENT_LAST CHANGE UPDATED TIMESTAMP Nullable
Timestamp when the data in the table partition was last changed. NULL if statistics are not collected. CURRENT_ROWS CURROWS BIGINT Nullable
Current number of valid rows in the table partition. NULL if statistics are not collected. CURRENT_DELETED_ROWS CURDELROWS BIGINT Nullable
Current number of deleted rows in the table partition. NULL if statistics are not collected. CURRENT_DATA_CHANGES CURDATCHG BIGINT Nullable
The number of inserts, updates, and deletes that have occurred to this table partition since the last IPL. NULL if statistics are not collected. STATISTICS_ROWS STATROWS BIGINT Nullable
Number of valid rows in the table partition at the time the statistic was collected. NULL if statistics are not collected. STATISTICS_DELETED_ROWS STATDELROW BIGINT Nullable
Number of deleted rows in the table partition at the time the statistic was collected. NULL if statistics are not collected. STATISTICS_DATA_CHANGES STATDATCHG BIGINT Nullable
Number of inserts, updates, and deletes that had occurred to the table partition since the last IPL at the time the statistic was collected. NULL if statistics are not collected. TRANSLATION_ATTRIBUTES TRANSATRS VARCHAR(10) Nullable
Indicates the type of translations that were used on data values when the statistic was collected.
If multiple columns are used in this collection, multiple translations are possible.
- 0
- Unique weight translation.
- 1
- Shared weight translation.
- 9
- No translation.
Currently, only one translation is returned.
TRANSLATION_TABLES TRANSTBLS VARCHAR(210) Nullable
Qualified names of the translation tables, if translation tables were used on the statistic collection. The empty string is returned if no translation table was used. NULL if statistics are not collected.
If multiple columns are used in this collection, multiple translation tables are possible.
Currently, only one translation table is returned.
SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System schema name. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System table name. SYSTEM_TABLE_MEMBER SYS_MNAME CHAR(10) System member name. SYSTEM_COLUMN_NAME SYS_CNAME VARCHAR(100) System column name. An array of up to 10 names are possible. Currently, only one name is returned.
SYSCST
The SYSCST view contains one row for each constraint in the SQL schema. The following table describes the columns in the SYSCST view:
Table 117. SYSCST view Column Name System Column Name Data Type Description CONSTRAINT_SCHEMA CDBNAME VARCHAR(128) Name of the schema containing the constraint. CONSTRAINT_NAME RELNAME VARCHAR(128) Name of the constraint. CONSTRAINT_TYPE TYPE VARCHAR(11) Constraint Type
- CHECK
- UNIQUE
- PRIMARY KEY
- FOREIGN KEY
TABLE_SCHEMA TDBNAME VARCHAR(128) Name of the schema containing the table. TABLE_NAME TBNAME VARCHAR(128) Name of the table which the constraint is created over. This will be the SQL table name if it exists; otherwise, it will be the system table name. IS_DEFERRABLE ISDEFER VARCHAR(3) Indicates whether the constraint checking can be deferred. Will always be 'NO'. INITIALLY_DEFERRED INITDEFER VARCHAR(3) Indicates whether the constraint was defined as initially deferred. Will always be 'NO'. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System name of the table. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System name of the schema containing the table. CONSTRAINT_KEYS COLCOUNT SMALLINT Nullable
Specifies the number of key columns if this is a UNIQUE, PRIMARY KEY, or FOREIGN KEY constraint. Contains the null value if the constraint is a CHECK constraint.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number. CONSTRAINT_STATE CST_STATE VARCHAR(11) Indicates whether the constraint is established or defined:
- ESTABLISHED
- The referential constraint is established. The parent table exists.
- DEFINED
- The referential constraint is defined. The parent table does not exist.
ENABLED ENABLED VARCHAR(3) Nullable
Indicates whether the constraint is enabled:
- NO
- The constraint is disabled.
- YES
- The constraint is enabled.
Contains the null value if the constraint is defined or is a unique constraint.
CHECK_PENDING CHECKFLAG VARCHAR(3) Nullable
Indicates whether the constraint is in check pending state:
- NO
- The constraint is not in check pending.
- YES
- The constraint is in check pending.
Contains the null value if the constraint is defined, disabled, or is a unique constraint.
SYSCSTCOL
The SYSCSTCOL view records the columns on which constraints are defined. There is one row for every column in a unique, primary key, and check constraint and the referencing columns of a referential constraint. The following table describes the columns in the SYSCSTCOL view:
Table 118. SYSCSTCOL view Column Name System Column Name Data Type Description TABLE_SCHEMA TDBNAME VARCHAR(128) Name of the SQL schema that contains the table the constraint is dependent on. TABLE_NAME TBNAME VARCHAR(128) Name of the table the constraint is dependent on. This is the SQL table name if it exists; otherwise, it is the system table name. COLUMN_NAME COLUMN VARCHAR(128) Column that the constraint was created over. This is the SQL column name if it exists; otherwise, it is the system column name. CONSTRAINT_SCHEMA CDBNAME VARCHAR(128) Name of the schema of the constraint. CONSTRAINT_NAME RELNAME VARCHAR(128) Name of the constraint. SYSTEM_COLUMN_NAME SYS_CNAME CHAR(10) System name of the column. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System name of the table. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System name of the schema containing the table.
SYSCSTDEP
The SYSCSTDEP view records the tables on which constraints are defined. The following table describes the columns in the SYSCSTDEP view:
Table 119. SYSCSTDEP view Column Name System Column Name Data Type Description TABLE_SCHEMA TDBNAME VARCHAR(128) Name of the SQL schema that contains the table on which the constraint is dependent TABLE_NAME TBNAME VARCHAR(128) Name of the table on which the constraint is dependent. This is the SQL table name if it exists otherwise it is the system table name. CONSTRAINT_SCHEMA CDBNAME VARCHAR(128) Name of the schema of the constraint. CONSTRAINT_NAME RELNAME VARCHAR(128) Name of the constraint. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System name of the table. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System name of the schema containing the table. IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number.
SYSFUNCS
The SYSFUNCS view contains one row for each function created by the CREATE FUNCTION statement. The following table describes the columns in the SYSFUNCS view:
Table 120. SYSFUNCS view Column Name System Column Name Data Type Description SPECIFIC_SCHEMA SPECSCHEMA VARCHAR(128) Schema name of the routine (function) instance. SPECIFIC_NAME SPECNAME VARCHAR(128) Specific name of the routine instance. ROUTINE_SCHEMA FUNCSCHEMA VARCHAR(128) Name of the SQL schema (schema) that contains the routine. ROUTINE_NAME FUNCNAME VARCHAR(128) Name of the routine. ROUTINE_CREATED RTNCREATE TIMESTAMP Identifies the timestamp when the routine was created. ROUTINE_DEFINER DEFINER VARCHAR(128) Name of the user that defined the routine. ROUTINE_BODY BODY VARCHAR(8) The type of the routine body:
- EXTERNAL
- This is an external routine.
- SQL
- This is an SQL routine.
EXTERNAL_NAME EXTNAME VARCHAR(279) Nullable
This column identifies the external program name.
- For SQL functions or ILE service programs, the external program name is schema-name/service-program-name(entry-point-name).
- For Java programs, the external program name is an optional jar-id followed by a fully-qualified-class-name!method-name or fully-qualified-class-name.method-name.
- For all other languages, the external program name is schema-name/program-name.
Contains the null value if this is a system-generated function.
EXTERNAL_LANGUAGE LANGUAGE VARCHAR(8) Nullable
If this is an external routine, this column identifies the external program name.
- C
- The external program is written in C.
- C++
- The external program is written in C++.
- CL
- The external program is written in CL.
- COBOL
- The external program is written in COBOL.
- COBOLLE
- The external program is written in ILE COBOL.
- JAVA
- The external program is written in JAVA.
- PLI
- The external program is written in PL/I.
- RPG
- The external program is written in RPG.
- RPGLE
- The external program is written in ILE RPG.
Contains the null value if this is not an external routine.
PARAMETER_STYLE PARM_STYLE VARCHAR(7) Nullable
If this is an external routine, this column identifies the parameter style (calling convention).
- DB2SQL
- This is the DB2SQL calling convention.
- DB2GNRL
- This is the DB2GENERAL calling convention.
- GENERAL
- This is the GENERAL calling convention.
- JAVA
- This is the JAVA calling convention.
- NULLS
- This is the GENERAL WITH NULLS calling convention.
- SQL
- This is the SQL standard calling convention.
Contains the null value if this is not an external routine.
IS_DETERMINISTIC DETERMINE VARCHAR(3) This column identifies whether the routine is deterministic. That is, whether a call to the routine with the same arguments will always return the same result.
- NO
- The routine is not deterministic.
- YES
- The routine is deterministic.
SQL_DATA_ACCESS DATAACCESS VARCHAR(8) Nullable
This column identifies whether a routine contains SQL and whether it reads or modifies data.
- NONE
- The routine does not contain any SQL statements.
- CONTAINS
- The routine contains SQL statements.
- READS
- The routine possibly reads data from a table or view.
- MODIFIES
- The routine possibly modifies data in a table or view or issues SQL DDL statements.
SQL_PATH SQL_PATH VARCHAR(3483) Nullable
If this is an SQL routine, this column identifies the path. Contains the null value if this is an external routine.
PARM_SIGNATURE SIGNATURE VARCHAR(2048) This column identifies the routine signature. NUMBER_OF_RESULTS NUMRESULTS SMALLINT Nullable
Identifies the number of results. IN_PARMS IN_PARMS SMALLINT Identifies the number of input parameters. 0 indicates that there are no input parameters. LONG_COMMENT REMARKS VARCHAR(2000) Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
ROUTINE_DEFINITION ROUTINEDEF VARCHAR(23888) Nullable
If this is an SQL routine, this column contains the SQL routine body. Contains the null value if this is not an SQL routine or if the routine body cannot be contained in this column without truncation.
FUNCTION_ORIGIN ORIGIN CHAR(1) Identifies the type of function. If this is a procedure, this column contains a blank.
- B
- This is a built-in function (defined by DB2 for i5/OS).
- E
- This is a user-defined function.
- U
- This is a user-defined function that is based on another function.
- S
- This is a system-generated function.
FUNCTION_TYPE TYPE CHAR(1) Identifies the form of the function. If this is a procedure, this column contains a blank.
- S
- This is a scalar function.
- C
- This is a column function.
- T
- This is a table function.
EXTERNAL_ACTION EXT_ACTION CHAR(1) Nullable
Identifies the whether the invocation of the function has external effects.
- E
- This function has external side effects.
- N
- This function does not have any external side effects.
IS_NULL_CALL NULL_CALL VARCHAR(3) Nullable
Identifies whether the function needs to be called if an input parameter is the null value.
- NO
- This function need not be called if an input parameter is the null value. If this is a scalar function, the result of the function is implicitly null if any of the operands are null. If this is a table function, the result of the function is an empty table if any of the operands are the null value.
- YES
- This function must be called even if an input operand is null.
SCRATCH_PAD SCRATCHPAD INTEGER Nullable
Identifies whether the address of a static memory area (scratch pad) is passed to the function.
- 0
- The function does not have a scratch pad.
- integer
- Indicates the size of the scratch pad passed to the function.
FINAL_CALL FINAL_CALL VARCHAR(3) Nullable
Indicates whether a final call to the function should be made to allow the function to clean up its work areas (scratch pads).
- NO
- No final call is made.
- YES
- A final call to the function is made when the statement is complete.
PARALLELIZABLE PARALLEL VARCHAR(3) Nullable
Identifies whether the function can be run in parallel.
- NO
- The function must be synchronous.
- YES
- The function can be run in parallel.
DBINFO DBINFO VARCHAR(3) Nullable
Identifies whether information about the database is passed to the function.
- NO
- No database information is passed to the function.
- YES
- Information about the database is passed to the function.
SOURCE_ SPECIFIC_SCHEMA SRCSCHEMA VARCHAR(128) Nullable
If this is sourced function and the source is user-defined, this column contains the name of the source schema. If this is a sourced function and the source is built-in, this column contains 'QSYS2'. Contains the null value if this is not a sourced function.
SOURCE_SPECIFIC_NAME SRCNAME VARCHAR(128) Nullable
If this is sourced function and the source is user-defined, this column contains the specific name of the source function name. Contains the null value if this is not a sourced function.
IS_USER_DEFINED_CAST CAST_FUNC VARCHAR(3) Nullable
Identifies whether this function is a cast function created when a distinct type was created.
- NO
- This function is not a cast function.
- YES
- This function is a cast function.
CARDINALITY CARD BIGINT Nullable
Specifies the cardinality for a table function. Contains the null value if the function is not a table function or if cardinality was not specified.
FENCED FENCED VARCHAR(3) Nullable
Identifies whether the function is fenced.
- NO
- The function is not fenced.
- YES
- The function is fenced.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number.
SYSINDEXES
The SYSINDEXES view contains one row for every index in the SQL schema created using the SQL CREATE INDEX statement, including indexes on the SQL catalog. The following table describes the columns in the SYSINDEXES view:
Table 121. SYSINDEXES view Column Name System Column Name Data Type Description INDEX_NAME NAME VARCHAR(128) Name of the index. This will be the SQL index name if one exists; otherwise, it will be the system index name. INDEX_OWNER CREATOR VARCHAR(128) Owner of the index TABLE_NAME TBNAME VARCHAR(128) Name of the table on which the index is defined. This will be the SQL table name if one exists; otherwise, it will be the system table name. TABLE_OWNER TBCREATOR VARCHAR(128) Owner of the table TABLE_SCHEMA TBDBNAME VARCHAR(128) Name of the SQL schema that contains the table on which the index is defined IS_UNIQUE UNIQUERULE CHAR(1) If the index is unique:
- D
- No (duplicates are allowed)
- V
- Yes (duplicate NULL values are allowed)
- U
- Yes
- E
- Encoded vector index
COLUMN_COUNT COLCOUNT INTEGER Number of columns in the key INDEX_SCHEMA DBNAME VARCHAR(128) Name of the SQL schema that contains the index SYSTEM_INDEX_NAME SYS_IXNAME CHAR(10) System index name SYSTEM_INDEX_SCHEMA SYS_IDNAME CHAR(10) System index schema name SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System table name SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System table schema name LONG_COMMENT REMARKS VARCHAR(2000)
Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number. INDEX_TEXT LABEL CHAR(50)
A character string supplied with the LABEL statement. IS_SPANNING_INDEX SPANNING VARCHAR(3)
Nullable
Indicates whether the index is partitioned:
- NO
- The index is partitioned.
- YES
- The index is not partitioned.
Contains the null value if the base table is not a partitioned table.
INDEX_DEFINER DEFINER VARCHAR(128) Name of the user that defined the index.
SYSJARCONTENTS
The SYSJARCONTENTS table contains one row for each class defined by a jarid in the SQL schema. The following table describes the columns in the SYSJARCONTENTS table.
Table 122. SYSJARCONTENTS table Column Name System Column Name Data Type Description JARSCHEMA JARSCHEMA VARCHAR(128) Name of the schema containing the jar_id. JAR_ID JAR_ID VARCHAR(128) Name of the jar_id. CLASS CLASS VARCHAR(128) Name of the class. CLASS_SOURCE CLASSSRC DBCLOB(10485760)
Nullable
Reserved. Contains the null value. IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number.
SYSJAROBJECTS
The SYSJAROBJECTS table contains one row for each jarid in the SQL schema. The following table describes the columns in the SYSJAROBJECTS table.
Table 123. SYSJAROBJECTS table Column Name System Column Name Data Type Description JARSCHEMA JARSCHEMA VARCHAR(128) Name of the schema containing the jar_id. JAR_ID JAR_ID VARCHAR(128) Name of the jar_id. DEFINER DEFINER VARCHAR(128) Name of the owner of the jarid. JAR_DATA JAR_DATA BLOB(104857600)
Nullable
Byte-codes for the jar. IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number. JAR_CREATED
CREATEDTS TIMESTAMP Jar created timestamp LAST_ALTERED ALTEREDTS TIMESTAMP Nullable
Reserved. Contains the null value. DEBUG_MODE DEBUG_MODE CHAR(1) Identifies whether the routine is debuggable.
- 0
- The routine is not debuggable.
- 1
- The routine is debuggable by the Unified Debugger.
- 2
- The routine is debuggable by the system debugger.
- N
- The routine is disabled from being debugged by the Unified Debugger.
DEBUG_DATA DEBUG_DATA CLOB(1048576)
Nullable
Reserved. Contains the null value.
SYSKEYCST
The SYSKEYCST view contains one or more rows for each UNIQUE KEY, PRIMARY KEY, or FOREIGN KEY in the SQL schema. There is one row for each column in every unique or primary key constraint and the referencing columns of a referential constraint. The following table describes the columns in the SYSKEYCST view:
Table 124. SYSKEYCST view Column Name System Column Name Data Type Description CONSTRAINT_SCHEMA CDBNAME VARCHAR(128) Name of the schema containing the constraint. CONSTRAINT_NAME RELNAME VARCHAR(128) Name of the constraint. TABLE_SCHEMA TDBNAME VARCHAR(128) Name of the schema containing the table. TABLE_NAME TBNAME VARCHAR(128) Name of the table. COLUMN_NAME COLNAME VARCHAR(128) Name of the column. ORDINAL_POSITION COLSEQ INTEGER The position of the column within the key COLUMN_POSITION COLNO INTEGER The position of the column within the row TABLE_OWNER CREATOR VARCHAR(128) Owner of the table. SYSTEM_COLUMN_NAME SYS_CNAME CHAR(10) System name of the column. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System name of the table. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System name of the schema containing the schema table.
SYSKEYS
The SYSKEYS view contains one row for every column of an index in the SQL schema, including the keys for the indexes on the SQL catalog. The following table describes the columns in the SYSKEYS view:
Table 125. SYSKEYS view Column Name System Column Name Data Type Description INDEX_NAME IXNAME VARCHAR(128) Name of the index. This will be the SQL index name if one exists; otherwise, it will be the system index name. INDEX_OWNER IXCREATOR VARCHAR(128) Owner of the index COLUMN_NAME COLNAME VARCHAR(128) Name of the column of the key. This will be the SQL column name if one exists; otherwise, it will be the system column name. COLUMN_POSITION COLNO INTEGER Numeric position of the column in the row ORDINAL_POSITION COLSEQ INTEGER Numeric position of the column in the key ORDERING ORDERING CHAR(1) Order of the column in the key:
- A
- Ascending
- D
- Descending
INDEX_SCHEMA IXDBNAME VARCHAR(128) Name of the schema containing the index. SYSTEM_COLUMN_NAME SYS_CNAME CHAR(10) System name of the column SYSTEM_INDEX_NAME SYS_IXNAME CHAR(10) System name of the index SYSTEM_INDEX_SCHEMA SYS_IDNAME CHAR(10) System name of the schema containing the index
SYSPACKAGE
The SYSPACKAGE view contains one row for each SQL package in the SQL schema. The following table describes the columns in the SYSPACKAGE view:
Table 126. SYSPACKAGE view Column Name System Column Name Data Type Description PACKAGE_CATALOG LOCATION VARCHAR(128) Relational database name (RDBNAME) of the SQL package PACKAGE_SCHEMA COLLID VARCHAR(128) Name of the schema PACKAGE_NAME NAME VARCHAR(128) Name of the SQL package PACKAGE_OWNER OWNER VARCHAR(128) Owner of the SQL package PACKAGE_CREATOR CREATOR VARCHAR(128) Creator of the SQL package CREATION_TIMESTAMP TIMESTAMP CHAR(26) Timestamp of when the SQL package was created DEFAULT_SCHEMA QUALIFIER VARCHAR(128) Implicit name for unqualified tables, views, and indexes PROGRAM_NAME PROGNAME VARCHAR(128) Name of program the package was created from PROGRAM_SCHEMA LIBRARY VARCHAR(128) Name of schema containing the program PROGRAM_CATALOG RDB VARCHAR(128) Name of the relational database where the program resides ISOLATION ISOLATION CHAR(2) Isolation option specification:
RR Repeatable Read (*RR)
RS Read Stability (*ALL)
CS Cursor Stability (*CS)
UR Uncommitted Read (*CHG)
NO None (*NONE)
QUOTE QUOTE CHAR(1) Escape character specification (Y/N):
Y = Quotation mark
N = Apostrophe
COMMA COMMA CHAR(1) Comma option specification (Y/N):
Y = Comma
N = Period
PACKAGE_TEXT LABEL VARCHAR(50) A character string you supply with the LABEL statement. LONG_COMMENT REMARKS VARCHAR(2000) A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
CONSISTENCY_TOKEN CONTOKEN CHAR(8) FOR BIT DATA Consistency token of package SYSTEM_PACKAGE_NAME SYS_NAME CHAR(10) System name of the package. SYSTEM_PACKAGE_SCHEMA SYS_DNAME CHAR(10) System name of the schema containing the package. SYSTEM_DEFAULT_SCHEMA SYS_DDNAME CHAR(10) System name of the implicit qualifier for unqualified table, views, indexes, and packages. SYSTEM_PROGRAM_NAME SYS_PNAME CHAR(10) System name of the program. SYSTEM_PROGRAM_SCHEMA SYS_PDNAME CHAR(10) System name of the schema containing the program IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number.
SYSPARMS
The SYSPARMS table contains one row for each parameter of a procedure created by the CREATE PROCEDURE statement or function created by the CREATE FUNCTION statement. The following table describes the columns in the SYSPARMS table:
Table 127. SYSPARMS table Column Name System Column Name Data Type Description SPECIFIC_SCHEMA SPECSCHEMA VARCHAR(128) Schema name of the routine instance. SPECIFIC_NAME SPECNAME VARCHAR(128) Specific name of the routine instance. ORDINAL_POSITION PARMNO INTEGER Numeric place of the parameter in the parameter list, ordered from left to right. PARAMETER_MODE PARMMODE VARCHAR(5) Type of the parameter:
- IN
- This is an input parameter.
- OUT
- This is an output parameter.
- INOUT
- This is an input/output parameter.
PARAMETER_NAME PARMNAME VARCHAR(128)
Nullable
Name of the parameter. Contains the null value if the parameter does not have a name.
DATA_TYPE DATA_TYPE VARCHAR(128) Type of column:
- BIGINT
- Big number
- INTEGER
- Large number
- SMALLINT
- Small number
- DECIMAL
- Packed decimal
- NUMERIC
- Zoned decimal
- DOUBLE PRECISION
- Floating point; DOUBLE PRECISION
- REAL
- Floating point; REAL
- CHARACTER
- Fixed-length character string
- CHARACTER VARYING
- Varying-length character string
- CHARACTER LARGE OBJECT
- Character large object string
- GRAPHIC
- Fixed-length graphic string
- GRAPHIC VARYING
- Varying-length graphic string
- DOUBLE-BYTE CHARACTER LARGE OBJECT
- Double-byte character large object string
- BINARY
- Fixed-length binary string
- BINARY VARYING
- Varying-length binary string
- BINARY LARGE OBJECT
- Binary large object string
- DATE
- Date
- TIME
- Time
- TIMESTAMP
- Timestamp
- DATALINK
- Datalink
- ROWID
- Row ID
- DISTINCT
- Distinct type
NUMERIC_SCALE SCALE INTEGER
Nullable
Scale of numeric data. Contains the null value if the parameter is not decimal, numeric, or binary.
NUMERIC_PRECISION PRECISION INTEGER
Nullable
The precision of all numeric parameters. This column supplies the precision of all numeric data types, including single-and double-precision floating point. The NUMERIC_PRECISION_RADIX column indicates if the value in this column is in binary or decimal digits.
Contains the null value if the parameter is not numeric.
CCSID CCSID INTEGER
Nullable
The CCSID value for CHAR, VARCHAR, CLOB, DATE, TIME, TIMESTAMP, GRAPHIC, VARGRAPHIC, DBCLOB and DATALINK parameters. A CCSID of 0 indicates that the CCSID of the job at run time is used.
Contains the null value if the parameter is numeric.
CHARACTER_MAXIMUM_LENGTH CHARLEN INTEGER
Nullable
Maximum length of the string for binary, character, and graphic string data types. Contains the null value if the parameter is not a string.
CHARACTER_OCTET_LENGTH CHARBYTE INTEGER
Nullable
Number of bytes for binary, character, and graphic string data types. Contains the null value if the parameter is not a string.
NUMERIC_PRECISION_RADIX RADIX INTEGER
Nullable
Indicates if the precision specified in column NUMERIC_PRECISION is specified as a number of binary or decimal digits:
- 2
- Binary; floating-point precision is specified in binary digits.
- 10
- Decimal; all other numeric types are specified in decimal digits.
Contains the null value if the parameter is not numeric.
DATETIME_PRECISION DATPRC INTEGER
Nullable
The fractional part of a date, time, or timestamp.
- 0
- For DATE and TIME data types
- 6
- For TIMESTAMP data types (number of microseconds).
Contains the null value if the parameter is not date, time, or timestamp.
IS_NULLABLE NULLS VARCHAR(3) Indicates whether the parameter is nullable.
- NO
- The parameter does not allow nulls.
- YES
- The parameter does allow nulls.
LONG_COMMENT REMARKS VARCHAR(2000)
Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
ROW_TYPE ROWTYPE CHAR(1) Nullable
Indicates the type of row.
- P
- Parameter.
- R
- Result before casting.
- C
- Result after casting.
DATA_TYPE_SCHEMA TYPESCHEMA VARCHAR(128) Nullable
Schema of the data type if this is a distinct type. Contains the null value if the parameter is not a distinct type.
DATA_TYPE_NAME TYPENAME VARCHAR(128) Nullable
Name of the data type if this is a distinct type. Contains the null value if the parameter is not a distinct type.
AS_LOCATOR ASLOCATOR VARCHAR(3) Indicates whether the parameter was specified as a locator.
- NO
- The parameter was not specified as a locator.
- YES
- The parameter was specified as a locator.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number. NORMALIZE_DATA NORMALIZE VARCHAR(3) Nullable
Indicates whether the parameter value should be normalized or not. This attribute only applies to UTF-8 and UTF–16 data.
- NO
- The value should not be normalized.
- YES
- The value should be normalized.
SYSPARTITIONINDEXSTAT
The SYSPARTITIONINDEXSTAT view contains one row for every index built over a table partition or table member. If the table is a distributed table, the indexes over partitions that reside on other database nodes are not contained in this catalog view. They are contained in the catalog views of the other database nodes. The following table describes the columns in the SYSPARTITIONINDEXSTAT view:
Table 128. SYSPARTITIONINDEXSTAT view Column name System Column Name Data Type Description TABLE_SCHEMA TABSCHEMA VARCHAR(128) Name of the SQL schema that contains the table. TABLE_NAME TABNAME VARCHAR(128) Name of the table. TABLE_PARTITION TABPART VARCHAR(128) Name of the table partition or member. PARTITION_TYPE PARTTYPE CHAR(1) The type of the table partitioning:
- blank
- The table is not partitioned.
- H
- This is data hash partitioning.
- R
- This is data range partitioning.
- D
- This is distributed database hash partitioning.
PARTITION_NUMBER PARTNBR INTEGER Nullable
The partition number of this partition. If the table is a distributed table, contains null. NUMBER_DISTRIBUTED_PARTITIONS DSTPARTS INTEGER Nullable
If the table is a distributed table, contains the total number of partitions. If the table is not a distributed table, contains null. INDEX_SCHEMA INDSCHEMA VARCHAR(128) Name of the SQL schema that contains the index, logical file, or constraint. INDEX_NAME INDNAME VARCHAR(128) Name of the index, logical file, or constraint. INDEX_MEMBER INDMEMBER VARCHAR(128) Nullable
Name of the member of the index or logical file. If the index type is a constraint, the member name is null. INDEX_TYPE INDTYPE VARCHAR(11) The type of the index:
- INDEX
- The index is an SQL index.
- LOGICAL
- The index is part of a logical file.
- PRIMARY KEY
- The index is a primary key constraint.
- UNIQUE
- The index is a unique constraint.
- REFERENTIAL
- The index is a foreign key constraint.
NUMBER_KEY_COLUMNS INDKEYS BIGINT Number of columns that define the index key. COLUMN_NAMES COLNAMES VARCHAR(1024) A comma separated list of column names that define the index key. If the length of all the column names exceeds 1024, '...' is returned at the end of the column value. NUMBER_LEAF_PAGES NLEAF BIGINT Not applicable for DB2 for i5/OS. Will always be -1. NUMBER_LEVELS NLEVELS SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. FIRSTKEYCARD KEYCARD1 BIGINT Number of distinct first key values. If the index is an encoded vector index, -1 is returned. FIRST2KEYCARD KEYCARD2 BIGINT Number of distinct keys using the first two columns of the index. If the index is an encoded vector index, -1 is returned. FIRST3KEYCARD KEYCARD3 BIGINT Number of distinct keys using the first three columns of the index. If the index is an encoded vector index, -1 is returned. FIRST4KEYCARD KEYCARD4 BIGINT Number of distinct keys using the first four columns of the index. If the index is an encoded vector index, -1 is returned. FULLKEYCARD KEYCARDF BIGINT Number of distinct full key values. If the index has more than 4 key columns or is an encoded vector index, -1 is returned. CLUSTERRATIO CLSRATIO SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. CLUSTERFACTOR CLSFACTOR DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. SEQUENTIAL_PAGES SEQPAGES BIGINT Not applicable for DB2 for i5/OS. Will always be -1. DENSITY DENSITY INTEGER Not applicable for DB2 for i5/OS. Will always be -1. PAGE_FETCH_PAIRS FETCHPAIRS VARCHAR(520) Not applicable for DB2 for i5/OS. Will always be an empty string. NUMBER_KEYS NUMRIDS BIGINT Number of keys in the index. If the index is invalid or is an encoded vector index, -1 is returned. NUMRIDS_DELETED NUMRIDSDLT BIGINT Not applicable for DB2 for i5/OS. Will always be 0. NUM_EMPTY_LEAFS EMPTYLEAFS BIGINT Not applicable for DB2 for i5/OS. Will always be 0. AVERAGE_RANDOM_FETCH_PAGES AVGRNDFTCH DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_RANDOM_PAGES AVGRNDPAGE DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_SEQUENCE_GAP AVGSEQGAP DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_SEQUENCE_FETCH_GAP AVGSEQFGAP DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_SEQUENCE_PAGES AVGSEQPAGE DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_SEQUENCE_FETCH_PAGES AVGSEQFPAG DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVGPARTITION_CLUSTERRATIO PCLSRATIO SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. AVGPARTITION_CLUSTERFACTOR PCLSFACTOR DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVGPARTITION_PAGE_FETCH_PAIRS PFETCHPAIR VARCHAR(520) Not applicable for DB2 for i5/OS. Will always be an empty string. DATAPARTITION_CLUSTERFACTOR DCLSFACTOR DOUBLE A statistic measuring the "clustering" of the index keys with regard to data partitions. It is a number between 0 and 1, with 1 representing perfect clustering and 0 representing no clustering. INDCARD INDCARD BIGINT Number of keys in the index. If the index is invalid or is an encoded vector index, -1 is returned. INDEX_VALID VALID CHAR(1) An indication or whether the index is invalid and needs to be rebuilt:
- 0
- The index is invalid.
- 1
- The index is valid.
INDEX_HELD HELD CHAR(1) An indication or whether a pending rebuild of the index is currently held by the user:
- 0
- A rebuild of the index is not pending or is not held.
- 1
- A pending rebuild of the index is held.
CREATE_TIMESTAMP CREATED TIMESTAMP The timestamp when the index was created. LAST_BUILD_TIMESTAMP LASTBUILD TIMESTAMP The timestamp when the index was last rebuilt. LAST_QUERY_USE LASTQRYUSE TIMESTAMP Nullable
The timestamp of the last time the index was used in a query since the last time the usage statistics were reset. If the index has never been used for statistics since the last time the usage statistics were reset, contains null. LAST_STATISTICS_USE LASTSTUSE TIMESTAMP Nullable
The timestamp of the last time the index was used by the optimizer for statistics since the last time the usage statistics were reset. If the index has never been used for statistics since the last time the usage statistics were reset, contains null. QUERY_USE_COUNT QRYUSECNT BIGINT The number of times the index was used in a query since the last time the usage statistics were reset. If the index has never been used in a query since the last time the usage statistics were reset, contains 0. QUERY_STATISTICS_COUNT QRYSTCNT BIGINT The number of times the index was used by the optimizer for statistics since the last time the usage statistics were reset. If the index has never been used for statistics since the last time the usage statistics were reset, contains 0. LAST_USED_TIMESTAMP LASTUSED TIMESTAMP Nullable
The timestamp of the last time the index was used directly by an application for native record I/O or SQL operations since the last time the usage statistics were reset. If the index has never been used since the last time the usage statistics were reset, contains null. DAYS_USED_COUNT DAYSUSED INTEGER The number of days the index was used directly by an application for native record I/O or SQL operations since the last time the usage statistics were reset. If the index has never been used since the last time the usage statistics were reset, contains 0. LAST_RESET_TIMESTAMP LASTRESET TIMESTAMP Nullable
The timestamp of the last time the usage statistics were reset for the index. For more information see the Change Object Description (CHGOBJD) command. If the index's last used timestamp has never been reset, contains null. INDEX_SIZE SIZE BIGINT Size (in bytes) of the binary tree or encoded vector index of the index. ESTIMATED_BUILD_TIME ESTBLDTIME INTEGER Estimated time (in milliseconds) required to rebuild the index. DELAYED_MAINT_KEYS DLYKEYS INTEGER Nullable
Number of keys that need to be inserted into the binary tree of a delayed maintenance index. If the index is not a delayed maintenance index, contains null. SPARSE SPARSE CHAR(1) Indicates whether the index contains keys for all the rows of its depended on table:
- 0
- The index contains keys for all the rows of its depended on table.
- 1
- The index is a select/omit logical file and does not contain keys for all the rows of its depended on table.
DERIVED_KEY DERIVED CHAR(1) Indicates whether the any key columns in the index are expressions:
- 0
- No key columns of the index are expressions.
- 1
- At least one key column is an expression. Currently, this is only possible in a DDS-created logical file or temporary index.
PARTITIONED PARTITION CHAR(1) Indicates whether the index is partitioned or not partitioned:
- 0
- The index is not built over a partitioned table or is not partitioned.
- 1
- The index is built over a partitioned table and is partitioned.
ACCPTH_TYPE ACCPTHTYPE CHAR(1) Indicates the type of index:
- 0
- The index is a maximum 1 terabyte (*MAX1TB) binary radix index.
- 1
- The index is a maximum 4 gigabyte (*MAX4GB) binary radix index.
- 2
- The index is an encoded vector index.
UNIQUE UNIQUE CHAR(1) Indicates whether an index is unique:
- 0
- The index is a UNIQUE index.
- 1
- The index is a UNIQUE WHERE NOT NULL index.
- 2
- The index is a non-unique first-in-first-out (FIFO) index.
- 3
- The index is a non-unique last-in-last-out (LIFO) index.
- 4
- The index is a non-unique first-change-first-out (FCFO) index.
SRTSEQ_TYPE SRTSEQ CHAR(1) Indicates whether the index uses a collating sequence:
- 0
- The index does not use a collating table.
- 1
- The index uses an alternate collating sequence (ALTSEQ).
- 2
- The index uses an sort sequence (SRTSEQ).
LOGICAL_PAGE_SIZE PAGE_SIZE INTEGER Nullable
The logical page size of the index. If the index is an encoded vector index, contains null. OVERFLOW_VALUES OVERFLOW INTEGER Nullable
The number of distinct key values that have overflowed the encoded vector index. If the index is not an encoded vector index, contains null. EVI_CODE_SIZE CODE_SIZE INTEGER Nullable
The size of the byte code of the encoded vector index. If the index is not an encoded vector index, contains null. LOGICAL_READS LGLREADS BIGINT Number of logical read operations for the index since the last IPL. PHYSICAL_READS PHYREADS BIGINT Number of physical read operations for the index since the last IPL. SEARCH_CONDITION IXWHERECON VARGRAPHIC(1024) CCSID(1200) If an index is sparse, the search condition of the index. If the length of the search condition exceeds 1024, '...' is returned at the end of the column value. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System schema name. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System table name. SYSTEM_TABLE_MEMBER SYS_MNAME CHAR(10) System member name.
SYSPARTITIONSTAT
The SYSPARTITIONSTAT view contains one row for every table partition or table member. If the table is a distributed table, the partitions that reside on other database nodes are not contained in this catalog view. They are contained in the catalog views of the other database nodes. The following table describes the columns in the SYSPARTITIONSTAT view:
Table 129. SYSPARTITIONSTAT view Column name System Column Name Data Type Description TABLE_SCHEMA TABSCHEMA VARCHAR(128) Name of the SQL schema that contains the table. TABLE_NAME TABNAME VARCHAR(128) Name of the table. TABLE_PARTITION TABPART VARCHAR(128) Name of the table partition or member. PARTITION_TYPE PARTTYPE CHAR(1) The type of the table partitioning:
- blank
- The table is not partitioned.
- H
- This is data hash partitioning.
- R
- This is data range partitioning.
- D
- This is distributed database hash partitioning.
PARTITION_NUMBER PARTNBR INTEGER Nullable
The partition number of this partition. If the table is a distributed table, contains null. NUMBER_DISTRIBUTED_PARTITIONS DSTPARTS INTEGER Nullable
If the table is a distributed table, contains the total number of partitions. If the table is not a distributed table, contains null. NUMBER_ROWS CARD BIGINT Number of valid rows in the table partition or member. NUMBER_ROW_PAGES NPAGES BIGINT Number of 64K pages in the partition's data. NUMBER_PAGES FPAGES BIGINT Same as NUMBER_ROW_PAGES. OVERFLOW OVERFLOW BIGINT The estimated number of rows that have overflowed to variable length segments. If the table does not contain variable length or LOB columns, contains 0. CLUSTERED CLUSTERED CHAR(1) Nullable
Not applicable for DB2 for i5/OS. Will always be null. ACTIVE_BLOCKS ACTBLOCKS BIGINT Not applicable for DB2 for i5/OS. Will always be -1. AVGCOMPRESSEDROWSIZE ACROWSIZE BIGINT Not applicable for DB2 for i5/OS. Will always be -1. AVGROWCOMPRESSIONRATIO ACROWRATIO REAL Not applicable for DB2 for i5/OS. Will always be -1. AVGROWSIZE AVGROWSIZE BIGINT Average length (in bytes) of a row in this table. If the table has variable length or LOB columns, contains -1. PCTROWSCOMPRESSED PCTCROWS REAL Not applicable for DB2 for i5/OS. Will always be -1. PCTPAGESSAVED PCTPGSAVED SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. NUMBER_DELETED_ROWS DELETED BIGINT Number of deleted rows in the table partition or member. DATA_SIZE SIZE BIGINT Total size (in bytes) of the data space in the partition or member. VARIABLE_LENGTH_SIZE VLSIZE BIGINT Size (in bytes) of the variable-length data space segments in the partition or member. FIXED_LENGTH_EXTENTS FLEXTENTS BIGINT Number of fixed-length data space segment extents in the partition or member. VARIABLE_LENGTH_EXTENTS VLEXTENTS BIGINT Number of variable-length data space segment extents in the partition or member. COLUMN_STATS_SIZE CSTATSSIZE BIGINT Size (in bytes) of the column statistics in the partition or member. MAINTAINED_TEMPORARY_INDEX_SIZE MTISIZE BIGINT Size (in bytes) of all maintained temporary indexes over the partition or member. NUMBER_DISTINCT_INDEXES DISTINCTIX INTEGER The number of distinct indexes built over the partition or member. This does not include maintained temporary indexes. OPEN_OPERATIONS OPENS BIGINT Number of full opens of the partition or member since the last IPL. CLOSE_OPERATIONS CLOSES BIGINT Number of full closes of the partition or member since the last IPL. INSERT_OPERATIONS INSERTS BIGINT Number of inserts operations for the partition or member since the last IPL. UPDATE_OPERATIONS UPDATES BIGINT Number of update operations for the partition or member since the last IPL. DELETE_OPERATIONS DELETES BIGINT Number of delete operations for the partition or member since the last IPL. CLEAR_OPERATIONS DSCLEARS BIGINT Number of clear operations (CLRPFM operations) for the partition or member since the last IPL. COPY_OPERATIONS DSCOPIES BIGINT Number of data space copy operations (certain CPYxxx operations) for the partition or member since the last IPL. REORGANIZE_OPERATIONS DSREORGS BIGINT Number of data space reorganize operations (non-interruptible RGZPFM operations) for the partition or member since the last IPL. INDEX_BUILDS DSINXBLDS BIGINT Number of creates or rebuilds of indexes that reference the partition or member since the last IPL. LOGICAL_READS LGLREADS BIGINT Number of logical read operations for the partition or member since the last IPL. PHYSICAL_READS PHYREADS BIGINT Number of physical read operations for the partition or member since the last IPL. LAST_CHANGE_TIMESTAMP LASTCHG TIMESTAMP Timestamp of the last change that occurred to the partition or member. LAST_SAVE_TIMESTAMP LASTSAVE TIMESTAMP Nullable
Timestamp of the last save of the partition or member. If the partition or member has never been saved, contains null. LAST_RESTORE_TIMESTAMP LASTRST TIMESTAMP Nullable
Timestamp of the last restore of the partition or member. If the partition or member has never been restored, contains null. LAST_USED_TIMESTAMP LASTUSED TIMESTAMP Nullable
Timestamp of the last time the partition or member was used directly by an application for native record I/O or SQL operations since the last time the usage statistics were reset. If the partition or member has never been used since the last time the usage statistics were reset, contains null. DAYS_USED_COUNT DAYSUSED INTEGER The number of days the partition or member was used directly by an application for native record I/O or SQL operations since the last time the usage statistics were reset. If the partition or member has never been used since the last time the usage statistics were reset, contains 0. LAST_RESET_TIMESTAMP LASTRESET TIMESTAMP Nullable
The timestamp of the last time the usage statistics were reset for the table. For more information see the Change Object Description (CHGOBJD) command. If the partition or member's last used timestamp has never been reset, contains null. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System schema name. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System table name. SYSTEM_TABLE_MEMBER SYS_MNAME CHAR(10) System member name.
SYSPROCS
The SYSPROCS view contains one row for each procedure created by the CREATE PROCEDURE statement. The following table describes the columns in the SYSPROCS view:
Table 130. SYSPROCS view Column Name System Column Name Data Type Description SPECIFIC_SCHEMA SPECSCHEMA VARCHAR(128) Schema name of the routine (procedure) instance. SPECIFIC_NAME SPECNAME VARCHAR(128) Specific name of the routine instance. ROUTINE_SCHEMA PROCSCHEMA VARCHAR(128) Name of the SQL schema (schema) that contains the routine. ROUTINE_NAME PROCNAME VARCHAR(128) Name of the routine. ROUTINE_CREATED RTNCREATE TIMESTAMP Identifies the timestamp when the routine was created. ROUTINE_DEFINER DEFINER VARCHAR(128) Name of the user that defined the routine. ROUTINE_BODY BODY VARCHAR(8) The type of the routine body:
- EXTERNAL
- This is an external routine.
- SQL
- This is an SQL routine.
EXTERNAL_NAME EXTNAME VARCHAR(279) Nullable
This column identifies the external program name.
- For ILE service programs, the external program name is schema-name/service-program-name(entry-point-name).
- For REXX, the external program name is schema-name/source-file-name(member-name).
- For Java programs, the external program name is an optional jar-id followed by a fully-qualified-class-name!method-name or fully-qualified-class-name.method-name.
- For all other languages, the external program name is schema-name/program-name.
EXTERNAL_LANGUAGE LANGUAGE VARCHAR(8) Nullable
If this is an external routine, this column identifies the external program name.
- C
- The external program is written in C.
- C++
- The external program is written in C++.
- CL
- The external program is written in CL.
- COBOL
- The external program is written in COBOL.
- COBOLLE
- The external program is written in ILE COBOL.
- FORTRAN
- The external program is written in FORTRAN.
- JAVA
- The external program is written in JAVA.
- PLI
- The external program is written in PL/I.
- REXX
- The external program is a REXX procedure.
- RPG
- The external program is written in RPG.
- RPGLE
- The external program is written in ILE RPG.
Contains the null value if this is not an external routine.
PARAMETER_STYLE PARM_STYLE VARCHAR(7) Nullable
If this is an external routine, this column identifies the parameter style (calling convention).
- DB2GNRL
- This is the DB2GENERAL calling convention.
- DB2SQL
- This is the DB2SQL calling convention.
- GENERAL
- This is the GENERAL calling convention.
- JAVA
- This is the JAVA calling convention.
- NULLS
- This is the GENERAL WITH NULLS calling convention.
- SQL
- This is the SQL standard calling convention.
Contains the null value if this is not an external routine.
IS_DETERMINISTIC DETERMINE VARCHAR(3) This column identifies whether the routine is deterministic. That is, whether a call to the routine with the same arguments will always return the same result.
- NO
- The routine is not deterministic.
- YES
- The routine is deterministic.
SQL_DATA_ACCESS DATAACCESS VARCHAR(8) This column identifies whether a routine contains SQL and whether it reads or modifies data.
- NONE
- The routine does not contain any SQL statements.
- CONTAINS
- The routine contains SQL statements.
- READS
- The routine possibly reads data from a table or view.
- MODIFIES
- The routine possibly modifies data in a table or view or issues SQL DDL statements.
SQL_PATH SQL_PATH VARCHAR(3483) Nullable
If this is an SQL routine, this column identifies the path. Contains the null value if this is not an SQL routine.
PARM_SIGNATURE SIGNATURE VARCHAR(2048) This column identifies the routine signature. RESULT_SETS RESULTS SMALLINT Identifies the maximum number of result sets returned. 0 indicates that there are no result sets. IN_PARMS IN_PARMS SMALLINT Identifies the number of input parameters. 0 indicates that there are no input parameters. OUT_PARMS OUT_PARMS SMALLINT Identifies the number of output parameters. 0 indicates that there are no output parameters. INOUT_PARMS INOUT_PARM SMALLINT Identifies the number of input/output parameters. 0 indicates that there are no input/output parameters. LONG_COMMENT REMARKS VARCHAR(2000) Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
ROUTINE_DEFINITION ROUTINEDEF VARCHAR(24000) Nullable
If this is an SQL routine, this column contains the SQL routine body. Contains the null value if this is not an SQL routine or if the routine body cannot be contained in this column without truncation.
DBINFO DBINFO VARCHAR(3) Nullable
Identifies whether information about the database is passed to the procedure.
- NO
- No database information is passed to the procedure.
- YES
- Information about the database is passed to the procedure.
COMMIT_ON_RETURN CMTONRET VARCHAR(3) Nullable
This column identifies whether the procedure commits on a successful return from the procedure.
- NO
- A commit is not performed on successful return from the procedure.
- YES
- A commit is performed on successful return from the procedure.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number. NEW_SAVEPOINT_LEVEL NEWSAVEPTL VARCHAR(3) Nullable
This column identifies whether the routine starts a new savepoint level.
- NO
- A new savepoint level is not started.
- YES
- A new savepoint level is started.
SYSREFCST
The SYSREFCST view contains one row for each foreign key in the SQL schema. The following table describes the columns in the SYSREFCST view:
Table 131. SYSREFCST view Column Name System Column Name Data Type Description CONSTRAINT_SCHEMA CDBNAME VARCHAR(128) Name of the schema containing the constraint. CONSTRAINT_NAME RELNAME VARCHAR(128) Name of the constraint. UNIQUE_CONSTRAINT_SCHEMA UNQDBNAME VARCHAR(128) Name of the SQL schema containing the unique constraint referenced by the referential constraint. UNIQUE_CONSTRAINT_NAME UNQNAME VARCHAR(128) Name of the unique constraint referenced by the referential constraint. MATCH_OPTION MATCH VARCHAR(7) Match option. Will always be NONE. UPDATE_RULE UPDATE VARCHAR(11) Update Rule.
- NO ACTION
- RESTRICT
DELETE_RULE DELETE VARCHAR(11) Delete Rule
- NO ACTION
- CASCADE
- SET NULL
- SET DEFAULT
- RESTRICT
COLUMN_COUNT COLCOUNT INTEGER Number of columns in the foreign key.
SYSROUTINEDEP
The SYSROUTINEDEP view records the dependencies of routines. The following table describes the columns in the SYSROUTINEDEP view:
Table 132. SYSROUTINEDEP view Column name System Column Name Data Type Description SPECIFIC_SCHEMA SPECSCHEMA VARCHAR(128) Schema name of the routine instance. SPECIFIC_NAME SPECNAME VARCHAR(128) Specific name of the routine instance. OBJECT_SCHEMA BSCHEMA VARCHAR(128) Name of the SQL schema that contains the object. OBJECT_NAME BNAME VARCHAR(128) Name of the object the routine is dependent on. OBJECT_TYPE BTYPE CHAR(24) Indicates the object type of the object referenced in the routine:
- ALIAS
- The object is an alias.
- FUNCTION
- The object is a function.
- INDEX
- The object is an index.
- MATERIALIZED QUERY TABLE
- The object is a materialized query table.
- PROCEDURE
- The object is a procedure.
- SCHEMA
- The object is a schema.
- SEQUENCE
- The object is a sequence.
- TABLE
- The object is a table.
If the object does not exist at the time the routine is created or the OBJECT_SCHEMA is *LIBL, TABLE may be returned even though the actual object used at run time may be an alias, materialized query table, or view.
- TYPE
- The object is a distinct type.
- VIEW
- The object is a view.
PARM_SIGNATURE SIGNATURE VARCHAR(10000) Nullable
This column identifies the routine signature. Contains the null value if the object is not a routine.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number of the object. NUMBER_OF_PARMS NUMPARMS SMALLINT Nullable
Identifies the number of parameters. Contains the null value if the object is not a routine.
SYSROUTINES
The SYSROUTINES table contains one row for each procedure created by the CREATE PROCEDURE statement and each function created by the CREATE FUNCTION statement. The following table describes the columns in the SYSROUTINES table:
Table 133. SYSROUTINES table Column Name System Column Name Data Type Description SPECIFIC_SCHEMA SPECSCHEMA VARCHAR(128) Schema name of the routine instance. SPECIFIC_NAME SPECNAME VARCHAR(128) Specific name of the routine instance. ROUTINE_SCHEMA RTNSCHEMA VARCHAR(128) Name of the SQL schema (schema) that contains the routine. ROUTINE_NAME RTNNAME VARCHAR(128) Name of the routine. ROUTINE_TYPE RTNTYPE VARCHAR(9) Type of the routine.
- PROCEDURE
- This is a procedure.
- FUNCTION
- This is a function.
ROUTINE_CREATED RTNCREATE TIMESTAMP Identifies the timestamp when the routine was created. ROUTINE_DEFINER DEFINER VARCHAR(128) Name of the user that defined the routine. ROUTINE_BODY BODY VARCHAR(8) The type of the routine body:
- EXTERNAL
- This is an external routine.
- SQL
- This is an SQL routine.
EXTERNAL_NAME EXTNAME VARCHAR(279) Nullable
This column identifies the external program name.
- For SQL functions or ILE service programs, the external program name is schema-name/service-program-name(entry-point-name).
- For REXX, the external program name is schema-name/source-file-name(member-name).
- For Java programs, the external program name is an optional jar-id followed by a fully-qualified-class-name!method-name or fully-qualified-class-name.method-name.
- For all other languages, the external program name is schema-name/program-name.
Contains the null value if this is a system-generated function.
EXTERNAL_LANGUAGE LANGUAGE VARCHAR(8) Nullable
If this is an external routine, this column identifies the external program name.
- C
- The external program is written in C.
- C++
- The external program is written in C++.
- CL
- The external program is written in CL.
- COBOL
- The external program is written in COBOL.
- COBOLLE
- The external program is written in ILE COBOL.
- FORTRAN
- The external program is written in FORTRAN.
- JAVA
- The external program is written in JAVA.
- PLI
- The external program is written in PL/I.
- REXX
- The external program is a REXX procedure.
- RPG
- The external program is written in RPG.
- RPGLE
- The external program is written in ILE RPG.
Contains the null value if this is not an external routine.
PARAMETER_STYLE PARM_STYLE VARCHAR(7) Nullable
If this is an external routine, this column identifies the parameter style (calling convention).
- DB2GNRL
- This is the DB2GENERAL calling convention.
- DB2SQL
- This is the DB2SQL calling convention.
- GENERAL
- This is the GENERAL calling convention.
- JAVA
- This is the JAVA calling convention.
- NULLS
- This is the GENERAL WITH NULLS calling convention.
- SQL
- This is the SQL standard calling convention.
Contains the null value if this is not an external routine.
IS_DETERMINISTIC DETERMINE VARCHAR(3) This column identifies whether the routine is deterministic. That is, whether a call to the routine with the same arguments will always return the same result.
- NO
- The routine is not deterministic.
- YES
- The routine is deterministic.
SQL_DATA_ACCESS DATAACCESS VARCHAR(8) Nullable
This column identifies whether a routine contains SQL and whether it reads or modifies data.
- NONE
- The routine does not contain any SQL statements.
- CONTAINS
- The routine contains SQL statements.
- READS
- The routine possibly reads data from a table or view.
- MODIFIES
- The routine possibly modifies data in a table or view or issues SQL DDL statements.
SQL_PATH SQL_PATH VARCHAR(3483) Nullable
If this is an SQL routine, this column identifies the path. Contains the null value if this is not an SQL routine.
PARM_SIGNATURE SIGNATURE VARCHAR(2048) This column identifies the routine signature. NUMBER_OF_RESULTS NUMRESULTS SMALLINT Identifies the number of results. MAX_DYNAMIC_RESULT_SETS RESULTS SMALLINT Identifies the maximum number of result sets returned. 0 indicates that there are no result sets. IN_PARMS IN_PARMS SMALLINT Identifies the number of input parameters. 0 indicates that there are no input parameters. OUT_PARMS OUT_PARMS SMALLINT Identifies the number of output parameters. 0 indicates that there are no output parameters. INOUT_PARMS INOUT_PARM SMALLINT Identifies the number of input/output parameters. 0 indicates that there are no input/output parameters. PARSE_TREE PARSE_TREE VARCHAR(1024) FOR BIT DATA If this is a routine, this column identifies the parse tree of the CREATE FUNCTION or CREATE PROCEDURE statement. It is only used internally. PARM_ARRAY PARM_ARRAY BLOB(320000) If this is an external routine, this column identifies the parameter array built from the CREATE FUNCTION or CREATE PROCEDURE statement. It is only used internally. LONG_COMMENT REMARKS VARCHAR(2000) Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
ROUTINE_DEFINITION ROUTINEDEF DBCLOB(2M) CCSID 13488 Nullable
If this is an SQL routine, this column contains the SQL routine body. Contains the null value if this is not an SQL routine or if the routine body cannot be contained in this column without truncation.
FUNCTION_ORIGIN ORIGIN CHAR(1) Identifies the type of function. If this is a procedure, this column contains a blank.
- B
- This is a built-in function (defined by DB2 for i5/OS).
- E
- This is a user-defined function.
- U
- This is a user-defined function that is sourced on another function.
- S
- This is a system-generated function.
FUNCTION_TYPE TYPE CHAR(1) Identifies the form of the function. If this is a procedure, this column contains a blank.
- S
- This is a scalar function.
- C
- This is a column function.
- T
- This is a table function.
EXTERNAL_ACTION EXTACTION CHAR(1) Nullable
Identifies whether the invocation of the function has external effects.
- E
- This function has external side effects.
- N
- This function does not have any external side effects.
Contains the null value if the routine is a procedure.
IS_NULL_CALL NULL_CALL VARCHAR(3) Nullable
Identifies whether the function needs to be called if an input parameter is the null value.
- NO
- This function need not be called if an input parameter is the null value. If this is a scalar function, the result of the function is implicitly null if any of the operands are null. If this is a table function, the result of the function is an empty table if any of the operands are the null value.
- YES
- This function must be called even if an input operand is null.
Contains the null value if the routine is a procedure.
SCRATCH_PAD SCRATCHPAD INTEGER Nullable
Identifies whether the address of a static memory area (scratch pad) is passed to the function.
- 0
- The function does not have a scratch pad.
- integer
- Indicates the size of the scratch pad passed to the function.
Contains the null value if the routine is a procedure.
FINAL_CALL FINAL_CALL VARCHAR(3) Nullable
Indicates whether a final call to the function should be made to allow the function to clean up its work areas (scratch pads).
- NO
- No final call is made.
- YES
- A final call to the function is made when the statement is complete.
Contains the null value if the routine is a procedure.
PARALLELIZABLE PARALLEL VARCHAR(3) Nullable
Identifies whether the function can be run in parallel.
- NO
- The function must be synchronous.
- YES
- The function can be run in parallel.
Contains the null value if the routine is a procedure.
DBINFO DBINFO VARCHAR(3) Nullable
Identifies whether information about the database is passed to the routine.
- NO
- No database information is passed to the routine.
- YES
- Information about the database is passed to the routine.
Contains the null value if the routine is a procedure.
SOURCE_SPECIFIC_SCHEMA SRCSCHEMA VARCHAR(128) Nullable
If this is sourced function and the source is user-defined, this column contains the name of the source schema. If this is a sourced function and the source is built-in, this column contains 'QSYS2'. Contains the null value if the routine is not a sourced function.
SOURCE_SPECIFIC_NAME SRCNAME VARCHAR(128) Nullable
If this is sourced function and the source is user-defined, this column contains the specific name of the source function name. Contains the null value if the routine is not a sourced function.
IS_USER_ DEFINED_CAST CAST_FUNC VARCHAR(3) Nullable
Identifies whether the this function is a cast function created when a distinct type was created.
- NO
- This function is not a cast function.
- YES
- This function is a cast function.
Contains the null value if the routine is a procedure.
CARDINALITY CARD BIGINT Nullable
Specifies the cardinality for a table function. Contains the null value if the function is not a table function or if cardinality was not specified.
FENCED FENCED VARCHAR(3) Nullable
Identifies whether a function is fenced.
- NO
- The function is not fenced.
- YES
- The function is fenced.
Contains the null value if the routine is a procedure.
COMMIT_ON_RETURN CMTONRET VARCHAR(3) Nullable
This column identifies whether the procedure commits on a successful return from the procedure.
- NO
- A commit is not performed on successful return from the procedure.
- YES
- A commit is performed on successful return from the procedure.
Contains the null value if the routine is a function.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number. NEW_SAVEPOINT_LEVEL NEWSAVEPTL VARCHAR(3) Nullable
This column identifies whether the routine starts a new savepoint level.
- NO
- A new savepoint level is not started.
- YES
- A new savepoint level is started.
Contains the null value if the routine is a function.
LAST_ALTERED ALTEREDTS TIMESTAMP Nullable
Timestamp when routine was last altered. Contains null if the routine has never been altered. DEBUG_MODE DEBUG_MODE CHAR(1) Identifies whether the routine is debuggable.
- 0
- The routine is not debuggable.
- 1
- The routine is debuggable by the Unified Debugger.
- 2
- The routine is debuggable by the system debugger.
- N
- The routine is disabled from being debugged by the Unified Debugger.
DEBUG_DATA DEBUG_DATA CLOB(1048576)
Nullable
Reserved. Contains the null value.
SYSSEQUENCES
The SYSSEQUENCES view contains one row for every sequence object in the SQL schema. The following table describes the columns in the SYSSEQUENCES view:
Table 134. SYSSEQUENCES view Column name System Column Name Data Type Description SEQUENCE_SCHEMA SEQSCHEMA VARCHAR(128) The name of the SQL schema containing the sequence. SEQUENCE_NAME SEQNAME VARCHAR(128) Name of the sequence. MAXIMUM_VALUE MAXVALUE DECIMAL(63,0)
Maximum value of the sequence. MINIMUM_VALUE MINVALUE DECIMAL(63,0)
Minimum value of the sequence. INCREMENT INCREMENT INTEGER
Increment value of the sequence. CYCLE_OPTION CYCLE VARCHAR(3)
Identifies whether the sequence values will continue to be generated after the minimum or maximum value has been reached.
- NO
- Values will not continue to be generated.
- YES
- Values will continue to be generated.
CACHE CACHE INTEGER
Specifies the number of sequence values that may be preallocated for faster access. Zero indicates that the values will not be preallocated. ORDER ORDER VARCHAR(3)
Specifies whether the sequence values must be generated in order of the request.
- NO
- Values do not need to be generated in order of the request.
- YES
- Values must be generated in order of the request.
DATA_TYPE DATA_TYPE VARCHAR(128) Type of sequence:
- BIGINT
- Big number
- INTEGER
- Large number
- SMALLINT
- Small number
- DECIMAL
- Packed decimal
- NUMERIC
- Zoned decimal
- DISTINCT
- Distinct type
NUMERIC_PRECISION PRECISION INTEGER
The precision of all numeric columns. USER_DEFINED_TYPE_SCHEMA TYPESCHEMA VARCHAR(128)
Nullable
The name of the schema if this is a distinct type. Contains the null value if the sequence is not a distinct type.
USER_DEFINED_TYPE_NAME TYPENAME VARCHAR(128)
Nullable
The name of the distinct type. Contains the null value if the sequence is not a distinct type.
START START DECIMAL(63,0)
Starting value of the sequence. MAXASSIGNEDVAL MAXASNVAL DECIMAL(63,0)
Nullable
Last possible assigned sequence value. This value includes any values that were cached, but not used. Contains the null value when the sequence is created. Is not null after the first value is assigned.
SEQUENCE_DEFINER DEFINER VARCHAR(128) The authorization ID under which the sequence was created. SEQUENCE_CREATED CREATEDTS TIMESTAMP Timestamp when the sequence was created. LAST_ALTERED_TIMESTAMP ALTEREDTS TIMESTAMP Timestamp when the sequence was last altered. SEQUENCE_TEXT LABEL VARCHAR(50)
Nullable
A character string supplied with the LABEL statement (sequence text). Contains the null value if the sequence has no sequence text.
LONG_COMMENT REMARKS VARCHAR(2000)
Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
SYSTEM_SEQ_SCHEMA SYSSSCHEMA CHAR(10) The system name of the schema SYSTEM_SEQ_NAME SYSSNAME CHAR(10) The system name of the sequence IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number.
SYSTABLEDEP
The SYSTABLEDEP view records the dependencies of materialized query tables. The following table describes the columns in the SYSTABLEDEP view:
Table 135. SYSTABLEDEP view Column name System Column Name Data Type Description TABLE_SCHEMA TABSCHEMA VARCHAR(128) Name of the SQL schema that contains the table, view or alias TABLE_NAME TABNAME VARCHAR(128) Name of the table, view or alias. This is the SQL table, view or alias name if it exists; otherwise, it is the system table, view or alias name. OBJECT_SCHEMA BSCHEMA VARCHAR(128) Name of the SQL schema that contains the object. OBJECT_NAME BNAME VARCHAR(128) Name of the object the materialized query table is dependent on. OBJECT_TYPE BTYPE CHAR(24) Indicates the object type of the object referenced in the materialized query table:
- FUNCTION
- The object is a function.
- TABLE
- The object is a table.
- TYPE
- The object is a distinct type.
- VIEW
- The object is a view.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number of the object. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System schema name SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System table name. PARM_SIGNATURE SIGNATURE VARCHAR(10000) Nullable
This column identifies the routine signature. Contains the null value if the object is not a routine.
SYSTABLEINDEXSTAT
The SYSTABLEINDEXSTAT view contains one row for every index that has at least one partition or member built over a table. If the index is over more than one partition or member, the statistics include all those partitions and members. If the table is a distributed table, the partitions that reside on other database nodes are not included. They are contained in the catalog views of the other database nodes. The following table describes the columns in the SYSTABLEINDEXSTAT view:
Table 136. SYSTABLEINDEXSTAT view Column name System Column Name Data Type Description TABLE_SCHEMA TABSCHEMA VARCHAR(128) Name of the SQL schema that contains the table. TABLE_NAME TABNAME VARCHAR(128) Name of the table. PARTITION_TYPE PARTTYPE CHAR(1) The type of the table partitioning:
- blank
- The table is not partitioned.
- H
- This is data hash partitioning.
- R
- This is data range partitioning.
- D
- This is distributed database hash partitioning.
NUMBER_PARTITIONS NBRPARTS INTEGER Number of partitions or members of the table. NUMBER_DISTRIBUTED_PARTITIONS DSTPARTS INTEGER Nullable
If the table is a distributed table, contains the total number of partitions. If the table is not a distributed table, contains null. INDEX_SCHEMA INDSCHEMA VARCHAR(128) Name of the SQL schema that contains the index, logical file, or constraint. INDEX_NAME INDNAME VARCHAR(128) Name of the index, logical file, or constraint. INDEX_TYPE INDTYPE VARCHAR(11) The type of the index:
- INDEX
- The index is an SQL index.
- LOGICAL
- The index is part of a logical file.
- PRIMARY KEY
- The index is a primary key constraint.
- UNIQUE
- The index is a unique constraint.
- REFERENTIAL
- The index is a foreign key constraint.
NUMBER_KEY_COLUMNS INDKEYS BIGINT Number of columns that define the index key. COLUMN_NAMES COLNAMES VARCHAR(1024) A comma separated list of column names that define the index key. If the length of all the column names exceeds 1024, '...' is returned at the end of the column value. NUMBER_LEAF_PAGES NLEAF BIGINT Not applicable for DB2 for i5/OS. Will always be -1. NUMBER_LEVELS NLEVELS SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. FIRSTKEYCARD KEYCARD1 BIGINT The total number of distinct first key values for all index partitions. If the index is an encoded vector index, -1 is returned. FIRST2KEYCARD KEYCARD2 BIGINT The total number of distinct keys using the first two columns for all index partitions. If the index is an encoded vector index, -1 is returned. FIRST3KEYCARD KEYCARD3 BIGINT The total number of distinct keys using the first three columns for all index partitions. If the index is an encoded vector index, -1 is returned. FIRST4KEYCARD KEYCARD4 BIGINT The total number of distinct keys using the first four columns for all index partitions. If the index is an encoded vector index, -1 is returned. FULLKEYCARD KEYCARDF BIGINT The total number of distinct full key values for all index partitions. If the index has more than 4 key columns or is an encoded vector index, -1 is returned. CLUSTERRATIO CLSRATIO SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. CLUSTERFACTOR CLSFACTOR DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. SEQUENTIAL_PAGES SEQPAGES BIGINT Not applicable for DB2 for i5/OS. Will always be -1. DENSITY DENSITY INTEGER Not applicable for DB2 for i5/OS. Will always be -1. PAGE_FETCH_PAIRS FETCHPAIRS VARCHAR(520) Not applicable for DB2 for i5/OS. Will always be -1. NUMBER_KEYS NUMRIDS BIGINT The total number of keys for all index partitions. If the index is invalid or is an encoded vector index, -1 is returned. NUMRIDS_DELETED NUMRIDSDLT BIGINT Not applicable for DB2 for i5/OS. Will always be 0. NUM_EMPTY_LEAFS EMPTYLEAFS BIGINT Not applicable for DB2 for i5/OS. Will always be 0. AVERAGE_RANDOM_FETCH_PAGES AVGRNDFTCH DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_RANDOM_PAGES AVGRNDPAGE DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_SEQUENCE_GAP AVGSEQGAP DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_SEQUENCE_FETCH_GAP AVGSEQFGAP DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_SEQUENCE_PAGES AVGSEQPAGE DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVERAGE_SEQUENCE_FETCH_PAGES AVGSEQFPAG DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVGPARTITION_CLUSTERRATIO PCLSRATIO SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. AVGPARTITION_CLUSTERFACTOR PCLSFACTOR DOUBLE Not applicable for DB2 for i5/OS. Will always be -1. AVGPARTITION_PAGE_FETCH_PAIRS PFETCHPAIR VARCHAR(520) Not applicable for DB2 for i5/OS. Will always be an empty string. DATAPARTITION_CLUSTERFACTOR DCLSFACTOR DOUBLE A statistic measuring the "clustering" of the index keys with regard to data partitions. It is a number between 0 and 1, with 1 representing perfect clustering and 0 representing no clustering. INDCARD INDCARD BIGINT Number of keys in the index. If the index is invalid or is an encoded vector index, -1 is returned. INDEX_VALID VALID CHAR(1) An indication or whether any index is invalid and needs to be rebuilt:
- 0
- At least one partition or member for the index is invalid.
- 1
- All partitions or members for the index are valid.
INDEX_HELD HELD CHAR(1) An indication or whether a pending rebuild of the index is currently held by the user:
- 0
- No rebuilds are pending or held for any partition or member of the index.
- 1
- A pending rebuild for at least one partition or member for the index is held.
CREATE_TIMESTAMP CREATED TIMESTAMP Maximum timestamp when any partition or member of the index was created. LAST_BUILD_TIMESTAMP LASTBUILD TIMESTAMP Maximum timestamp when any partition or member of the index was last rebuilt. LAST_QUERY_USE LASTQRYUSE TIMESTAMP Nullable
Maximum timestamp of the last time any partition or member of the index was used in a query since the last time the usage statistics were reset. If no partition or member of the index has ever been used in a query since the last time the usage statistics were reset, contains null. LAST_STATISTICS_USE LASTSTUSE TIMESTAMP Nullable
Maximum timestamp of the last time any partition or member of the index was used by the optimizer for statistics since the last time the usage statistics were reset. If no partition or member of the index has ever been used for statistics since the last time the usage statistics were reset, contains null. QUERY_USE_COUNT QRYUSECNT BIGINT Total number of times any partition or member of the index was used in a query since the last time the usage statistics were reset. If no partition or member of the index has ever been used in a query since the last time the usage statistics were reset, contains 0. QUERY_STATISTICS_COUNT QRYSTCNT BIGINT Total number of times any partition or member of the index was used by the optimizer for statistics since the last time the usage statistics were reset. If no partition or member of the index has ever been used for statistics since the last time the usage statistics were reset, contains 0. LAST_USED_TIMESTAMP LASTUSED TIMESTAMP Nullable
Maximum timestamp of the last time any partition or member of the index was used directly by an application for native record I/O or SQL operations since the last time the usage statistics were reset. If no partition or member of the index has ever been used since the last time the usage statistics were reset, contains null. DAYS_USED_COUNT DAYSUSED INTEGER Maximum number of days any partition or member of the index was used directly by an application for native record I/O or SQL operations since the last time the usage statistics were reset. If no partition or member of the index has ever been used since the last time the usage statistics were reset, contains 0. LAST_RESET_TIMESTAMP LASTRESET TIMESTAMP Nullable
Maximum timestamp of the last time the usage statistics were reset for the index. For more information see the Change Object Description (CHGOBJD) command. If the index's last used timestamp has never been reset, contains null. INDEX_SIZE SIZE BIGINT Total size (in bytes) of the binary trees or encoded vector indexes of all partitions or members of the index. ESTIMATED_BUILD_TIME ESTBLDTIME INTEGER Maximum estimated time (in milliseconds) required to rebuild any partition or member of the index. DELAYED_MAINT_KEYS DLYKEYS INTEGER Nullable
Maximum number of keys that need to be inserted into the binary tree of any partition or member of a delayed maintenance index. If the index is not a delayed maintenance index, contains null. SPARSE SPARSE CHAR(1) Indicates whether the index contains keys for all the rows of its depended on table:
- 0
- The index contains keys for all the rows of its depended on table.
- 1
- The index is a select/omit logical file and does not contain keys for all the rows of its depended on table.
DERIVED_KEY DERIVED CHAR(1) Indicates whether the any key columns in the index are expressions:
- 0
- No key columns of the index are expressions.
- 1
- At least one key column is an expression. Currently, this is only possible in a DDS-created logical file or temporary index.
PARTITIONED PARTITION CHAR(1) Indicates whether the index is partitioned or not partitioned:
- 0
- The index is not built over a partitioned table or is not partitioned.
- 1
- The index is built over a partitioned table and is partitioned.
ACCPTH_TYPE ACCPTHTYPE CHAR(1) Indicates the type of index:
- 0
- The index is a maximum 1 terabyte (*MAX1TB) binary radix index.
- 1
- The index is a maximum 4 gigabyte (*MAX4GB) binary radix index.
- 2
- The index is an encoded vector index.
UNIQUE UNIQUE CHAR(1) Indicates whether an index is unique:
- 0
- The index is a UNIQUE index.
- 1
- The index is a UNIQUE WHERE NOT NULL index.
- 2
- The index is a non-unique first-in-first-out (FIFO) index.
- 3
- The index is a non-unique last-in-last-out (LIFO) index.
- 4
- The index is a non-unique first-change-first-out (FCFO) index.
SRTSEQ_TYPE SRTSEQ CHAR(1) Indicates whether the index uses a collating sequence:
- 0
- The index does not use a collating table.
- 1
- The index uses an alternate collating sequence (ALTSEQ).
- 2
- The index uses an sort sequence (SRTSEQ).
LOGICAL_PAGE_SIZE PAGE_SIZE INTEGER Nullable
The logical page size of the index. If the index is an encoded vector index, contains null. OVERFLOW_VALUES OVERFLOW INTEGER Nullable
Maximum number of distinct key values that have overflowed any partition or member of the encoded vector index. If the index is not an encoded vector index, contains null. EVI_CODE_SIZE CODE_SIZE INTEGER Nullable
The size of the byte code of the encoded vector index. If the index is not an encoded vector index, contains null. LOGICAL_READS LGLREADS BIGINT Total number of logical read operations for any partition or member of the index since the last IPL. PHYSICAL_READS PHYREADS BIGINT Total number of physical read operations any partition or member of for the index since the last IPL. SEARCH_CONDITION IXWHERECON VARGRAPHIC(1024) CCSID(1200) If an index is sparse, the search condition of the index. If the length of the search condition exceeds 1024, '...' is returned at the end of the column value. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System schema name. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System table name.
SYSTABLES
The SYSTABLES view contains one row for every table, view or alias in the SQL schema, including the tables and views of the SQL catalog. The following table describes the columns in the SYSTABLES view:
Table 137. SYSTABLES view Column name System Column Name Data Type Description TABLE_NAME NAME VARCHAR(128) Name of the table, view or alias. This is the SQL table, view or alias name if it exists; otherwise, it is the system table, view or alias name. TABLE_OWNER CREATOR VARCHAR(128) Owner of the table, view or alias TABLE_TYPE TYPE CHAR(1) If the row describes a table, view, or alias:
- A
- Alias
- L
- Logical file
- M
- Materialized query table
- P
- Physical file
- T
- Table
- V
- View
COLUMN_COUNT COLCOUNT INTEGER Number of columns in the table or view. Zero for an alias. ROW_LENGTH RECLENGTH 114 INTEGER Maximum length of any record in the table. Zero for an alias. TABLE_TEXT LABEL CHAR(50) A character string provided with the LABEL statement. LONG_COMMENT REMARKS VARCHAR(2000)
Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
TABLE_SCHEMA DBNAME VARCHAR(128) Name of the SQL schema that contains the table, view or alias LAST_ALTERED_TIMESTAMP ALTEREDTS TIMESTAMP Timestamp when the table was last altered or created. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System table name. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System schema name FILE_TYPE FILETYPE CHAR(1) File type
- D
- Data file or alias
- S
- Source file
BASE_TABLE_SCHEMA TBDBNAME VARCHAR(128)
Nullable
For an alias, this is the name of the SQL schema that contains the table or view the alias is based on. Contains the null value if the table is not an alias.
BASE_TABLE_NAME TBNAME VARCHAR(128)
Nullable
For an alias, this is the name of the table or view the alias is based on. Contains the null value if the table is not an alias.
BASE_TABLE_MEMBER TBMEMBER VARCHAR(10)
Nullable
For an alias, this is the name of the file member the alias is based on. Contains *FIRST if this is an alias, but a member name was not specified. Contains the null value if the table is not an alias.
SYSTEM_TABLE SYSTABLE CHAR(1) System table
- N
- The table is not a system table.
- Y
- The table is a system table.
SELECT_OMIT SELECTOMIT CHAR(1) Select/omit logical file
- N
- The table is not a select/omit logical file.
- Y
- The table is a select/omit logical file.
IS_INSERTABLE_INTO INSERTABLE VARCHAR(3) Identifies whether an INSERT is allowed on the table.
- NO
- An INSERT is not allowed on this table.
- YES
- An INSERT is allowed on this table.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number. ENABLED ENABLED VARCHAR(3) Nullable
Indicates whether the materialized query table is enabled for optimization:
- NO
- The materialized query table is not enabled for optmization.
- YES
- The materialized query table is enabled for optmization.
Contains the null value if the table is not a materialized query table.
MAINTENANCE MAINTAIN VARCHAR(6) Nullable
Indicates whether the materialized query table is user or system maintained:
- USER
- The materialized query table is user maintained.
Contains the null value if the table is not a materialized query table.
REFRESH REFRESH VARCHAR(9) Nullable
Indicates the materialized query table REFRESH option:
- DEFERRED
- The materialized query table is REFRESH DEFERRED.
Contains the null value if the table is not a materialized query table.
REFRESH_TIME REFRESHDTS TIMESTAMP Nullable
Indicates the timestamp of the last materialized query table REFRESH: Contains the null value if the table is not a materialized query table or if the table has never been refreshed.
MQT_DEFINITION MQTDEF DBCLOB(2M) CCSID 13488 Nullable
Indicates the query expression of the materialized query table: Contains the null value if the table is not a materialized query table.
ISOLATION ISOLATION CHAR(2) Nullable
Indicates the isolation level used for the select-statement when refreshing the materialized query table: RR Repeatable Read (*RR)
RS Read Stability (*ALL)
CS Cursor Stability (*CS)
UR Uncommitted Read (*CHG)
NO None (*NONE)
Contains the null value if the table is not a materialized query table.
PARTITION_TABLE PART_TABLE VARCHAR(3) Indicates whether the table is a partitioned table:
- NO
- The table is not a partitioned table.
- YES
- The table is a partitioned table.
TABLE_DEFINER DEFINER VARCHAR(128) Name of the user that defined the table.
SYSTABLESTAT
The SYSTABLESTAT view contains one row for every table that has at least one partition or member. If the table has more than one partition or member, the statistics include all partitions and members. If the table is a distributed table, the partitions that reside on other database nodes are not included. They are contained in the catalog views of the other database nodes. The following table describes the columns in the SYSTABLESTAT view:
Table 138. SYSTABLESTAT view Column name System Column Name Data Type Description TABLE_SCHEMA TABSCHEMA VARCHAR(128) Name of the SQL schema that contains the table. TABLE_NAME TABNAME VARCHAR(128) Name of the table. PARTITION_TYPE PARTTYPE CHAR(1) The type of the table partitioning:
- blank
- The table is not partitioned.
- H
- This is data hash partitioning.
- R
- This is data range partitioning.
- D
- This is distributed database hash partitioning.
NUMBER_PARTITIONS NBRPARTS INTEGER Number of partitions or members of the table. NUMBER_DISTRIBUTED_PARTITIONS DSTPARTS INTEGER Nullable
If the table is a distributed table, contains the total number of partitions. If the table is not a distributed table, contains null. NUMBER_ROWS CARD BIGINT Number of valid rows in all partitions or members of the table. NUMBER_ROW_PAGES NPAGES BIGINT Number of 64K pages in all partitions or members of the table. NUMBER_PAGES FPAGES BIGINT Same as NUMBER_ROW_PAGES. OVERFLOW OVERFLOW BIGINT The estimated number of rows that have overflowed to variable length segments. If the table does not contain variable length or LOB columns, contains 0. CLUSTERED CLUSTERED CHAR(1) Nullable
Not applicable for DB2 for i5/OS. Will always be null. ACTIVE_BLOCKS ACTBLOCKS BIGINT Not applicable for DB2 for i5/OS. Will always be -1. AVGCOMPRESSEDROWSIZE ACROWSIZE BIGINT Not applicable for DB2 for i5/OS. Will always be -1. AVGROWCOMPRESSIONRATIO ACROWRATIO REAL Not applicable for DB2 for i5/OS. Will always be -1. AVGROWSIZE AVGROWSIZE BIGINT Average length (in bytes) of a row in this table. If the table has variable length or LOB columns, contains -1. PCTROWSCOMPRESSED PCTCROWS REAL Not applicable for DB2 for i5/OS. Will always be -1. PCTPAGESSAVED PCTPGSAVED SMALLINT Not applicable for DB2 for i5/OS. Will always be -1. NUMBER_DELETED_ROWS DELETED BIGINT Number of deleted rows in all partitions or members of the table. DATA_SIZE SIZE BIGINT Total size (in bytes) of the data spaces in all partitions or members of the table. VARIABLE_LENGTH_SIZE VLSIZE BIGINT Size (in bytes) of the variable-length data space segments in all partitions or members of the table. FIXED_LENGTH_EXTENTS FLEXTENTS BIGINT Number of fixed-length data space segment extents in all partitions or members of the table. VARIABLE_LENGTH_EXTENTS VLEXTENTS BIGINT Number of variable-length data space segment extents in all partitions or members of the table. COLUMN_STATS_SIZE CSTATSSIZE BIGINT Size (in bytes) of the column statistics in all partitions or members of the table. MAINTAINED_TEMPORARY_INDEX_SIZE MTISIZE BIGINT Size (in bytes) of all maintained temporary indexes over any partitions or members of the table. NUMBER_DISTINCT_INDEXES DISTINCTIX INTEGER The number of distinct indexes built over any partitions or members of the table. This does not include maintained temporary indexes. OPEN_OPERATIONS OPENS BIGINT Number of full opens of all partitions or members of the table since the last IPL. CLOSE_OPERATIONS CLOSES BIGINT Number of full closes of all partitions or members of the table since the last IPL. INSERT_OPERATIONS INSERTS BIGINT Number of inserts operations of all partitions or members of the table since the last IPL. UPDATE_OPERATIONS UPDATES BIGINT Number of update operations of all partitions or members of the table since the last IPL. DELETE_OPERATIONS DELETES BIGINT Number of delete operations of all partitions or members of the table since the last IPL. CLEAR_OPERATIONS DSCLEARS BIGINT Number of clear operations (CLRPFM operations) of all partitions or members of the table since the last IPL. COPY_OPERATIONS DSCOPIES BIGINT Number of data space copy operations (certain CPYxxx operations) of all partitions or members of the table since the last IPL. REORGANIZE_OPERATIONS DSREORGS BIGINT Number of data space reorganize operations (non-interruptible RGZPFM operations) of all partitions or members of the table since the last IPL. INDEX_BUILDS DSINXBLDS BIGINT Number of creates or rebuilds of indexes that reference any partition or member of the table since the last IPL. LOGICAL_READS LGLREADS BIGINT Number of logical read operations of all partitions or members of the table since the last IPL. PHYSICAL_READS PHYREADS BIGINT Number of physical read operations of all partitions or members of the table since the last IPL. LAST_CHANGE_TIMESTAMP LASTCHG TIMESTAMP Maximum timestamp of the last change that occurred to any partition or member of the table. LAST_SAVE_TIMESTAMP LASTSAVE TIMESTAMP Nullable
Minimum timestamp of the last save of any partition or member of the table. If no partition or member has been saved, contains null. LAST_RESTORE_TIMESTAMP LASTRST TIMESTAMP Nullable
Maximum timestamp of the last restore any partition or member of the table. If no partition or member has been restored, contains null. LAST_USED_TIMESTAMP LASTUSED TIMESTAMP Nullable
Maximum timestamp of the last time any partition or member was used directly by an application for native record I/O or SQL operations since the last time the usage statistics were reset. If no partition or member has ever been used, contains null. DAYS_USED_COUNT DAYSUSED INTEGER Maximum number of days any partition or member was used directly by an application for native record I/O or SQL operations since the last time the usage statistics were reset. If no partition or member has been used since the last time the usage statistics were reset, contains 0. LAST_RESET_TIMESTAMP LASTRESET TIMESTAMP Nullable
Maximum timestamp of the last time the usage statistics were reset for the table. For more information see the Change Object Description (CHGOBJD) command. If no partition or member's last used timestamp has ever been reset, contains null. SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) System schema name. SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) System table name.
SYSTRIGCOL
The SYSTRIGCOL view contains one row for each column either implicitly or explicitly referenced in the WHEN clause or the triggered SQL statements of a trigger. The following table describes the columns in the SYSTRIGCOL view:
Table 139. SYSTRIGCOL view Column Name System Column Name Data Type Description TRIGGER_SCHEMA TRIGSCHEMA VARCHAR(128) Name of the schema containing the trigger. TRIGGER_NAME TRIGNAME VARCHAR(128) Name of the trigger. TABLE_SCHEMA TABSCHEMA VARCHAR(128) Name of the schema containing the table or view that contains the column that is referenced in the trigger. TABLE_NAME TABNAME VARCHAR(128) Name of the table or view that contains the column that is referenced in the trigger. COLUMN_NAME TABCOLUMN VARCHAR(128) Name of the column that is referenced in the trigger. OBJECT_TYPE BTYPE CHAR(24) Indicates the object type of the object that contains the column referenced in the trigger:
- FUNCTION
- The object is a function.
- MATERIALIZED QUERY TABLE
- The object is a materialized query table.
- TABLE
- The object is a table.
- VIEW
- The object is a view.
SYSTRIGDEP
The SYSTRIGDEP view contains one row for each object referenced in the WHEN clause or the triggered SQL statements of a trigger. The following table describes the columns in the SYSTRIGDEP view:
Table 140. SYSTRIGDEP view Column Name System Column Name Data Type Description TRIGGER_SCHEMA TRIGSCHEMA VARCHAR(128) Name of the schema containing the trigger. TRIGGER_NAME TRIGNAME VARCHAR(128) Name of the trigger. OBJECT_SCHEMA BSCHEMA VARCHAR(128) Name of the schema containing the object referenced in the trigger. OBJECT_NAME BNAME VARCHAR(128) Name of the object referenced in the trigger. OBJECT_TYPE BTYPE CHAR(24) Indicates the object type of the object referenced in the trigger:
- ALIAS
- The object is an alias.
- FUNCTION
- The object is a function.
- INDEX
- The object is an index.
- MATERIALIZED QUERY TABLE
- The object is a materialized query table.
- PACKAGE
- The object is a package.
- PROCEDURE
- The object is a procedure.
- SCHEMA
- The object is a schema.
- SEQUENCE
- The object is a sequence.
- TABLE
- The object is a table.
- TYPE
- The object is a distinct type.
- VIEW
- The object is a view.
PARM_SIGNATURE SIGNATURE VARCHAR(10000) Nullable
This column identifies the routine signature. Contains the null value if the object is not a routine.
SYSTRIGGERS
The SYSTRIGGERS view contains one row for each trigger in an SQL schema. The following table describes the columns in the SYSTRIGGERS view:
Table 141. SYSTRIGGERS view Column Name System Column Name Data Type Description TRIGGER_SCHEMA TRIGSCHEMA VARCHAR(128) Name of the schema containing the trigger. TRIGGER_NAME TRIGNAME VARCHAR(128) Name of the trigger. EVENT_MANIPULATION TRIGEVENT VARCHAR(6) Indicates the event that causes the trigger to fire:
- DELETE
- Trigger fires on a DELETE.
- INSERT
- Trigger fires on a INSERT.
- UPDATE
- Trigger fires on a DELETE.
- READ
- Trigger fires when a row is read. This is only valid for triggers created via the ADDPFTRG command.
EVENT_OBJECT_SCHEMA TABSCHEMA VARCHAR(128) Name of the schema containing the subject table or view of the trigger. EVENT_OBJECT_TABLE TABNAME VARCHAR(128) Name of the subject table or view of the trigger. ACTION_ORDER ORDERSEQNO INTEGER The ordinal position of this trigger in the list of triggers for the table or view. This indicates the order in which the trigger will be fired. ACTION_CONDITION CONDITION DBCLOB(2097152) CCSID 13488 Nullable
Text of the WHEN clause for the trigger. Contains the null value if there is no WHEN clause.
ACTION_STATEMENT TEXT DBCLOB(2097152) CCSID 13488 Nullable
Text of the SQL statements in the trigger action. Contains the null value if this is a trigger created via the ADDPFTRG command.
ACTION_ORIENTATION GRANULAR VARCHAR(9) Indicates whether this is a ROW or STATEMENT trigger:
- ROW
- Trigger fires for each ROW.
- STATEMENT
- Trigger fires for each statement.
ACTION_TIMING TRIGTIME VARCHAR(7) Indicates whether this is a BEFORE, AFTER, or INSTEAD OF trigger:
- BEFORE
- Trigger fires before the triggering event.
- AFTER
- Trigger fires after the triggering event.
- INSTEAD
- Trigger fires instead of the triggering event.
TRIGGER_MODE TRIGMODE VARCHAR(6) Indicates the firing mode for the trigger:
- DB2SQL
- The trigger mode is DB2SQL.
- DB2ROW
- The trigger mode is DB2ROW.
ACTION_REFERENCE_OLD_ROW OLD_ROW VARCHAR(128) Nullable
Name of the OLD ROW correlation name. Contains the null value if an OLD ROW correlation name was not specified.
ACTION_REFERENCE_NEW_ROW NEW_ROW VARCHAR(128) Nullable
Name of the NEW ROW correlation name. Contains the null value if a NEW ROW correlation name was not specified.
ACTION_REFERENCE_OLD_TABLE OLD_TABLE VARCHAR(128) Nullable
Name of the OLD TABLE correlation name. Contains the null value if an OLD TABLE correlation name was not specified.
ACTION_REFERENCE_NEW_TABLE NEW_TABLE VARCHAR(128) Nullable
Name of the NEW TABLE correlation name. Contains the null value if a NEW TABLE correlation name was not specified.
SQL_PATH SQL_PATH VARCHAR(3483) Nullable
SQL path used when the trigger was created. Contains the null value if the trigger was created via the ADDPFTRG command.
CREATED CREATE_DTS TIMESTAMP Timestamp when the trigger was created. TRIGGER_PROGRAM_NAME TRIGPGM VARCHAR(128) Name of the trigger program. TRIGGER_PROGRAM_LIBRARY TRIGPGMLIB VARCHAR(128) System name of the schema containing the trigger program. OPERATIVE OPERATIVE VARCHAR(1) Indicates whether the trigger is operative. A table or view that has a trigger that contains a reference to that same table or view in its triggered–action is self-referencing. If a self-referencing trigger is duplicated into another library, restored into another library, moved into another library, or renamed; the trigger is marked inoperative since the table references in the triggered–action are unchanged and still reference the original schema and table name.
- Y
- The trigger is operative.
- N
- The trigger is inoperative.
ENABLED ENABLED VARCHAR(1) Indicates whether the trigger is enabled (see the CL command CHGPFTRG)
- Y
- The trigger is enabled.
- N
- The trigger is disabled.
THREADSAFE THDSAFE VARCHAR(8) Indicates whether the trigger is thread safe.
- YES
- The trigger is thread safe.
- NO
- The trigger is not thread safe.
- UNKNOWN
- The thread safety of the trigger is unknown.
MULTITHREADED_JOB_ACTION MLTTHDACN VARCHAR(8) Indicates the action to take when the trigger program is called in a multithreaded job.
- SYSVAL
- Use the QMLTTHDACN system value to determine the action to take.
- MSG
- Run the trigger program in a multithreaded job, but send a diagnostic message.
- NORUN
- Do not run the trigger program in a multithreaded job.
- RUN
- Run the trigger program in a multithreaded job.
ALLOW_REPEATED_CHANGE ALWREPCHG VARCHAR(8) Indicates the condition under which an update event fires the trigger.
- YES
- The trigger allows repeated changes to the same row.
- NO
- The trigger does not allow repeated changes to the same row.
TRIGGER_UPDATE_CONDITION TRGUPDCND CHAR(8) Nullable
Indicates whether an UPDATE trigger is always fired on an update event or only when a column value is actually changed.
- ALWAYS
- The trigger is always fired on an update event.
- CHANGE
- The trigger is only fired on an update event if a column value is actually changed.
Contains the null value if the trigger is not an UPDATE trigger.
LONG_COMMENT REMARKS VARGRAPHIC(2000) Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
SYSTRIGUPD
The SYSTRIGUPD view contains one row for each column identified in the UPDATE column list, if any. The following table describes the columns in the SYSTRIGUPD view:
Table 142. SYSTRIGUPD view Column Name System Column Name Data Type Description TRIGGER_SCHEMA TRIGSCHEMA VARCHAR(128) Name of the schema containing the trigger. TRIGGER_NAME TRIGNAME VARCHAR(128) Name of the trigger. EVENT_OBJECT_SCHEMA TABSCHEMA VARCHAR(128) Name of the schema containing the subject table of the trigger. EVENT_OBJECT_TABLE TABNAME VARCHAR(128) Name of the subject table of the trigger. TRIGGERED_UPDATE_COLUMNS TABCOLUMN VARCHAR(128) Name of a column specified in the UPDATE column list of the trigger.
SYSTYPES
The SYSTYPES table contains one row for each built-in data type and each distinct type created by the CREATE DISTINCT TYPE statement. The following table describes the columns in the SYSTYPES table:
Table 143. SYSTYPES table Column Name System Column Name Data Type Description USER_DEFINED_TYPE_SCHEMA TYPESCHEMA VARCHAR(128) Schema name of the data type. USER_DEFINED_TYPE_NAME TYPENAME VARCHAR(128) Name of the data type. USER_DEFINED_TYPE_DEFINER DEFINER VARCHAR(128) Name of the user that created the data type. SOURCE_SCHEMA SRCSCHEMA VARCHAR(128) Nullable
The schema for the source data type of this data type. Contains the null value if this is a built-in data type.
SOURCE_TYPE SRCTYPE VARCHAR(128) Nullable
Name of the source data type of this data type. Contains the null value if this is a built-in data type.
SYSTEM_TYPE_SCHEMA SYSTSCHEMA CHAR(10) System schema name of the data type. SYSTEM_TYPE_NAME SYSTNAME CHAR(10) System name of the data type. METATYPE METATYPE CHAR(1) Indicates the type of data type.
- S
- System predefined data type.
- T
- User-defined distinct type.
LENGTH LENGTH INTEGER The length attribute of the data type; or, in the case of a decimal, numeric, or nonzero precision binary column, its precision:
- 8 bytes
- BIGINT
- 4 bytes
- INTEGER
- 2 bytes
- SMALLINT
- Precision of number
- DECIMAL
- Precision of number
- NUMERIC
- 8 bytes
- FLOAT, FLOAT(n) where n = 25 to 53, or DOUBLE PRECISION
- 4 bytes
- FLOAT(n) where n = 1 to 24, or REAL
- Length of string
- CHARACTER
- Maximum length of string
- VARCHAR or CLOB
- Length of graphic string
- GRAPHIC
- Maximum length of graphic string
- VARGRAPHIC or DBCLOB
- Length of binary string
- BINARY
- Maximum length of binary string
- VARBINARY or BLOB
- 4 bytes
- DATE
- 3 bytes
- TIME
- 10 bytes
- TIMESTAMP
- Maximum length of datalink URL and comment
- DATALINK
- 40 bytes
- ROWID
- Same value as the source type
- DISTINCT
NUMERIC_SCALE SCALE SMALLINT
Nullable
Scale of numeric data. Contains the null value if the data type is not decimal, numeric, or binary.
CCSID CCSID INTEGER
Nullable
The CCSID value for CHAR, VARCHAR, CLOB, DATE, TIME, TIMESTAMP, GRAPHIC, VARGRAPHIC, DBCLOB and DATALINK data types. Contains the null value if the data type is numeric.
STORAGE STORAGE INTEGER The storage requirements for the column:
- 8 bytes
- BIGINT
- 4 bytes
- INTEGER
- 2 bytes
- SMALLINT
- (Precision/2) + 1
- DECIMAL
- Precision of number
- NUMERIC
- 8 bytes
- FLOAT, FLOAT(n) where n = 25 to 53, or DOUBLE PRECISION
- 4 bytes
- FLOAT(n) where n = 1 to 24, or REAL
- Length of string
- CHAR
- Maximum length of string + 2
- VARCHAR
- Maximum length of string + 29
- CLOB
- Length of string * 2
- GRAPHIC
- Maximum length of string * 2 + 2
- VARGRAPHIC
- Maximum length of string * 2 + 29
- DBCLOB
- Length of binary string
- BINARY
- Maximum length of binary string + 2
- VARBINARY
- Maximum length of string + 29
- BLOB
- 4 bytes
- DATE
- 3 bytes
- TIME
- 10 bytes
- TIMESTAMP
- Maximum length of datalink URL and comment + 24
- DATALINK
- 42 bytes
- ROWID
- Same value as the source type
- DISTINCT
This column supplies the storage requirements for all data types.
NUMERIC_PRECISION PRECISION INTEGER
Nullable
The precision of all numeric data types. This column supplies the precision of all numeric data types, including single-and double-precision floating point. The NUMERIC_PRECISION_RADIX column indicates if the value in this column is in binary or decimal digits.
Contains the null value if the data type is not numeric.
CHARACTER_MAXIMUM_LENGTH CHARLEN INTEGER
Nullable
Maximum length of the string for binary, character, and graphic string data types. Contains the null value if the data type is not a string.
CHARACTER_OCTET_LENGTH CHARBYTE INTEGER
Nullable
Number of bytes for binary, character, and graphic string data types. Contains the null value if the data type is not a string.
ALLOCATE
ALLOCATE INTEGER
Nullable
Allocated length of the string for binary, varying-length character, and varying-length graphic string data types. Contains the null value if the data type is numeric or fixed-length.
NUMERIC_PRECISION_RADIX RADIX INTEGER
Nullable
Indicates if the precision specified in column NUMERIC_PRECISION is specified as a number of binary or decimal digits:
- 2
- Binary; floating-point precision is specified in binary digits.
- 10
- Decimal; all other numeric types are specified in decimal digits.
Contains the null value if the data type is not numeric.
DATETIME_PRECISION DATPRC INTEGER
Nullable
The fractional part of a date, time, or timestamp.
- 0
- For DATE and TIME data types
- 6
- For TIMESTAMP data types (number of microseconds).
Contains the null value if the data type is not date, time, or timestamp.
CREATE_TIME CRTTIME TIMESTAMP Nullable
Identifies the timestamp when the data type was created. LONG_COMMENT REMARKS VARCHAR(2000)
Nullable
A character string supplied with the COMMENT statement. Contains the null value if there is no long comment.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number of the data type. LAST_ ALTERED
ALTEREDTS TIMESTAMP Nullable
Reserved. Contains the null value. NORMALIZE_DATA NORMALIZE VARCHAR(3) Nullable
Indicates whether the parameter value should be normalized or not. This attribute only applies to UTF-8 and UTF–16 data.
- NO
- The value should not be normalized.
- YES
- The value should be normalized.
SYSVIEWDEP
The SYSVIEWDEP view records the dependencies of views on tables, including the views of the SQL catalog. The following table describes the columns in the SYSVIEWDEP view:
Table 144. SYSVIEWDEP view Column name System Column Name Data Type Description VIEW_NAME DNAME VARCHAR(128) Name of the view. This is the SQL view name if it exists; otherwise, it is the system view name. VIEW_OWNER DCREATOR VARCHAR(128) Owner of the view OBJECT_NAME ONAME VARCHAR(128) Name of the object the view is dependent on. OBJECT_SCHEMA OSCHEMA VARCHAR(128) Name of the SQL schema that contains the object the view is dependent on. OBJECT_TYPE OTYPE CHAR(24) Type of object the view was based on:
- FUNCTION
- Function
- MATERIALIZED QUERY TABLE
- The object is a materialized query table.
- TABLE
- Table
- TYPE
- Distinct Type
- VIEW
- View
VIEW_SCHEMA DDBNAME VARCHAR(128) Name of the schema of the view. SYSTEM_VIEW_NAME SYS_VNAME CHAR(10) System View name SYSTEM_VIEW_SCHEMA SYS_VDNAME CHAR(10) System View schema SYSTEM_TABLE_NAME SYS_TNAME CHAR(10) Nullable
System Table name. Contains the null value if the object is a function or distinct type.
SYSTEM_TABLE_SCHEMA SYS_DNAME CHAR(10) Nullable
System Table schema. Contains the null value if the object is a function or distinct type.
TABLE_NAME BNAME VARCHAR(128) Nullable
Name of the table or view the view is dependent on. This is the SQL view name if it exists; otherwise, it is the system view name. Contains the null value if the object is a function or distinct type.
TABLE_OWNER BCREATOR VARCHAR(128) Nullable
Owner of the table or view the view is dependent on. Contains the null value if the object is a function or distinct type.
TABLE_SCHEMA BDBNAME VARCHAR(128) Nullable
Name of the SQL schema that contains the table or view the view is dependent on. Contains the null value if the object is a function or distinct type.
TABLE_TYPE BTYPE CHAR(1) Nullable
Type of object the view was based on:
- T
- Table
- P
- Physical file
- M
- Materialized query table
- V
- View
- L
- Logical file
Contains the null value if the object is a function or distinct type.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number. PARM_SIGNATURE SIGNATURE VARCHAR(10000) Nullable
This column identifies the routine signature. Contains the null value if the object is not a routine.
SYSVIEWS
The SYSVIEWS view contains one row for each view in the SQL schema, including the views of the SQL catalog. The following table describes the columns in the SYSVIEWS view:
Table 145. SYSVIEWS view Column Name System Column Name Data Type Description TABLE_NAME NAME VARCHAR(128) Name of the view. This is the SQL view name if it exists; otherwise, it is the system view name. VIEW_OWNER CREATOR VARCHAR(128) Owner of the view SEQNO SEQNO INTEGER Sequence number of this row; will always be 1. CHECK_OPTION CHECK CHAR(1) The check option used on the view
- N
- No check option was specified
- Y
- The local option was specified
- C
- The cascaded option was specified
VIEW_DEFINITION TEXT VARCHAR(10000)
Nullable
The query expression portion of the CREATE VIEW statement. Contains the null value if the view definition cannot be contained in the column without truncation.
IS_UPDATABLE UPDATES CHAR(1) Specifies if the view is updatable:
- Y
- The view is updatable
- N
- The view is not updatable
TABLE_SCHEMA DBNAME VARCHAR(128) Name of the SQL schema that contains the view. SYSTEM_VIEW_NAME SYS_VNAME CHAR(10) System View name SYSTEM_VIEW_SCHEMA SYS_VDNAME CHAR(10) System View schema name IS_INSERTABLE_INTO INSERTABLE VARCHAR(3) Identifies whether an INSERT is allowed on the view.
- NO
- An INSERT is not allowed on this view.
- YES
- An INSERT is allowed on this view.
IASP_NUMBER IASPNUMBER SMALLINT Specifies the independent auxiliary storage pool (IASP) number. IS_DELETABLE DELETES CHAR(1) Nullable
Specifies if the view is deletable:
- Y
- The view is deletable
- N
- The view is read-only
VIEW_DEFINER DEFINER VARCHAR(128) Name of the user that defined the view.
114. The length is the number of bytes passed in database buffers, not the internal storage length.
[ Top of Page | Previous Page | Next Page | Contents |
Index ]