Daily Archives: January 5, 2010

Bound by autobind

It’s a lesser-known trait of DB2 CLI that if it doesn’t find the packages it needs, it’ll attempt to bind them for you.   This can be a nice favor except when it’s unwelcome.  The CLI package names change periodically with new releases of DB2, so it’s too easy for someone at a different DB2 client level to unknowingly do unwanted binds.

This pops up once a year or so on our customer support line.  Someone will be unable to connect because the packages were bound under the wrong authorization ID.  Or, as happened today, sysplan and other catalog locks are held indefinitely because a package is missing and an attempted autobind has gone off into the weeds.  Browsing sysibm.sysplan can sometimes reveal the smoking gun.

This can usually be avoided by carefully migrating each database as required for new versions and fixpacks (creating and migrating databases will do proactive automatic rebinds).  If unsure, have the DBA do all the CLI rebinds himself/herself from the database server for all supported client versions before turning the database back over to the users.

I vaguely remember hearing of an option to turn off autobind in mainframe DB2, but I can’t find such a thing in DB2 LUW, and googling it was a dead end.  If you know of one, please post a comment or email.