Rebinding packages
You need to rebind a package when you make changes that affect the package, but the SQL statements in the package have not changed. For example, if an associated object changed or an index was created, you need to rebind the package. When you rebind a package, the Db2 optimizer evaluates whether any access path changes are needed.
Procedure
To rebind a package:
- On the DB2 Administration Menu (ADB2) panel, specify option 1, and press Enter.
- On the System Catalog (ADB21) panel, specify option K (for packages), and press Enter.
- On the Packages (ADB21K) panel, specify the RB line command next to the package that you want to rebind.
-
On the Rebind package
(ADB21KR) panel, specify the options
that you want, and press Enter.
If you are changing the owner or qualifier for the package, set the PLANMGMT parameter to OFF or leave it blank.
Figure 1. Rebind package (ADB21KR) panel ADB21KR n --------------------- DB2X Rebind Package --------------------- 13:20 Command ===> More: + Verify REBIND parameters: REBIND PACKAGE( Location . . . . . . > Collection . . . . . DSNEDCL > Package . . . . . . DSNECP68 > ( Version . . . . . . V10R1 OWNER . . . . . . . DB2ADM > QUALIFIER . . . . . DB2ADM > VALIDATE . . . . . . R (Run or Bind, Bind preferred) ISOLATION . . . . . CS (CS, RR, RS, or UR) RELEASE . . . . . . (Commit, Deallocate, Inheritfromplan or blank) EXPLAIN . . . . . . (Yes, No, or Only) CURRENTDATA . . . . YES (Yes/No) (inhibit blocking) ENABLE . . . . . . (use ? to get current values from the catalog) DISABLE . . . . . . (use ? to get current values from the catalog) En/disable names . . (use ? to get current values from the catalog) DEGREE . . . . . . . 1 (1 or ANY) (parallelism) DYNAMICRULES . . . . (R, B, D, I, E, H or blank) KEEPDYNAMIC . . . . NO (Yes/No) DEFER(PREPARE) . . . (Yes, No, or I - Inheritfromplan) REOPT . . . . . . . NONE (N - None, Y - Always, 1 - Once, A - Auto) OPTHINT . . . . . . > (hint id) PATH (UDT/UDF/STP) . > ENCODING . . . . . . 37 (ASCII, EBCDIC, UNICODE, or ccsid) IMMEDWRITE . . . . . NO (Yes, No, PH1, or I - Inheritfromplan) PLANMGMT . . . . . . (Off, Basic or Extended) SWITCH . . . . . . . (Original or Previous - ALL OTHER OPTIONS IGNORED ROUNDING . . . . . . HALFEVEN (HalfEven, Ceiling, Down, Floor, HalfDowN, HalfUp, Up) APREUSE . . . . . . (None, Warn or Error) APREUSESOURCE. . . . (Current, Previous, Original) APCOMPARE . . . . . (None, Warn or Error) BUSTIMESENSITIVE . . YES (Yes/No) SYSTIMESENSITIVE . . YES (Yes/No) APRETAINDUP . . . . (Yes/No) APPLCOMPAT . . . . . V12R1M503 (VnnRn/VnnRnMnnn) EXTENDEDINDICATOR . (Yes/No) CONCURRENTACCESSRES (U – Usecurrentlycommitted, W - Waitforoutcome) GETACCELARCHIVE . . (Yes/No) QUERYACCELERATION . (N - None, EN - ENable, EL - ELigible, EWF - EnableWithFailback, or A - All) ACCELERATOR . . . . ARCHIVESENSITIVE . . (Yes/No) DESCSTAT . . . . . . (Yes/No) CONCENTRATESTMT . . (Yes/No) )