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.
Procedure
To stop all Db2 processes, perform the following steps:
- Log on as root.
-
Determine which instances are associated with the Db2 copy.
Issue the command:
where DB2DIR represents the location where the Db2 copy is installed.DB2DIR/instance/db2ilist
-
Run the following commands for each instance in the Db2 copy:
where iname represents the instance owner name.su - iname . $HOME/sqllib/db2profile db2 force applications all db2 terminate db2stop db2licd -end # run at each physical partition exit
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. -
If the Db2
Administration Server (DAS) belongs to the Db2 copy that you are
updating, stop the DAS:
where aname represents the DAS owner name.su - aname . $HOME/das/dasprofile db2admin stop exit
Note: Since there can only be one DAS on the system, this step affects all other Db2 copies on the system. - Optional: On AIX®,
run slibclean to unload unused shared libraries
from memory before installation:
/usr/sbin/slibclean
- Disable the fault monitor processes. To stop the Fault Monitor Daemon, issue the command:
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.DB2DIR/bin/db2fm -i iname -D
- If the Fault Monitor Coordinator (FMC) is started, prevent
your instances from auto-starting:
- To determine whether the FMC is started, issue the command:
where DB2DIR is the location where the Db2 copy is installed.DB2DIR/bin/db2fmcu
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. - If the FMC is started, determine whether any instances
are configured to auto-start after each system restart. Issue the command:
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.DB2DIR/instance/db2iset -i iname -all
If the output from the db2iset command includes the following, it means that the instance is configured to auto-start:DB2AUTOSTART=YES - Prevent the instances from auto-starting. Issue the command:
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 -off iname
DB2DIR/instance/db2iauto -on iname
- To determine whether the FMC is started, issue the command:
-
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