Reorgchk and reorg | DB2 database maintenance utilities
Rebind (db2rbind)
Static packages need to be rebound after executing RUNSTATS to make use of updated statistics. Packages can be rebound one by one using the REBIND command or all at once by using the db2rbind (rebind all packages) command. The use of the db2rbind command is as follows:
db2rbind RAskyway -l db2rbind.log allNote: The command will not rebind a package if it is in use.
WebSphere Commerce includes 16 out-of-the-box stored procedures that will be benefited by the rebind:
- adjustinventory
- allocateitem
- allocbora
- availableinv
- availinvstore
- availradate
- availreceipts
- backorderitem
- currentversion
- deletebackorder
- expectedinv
- getitems
- inventoryallocation
- raallocation
- reverseinventory
- shipitems
The following SQL can be used to identify the last bind date for all the packages in the database:
db2 "select pkgschema,pkgname,last_bind_time from syscat.packages order by last_bind_time desc"You may get the output shown in Example 25-2.
DB2INST1 P7001184 2007-07-11-19.29.24.498032 DB2INST1 P7001131 2007-07-11-19.29.23.996449 DB2INST1 P7001094 2007-07-11-19.29.23.742995 DB2INST1 P7001068 2007-07-11-19.29.23.685187 DB2INST1 P7001032 2007-07-11-19.29.23.318409 DB2INST1 P7001005 2007-07-11-19.29.23.158569 DB2INST1 P7000945 2007-07-11-19.29.22.678456Automatic Runstats and Reorg are available from DB2 8.2 (8.1.7). Since the automatic maintenance feature internally schedules a classic reorganization for the table, it locks the table being reorganized for writing. Therefore, if you are using automatic maintenance, ensure that the maintenance is only scheduled for when the traffic to the site is minimal.