SWITCH bind option

The SWITCH option causes the previous copy or original copy of a package to become the current copy of the package.

Command option Option values Used with
SWITCH
  • PREVIOUS
  • ORIGINAL
Note:
  1. The SWITCH bind option is not valid for REBIND of packages for native REST services.

This option allows you to revert to an older copy of a package in the event of a performance regression. You cannot specify SWITCH with any other rebind options. If the package that you specify does not have the previous or original copy to switch to, Db2 issues an error message, and continues processing the rest of the list. Use this option with the pattern-matching character (*) in the syntax.

If the target package copy is not valid or it was bound in Db2 11 or an earlier release, the command fails and Db2 issues an error message.

SWITCH(PREVIOUS)
Switches between the current and previous copies of a package or a plan. The current copy takes the place of the previous copy, and the previous copy takes the place of the current copy.
SWITCH(ORIGINAL)
Moves the current copy to take the place of the previous copy. Any previous copy that exists is purged. The original copy is cloned to take the place of the current copy.

Default values for SWITCH

Process Default value
BIND PLAN N/A
BIND PACKAGE N/A
REBIND PLAN N/A
REBIND PACKAGE Existing value
REBIND TRIGGER PACKAGE Existing value