DB2 10.5 for Linux, UNIX, and Windows

Rebinding packages in upgraded databases

During database upgrade, all packages for user applications and routines are marked as invalid. You must rebind invalidated packages to take advantage of changes in the DB2® server and new statistics.

Before you begin

Ensure that you have DBADM authority.

About this task

Packages will be implicitly rebound the first time that an application uses them after you upgrade your database. To eliminate this overhead, you can explicitly rebind invalid packages. 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.

Procedure

To rebind packages in upgraded databases:

  1. Log on as a user with DBADM authority.
  2. Rebind all invalid packages in each database:
    • From the CLP, run the db2rbind command, as follows:
         db2rbind database-name -l logfile all -u userid -p password
      The all clause rebinds valid and invalid packages. Review the log file specified by logfile, and address any issues.
    • From IBM® Data Studio, open the task assistant to rebind packages.
  3. 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.

Results

After you have rebound all your database packages, you can automatically take advantage of optimizer improvements. Refer to Upgrade essentials for database applications for details on the optimizer improvements available in this release.