Stopping all Db2 processes (Linux® and UNIX)

Before installing a fix pack, if there are Db2 database products installed in the selected installation path, you must stop all of the Db2 processes. If you have multiple Db2 copies, stop only the Db2 processes that are associated with the copy that you are updating.

Before you begin

Procedure

To stop all Db2 processes, perform the following steps:

  1. Log on as root.
  2. Determine which instances are associated with the Db2 copy.
    Issue the command:
    DB2DIR/instance/db2ilist
    where DB2DIR represents the location where the Db2 copy is installed.
  3. Run the following commands for each instance in the Db2 copy:
    su - iname
    . $HOME/sqllib/db2profile
    db2 force applications all
    db2 terminate
    db2stop
    db2licd -end      # run at each physical partition
    exit
    where iname represents the instance owner name.
    If you are an PowerHA® SystemMirror® user, you must use the ha_db2stop command to stop Db2 instead of the db2stop command. If you use the db2stop command instead of the ha_db2stop command, you will trigger a failure event.
  4. If the Db2 Administration Server (DAS) belongs to the Db2 copy that you are updating, stop the DAS:
    su - aname
    . $HOME/das/dasprofile
    db2admin stop
    exit
    where aname represents the DAS owner name.
    Note: Since there can only be one DAS on the system, this step affects all other Db2 copies on the system.
  5. Optional: On AIX®, run slibclean to unload unused shared libraries from memory before installation:
    /usr/sbin/slibclean
  6. Disable the fault monitor processes.
    To stop the Fault Monitor Daemon, issue the command:
    DB2DIR/bin/db2fm -i iname -D
    where DB2DIR is the location where the Db2 copy is installed and iname represents the instance owner name. The command must be performed once for each instance in the Db2 copy.
  7. If the Fault Monitor Coordinator (FMC) is started, prevent your instances from auto-starting:
    1. To determine whether the FMC is started, issue the command:
      DB2DIR/bin/db2fmcu
      where DB2DIR is the location where the Db2 copy is installed.
      If the FMC is started, you will see output similar to the following:FMC: up: PID = 3415 . If the FMC is disabled, the output from the db2fmcu command will be: FMC: down.
    2. If the FMC is started, determine whether any instances are configured to auto-start after each system restart.
      Issue the command:
      DB2DIR/instance/db2iset -i iname -all
      where DB2DIR is the location where the Db2 copy is installed and iname represents the instance owner name. The command must be performed once for each instance in the Db2 copy.
      If the output from the db2iset command includes the following, it means that the instance is configured to auto-start:DB2AUTOSTART=YES
    3. Prevent the instances from auto-starting.
      Issue the command:
      DB2DIR/instance/db2iauto -off iname
      where DB2DIR is the location where the Db2 copy is installed and iname represents the instance owner name. After you have completed the fix pack installation, you can re-start instance auto-start:
      DB2DIR/instance/db2iauto -on iname
  8. Ensure all Db2 interprocess communications are cleaned for the instance to be updated. As the instance owner, run the following command at each physical partition:
    $HOME/sqllib/bin/ipclean -a