Stopping root Db2 instances (Linux and UNIX)
You must stop all Db2 instances associated with the Db2 copy you are uninstalling. Instances associated with other Db2 copies might not be affected by uninstalling the current copy.
About this task
Note: This task applies to Db2 database products that were installed with root user authority. To stop Db2 instances that were installed as a non-root user, see Stopping non-root instances (Linux and UNIX)
To stop a Db2 instance:
- Log in as a user with root user authority.
Obtain a list of the names of all Db2 instances associated
with your current Db2 copy by entering the
where DB2DIR is the location you specified during the Db2 database product installation. The default installation path for UNIX is /opt/IBM/db2/V11.5. The default installation path for Linux® is /opt/ibm/db2/V11.5.
- Run the script if it is not included in .profile.
where INSTHOME is the home directory of the instance.
. INSTHOME/sqllib/db2profile (bash, Bourne, or Korn shells) source INSTHOME/sqllib/db2cshrc (C shell)
- It is recommended that you save the following files:
- The database manager configuration file, $HOME/sqllib/db2systm
- The node configuration file, $HOME/sqllib/db2nodes.cfg
- User defined functions or fenced stored procedure applications in $HOME/sqllib/function
- Stop the Db2 database manager by entering the db2stop force command.
- Confirm that the instance is stopped by entering the db2 terminate command.
- Repeat these steps for each instance.