
Rebind old plans and packages in Db2 11 to avoid disruptive autobinds in Db2 12
By taking appropriate actions in Db2 11 well before migration to Db2 12, you can minimize the risk of disruptive automatic binds of application plans and packages during and after migration to Db2 12.
Before you begin
Identify plans and packages that are subject to autobind at migration to Db2 12 because they were last bound in a release earlier than DB2 10. To do so, run job DSNTIJPM and examine the premigration reports about package copies and plans that are not supported after migration to Db2 12. For more information, see Run premigration queries (DSNTIJPM).


About this task
Migration-related automatic binds (also called autobinds
) occur in Db2 12 because it cannot use runtime structures from a plan or package that was last bound in a release earlier than DB2 10. Plans and packages that were bound in Db2 11 can run in Db2 12, without the risk of migration-related autobinds. However, plans and packages that are bound in Db2 12 cannot run on Db2 11 members without an autobind in Db2 11.
If the autobinds are allowed to occur, they are inevitably disruptive for rolling online migrations, or any time that different releases coexist in data sharing environments. During and after migration, such autobinds can result in costly problems, including performance regression and even application outages.
Autobinds occur the first time that any plan or package runs in Db2 12, which means that the autobinds, and resulting problems and application outages, can occur well after a migration window. That is, such problems and resulting outages can occur any time in the first impression
window in Db2 12, which is any time until the plan or package first runs in Db2 12.
The best approach is to bind all packages and plans that might be subject to migration-related autobinds in Db2 11 with good performance before you start the migration to Db2 12. Doing so reduces the risk of the following problems that can result from autobinds:
- Application failures because of contention between releases. For any migration that brings into release coexistence, autobinds might fail for plans or packages that are in use by a Db2 11 member, causing applications to fail on the Db2 12 member.
Successful autobinds on Db2 12 in a coexistence environment also create a package or plan that Db2 11 members cannot run without another autobind. The autobind might also fail if the plan or package is in use by a Db2 12 member.
- Application failures, when autobinds fail for access control authorization exit users because the authorization ID for the autobind has insufficient privileges, compared to the owner of the package or the plan.
- Difficult to resolve performance regressions. For packages, a migration-related autobind also destroys the current package. If the autorebind succeeds but introduces an access path regression, REBIND SWITCH is not possible. Any performance regression that occurs in Db2 12 might also occur in Db2 11.
Procedure
To avoid autobinds during or after the Db2 12 migration process, take the following actions. For best results, complete these actions well before migration to Db2 12 (months if possible) so that you have sufficient time to run the applications and resolve any performance issues that might occur after the rebinds.
