Rebinding packages in upgraded databases
During database upgrade, all packages for user applications and routines are marked as invalid. You may consider explicitly rebinding invalidated packages to take advantage of changes in the Db2® server and new statistics before allowing users access to the database. Alternately, you can allow an automatically started system task to rebind all invalid and inoperative (if auto_reval is set to anything other than DISABLED) packages after a database starts on the catalog node. The system task, db2pcsd, makes a single pass of all invalid packages and attempts to rebind them before terminating. See db2pscd in the Database EDU list for more information. Any access to a package that has not yet been rebound will be implicitly rebound upon first SQL request by an application.
Before you begin
About this task
After you upgrade your database, any package not yet rebound by db2pcsd will be implicitly rebound when an application uses it for the first time. You may also choose to explicitly rebind invalid packages yourself . However, you must explicitly rebind inoperative packages. Alternatively, you can specify the REBINDALL option on the UPGRADE DATABASE command in Upgrading Databases.This procedure applies only to C, C++, COBOL, FORTRAN, and REXX embedded SQL database applications.
To explicitly rebind packages in upgraded databases:
- Log on as a user with DBADM authority.
- Rebind all invalid packages in
- From the CLP, run the db2rbind command, as
Review the log file specified by logfile, and address any issues. The all parameter should not be specified as it may attempt to rebind packages already bound by db2pscd.
db2rbind database-name -l logfile -u userid -p password
- From IBM® Data Studio, open the task assistant to rebind packages.
- From the CLP, run the db2rbind command, as follows:
- Verify that your Db2 server upgrade was successful. For details, see Verify your Db2 server upgrade. Test your applications and tools to ensure that the server is working as expected.