How Db2 identifies packages for reuse under BIND PACKAGE commands
When you specify access path reuse in a BIND PACKAGE command, Db2 tries to identify and reuse access paths from existing packages.
When a BIND PACKAGE command
specifies the APREUSE(ERROR) bind option, Db2 tries to locate the access path information
from a package that has a matching identity based on the following
package information criteria:
- Location
- Collection identifier
- Name
- Version
If no such package exists, Db2 tries to locate the most recently created other version of the package that has the matching location, collection ID, and name. When a prior version of a matching package is reused, Db2 issues a DSNT294I message.
When a prior version exists, the set of static SQL statements in a previous version might not be identical to the set of statements in the new package, including white space in the statement text. In that situation, the APREUSE option only applies to statements that have identical statement text in both packages. Newly added statements and statements with text changes never reuse previous access paths.
Db2 issues a DSNT292I warning
message when it cannot locate any previous package, and ignores the
APREUSE option for that package.