DESCSTAT bind option

The DESCSTAT option determines whether Db2 builds a SQL descriptor area (SQLDA) when binding static SQL statements. This SQLDA is where Db2 returns names of result table columns for a DESCRIBE CURSOR statement.

Command option Option values Used with
DESCSTAT
  • (NO) 1
  • (YES)
Note:
  1. The DESCSTAT(NO) option is not valid for REBIND of packages for native REST services.
  2. The DESCSTAT bind option is not valid for REBIND of packages for native SQL procedures or advanced triggers.

Option descriptions for DESCSTAT

DESCSTAT(NO)
Specifies that Db2 does not generate a SQLDA at bind time for static SQL statements. If a DESCRIBE request is received at execution time, Db2 generates an error. However, if the DESCRIBE request comes from a DESCRIBE CURSOR statement, Db2 satisfies the request but provides only data type and length information. Column names are not provided.
DESCSTAT(YES)
Specifies that Db2 builds a SQL descriptor area (SQLDA) when binding static SQL statements, so that it can return names of result table columns for a DESCRIBE CURSOR statement. Specifying YES increases the size of some packages because the DESCRIBE SQLDA is now stored with each statically bound SQL SELECT statement.

Default values for DESCSTAT

Process Default value
BIND SERVICE YES
BIND PLAN N/A
BIND PACKAGE
  • For a local server: The value of subsystem parameter DESCSTAT on the local subsystem is used.
  • For a remote server: The value of subsystem parameter DESCSTAT on the remote subsystem is used.
REBIND PLAN N/A
REBIND PACKAGE Existing value. If there is no existing value, the DESCSTAT subsystem parameter value is used.
REBIND TRIGGER PACKAGE Existing value. If there is no existing value, the DESCSTAT subsystem parameter value is used.

Catalog records for DESCSTAT

See the DESCSTAT column in SYSPACKAGE catalog table.