APCOMPARE bind option

The APCOMPARE option determines whether the new access paths are different from the older access paths.

Command option Option values Used with
APCOMPARE
  • (NO)
  • (NONE)
  • (WARN)
  • (ERROR)
Note:
  1. The bind option is not valid for REBIND of packages for advanced triggers.

Option descriptions for APCOMPARE

APCOMPARE(NO)
Db2 does not compare access paths.
APCOMPARE(NONE)
Db2 does not compare access paths.
APCOMPARE(WARN)
Db2 compares the old and new access paths for each matching statement. If the access paths are structurally dissimilar, Db2 sends message DSNT285I and continues processing the package.
APCOMPARE(ERROR)
Db2 compares the old and new access paths for each matching statement. If the access paths are structurally dissimilar, Db2 sends message DSNT285I and terminates package processing.

The APCOMPARE option is ignored for packages and package copies that were bound prior to DB2® 9. You can identify the version on which a package or package copy was bound by checking the RELBOUND column in the SYSIBM.SYSPACKAGE or SYSIBM.SYSPACKCOPY catalog table.

Statements that reference temporal tables or archive tables: Db2 uses statement text as the matching criteria when it searches for older access paths in the prior package to evaluate. However, for static statements that reference temporal tables or archive tables, Db2 uses additional matching criteria. The reason is that statements that reference temporal tables or archive tables might be bound once or twice, depending on the value of the bind options SYSTIMESENSITIVE and ARCHIVESENSITIVE. In the following situations, the statement is bound twice:

  • SYSTIMESENSITIVE is set to YES, and the statement references a system-period temporal table or bitemporal table.
  • ARCHIVESENSITIVE is set to YES, and the statement references an archive table.

When the statement is bound twice, implicit predicates are added to the statement during the second bind. This process is called implicit query transformation. The type of implicit query transformation is identified in the EXPANSION_REASON column of PLAN_TABLE. Therefore, in addition to matching statement text, Db2 also checks that the access path in the prior package and in the current package have the same implicit predicate.

Default values for APCOMPARE

Process Default value
BIND SERVICE NONE
BIND PLAN N/A
BIND PACKAGE NONE
REBIND PLAN NONE
REBIND PACKAGE NONE