Start of change

SYSDYNQRYDEP catalog table

The SYSDYNQRYDEP table contains information about dependencies for dynamic query packages. The schema is SYSIBM.

Access paths for SQL statements might depend on objects that Db2 does not actually use when it processes the selected access paths. Such dependencies are recorded in the SYSDYNQRYDEP catalog table, but they are not be shown in EXPLAIN output.

Column name Data type Description Use
SDQ_STMT_ID BIGINT NOT NULL The identifier of the stabilized dynamic SQL statement. G
COPYID SMALLINT NOT NULL The copy type of the stabilized runtime structures for the query in this row:
0
The current copy.
1
The previous copy.
2
The original copy.
G
BQUALIFIER VARCHAR(128) NOT NULL The value of the column depends on the type of object:
  • If BNAME identifies a table space (BTYPE is ' R'), the value is the name of its database.
  • If BNAME identifies a table on which a period is defined (BTYPE is 'W' or 'Z'), the value is the qualifier of that table.
  • If BNAME identifies user-defined function, a cast function, a stored procedure, or a sequence (BTYPE is 'F', 'O', or 'Q'), the value is the schema name.
  • If BNAME identifies a role, the value is blank.
  • Otherwise, the value is the schema of BNAME.
G
BNAME VARCHAR(128) NOT NULL The name of the object that the query depends on. G
BTYPE CHAR(1) NOT NULL Type of object identified by BNAME and BQUALIFIER:
'E'
INSTEAD OF trigger
'F'
User-defined function or cast function
'G'
Global temporary table.
'I'
Index.
'M'
Materialized query table
'O'
Stored procedure
'P'
Partitioned table space if it is defined as LARGE or with the DSSIZE parameter
'Q'
Sequence object
'R'
Table space
'S'
Synonym
'T'
Table
'U'
Distinct type
'V'
View
'W'
SYSTEM_TIME period
'Z'
BUSINESS_TIME period
'0' (zero)
Alias
G
CLASS CHAR(1) NOT NULL
'A'
Authorization dependency
'D'
Data Definition Language dependency
G
BAUTH SMALLINT NOT NULL WITH DEFAULT Start of changeThe privilege that is held on the object on which the query depends. The privilege applies only when CLASS is 'A'.
50
SELECTAUTH
51
INSERTAUTH
52
DELETEAUTH
53
UDPATEAUTH
64
EXECUTEAUTH
263
USAGEAUTH
291
READAUTH
292
WRITEAUTH
0
The column is not used. CLASS is 'D'.
End of change
G
AUTHID_TYPE CHAR(1) NOT NULL WITH DEFAULT The type of authorization indicated by AUTHID.
'' (blank)
The value of CLASS is 'D', or the value of CLASS is 'A' and AUTHID contains the name of an authorization ID.
'L'
AUTHID contains the name of a role.
G
AUTHID VARCHAR(128) NOT NULL WITH DEFAULT The owner of the privilege on the object on which the query is dependent, or a zero-length string if the value of CLASS is 'D'. G
DBNAME VARCHAR(128) NOT NULL WITH DEFAULT If the value of SDBADMAUTH is 'Y', DBNAME contains the name of the database on which the user or role indicated by AUTHID holds DBADM authority. Otherwise the value is blank. G
BADMINAUTH CHAR(1) NOT NULL The authority that allowed access to the object on which the query is dependent. The admin authority only applies when CLASS is 'A'.
'B'
SDBADMAUTH
'D'
DBADMAUTH
'G'
ACCESSCTRLAUTH
'K'
SQLADMAUTH
'L'
SYSCTRLAUTH
'S'
SYSADMAUTH
'T'
DATAACCESSAUTH
''
Authority not held
G
PUBLICAUTH CHAR(1) NOT NULL WITH DEFAULT
'Y'
This privilege is held by PUBLIC by the user or role indicated in AUTHID.
' ' (blank)
This privilege is not held by PUBLIC, or the value of CLASS is 'D'.
G
ALLOBJAUTH CHAR(1) NOT NULL WITH DEFAULT
'Y'
The privilege is held on all objects within the schema by the user or role indicated in AUTHID.
' ' (blank)
This privilege is not held on all objects within the schema, or the value of CLASS is 'D'.
G
QUERYHASH BINARY(16) WITH DEFAULT The hash key of the statement text if the value of CLASS is 'D', otherwise hexadecimal zeros. G
CLOB(2M) NOT NULL WITH DEFAULT Internal use only. I
CHAR(8) NOT NULL FOR BIT DATA Internal use only. I
End of change