IBM Books

Quick Beginnings EEE for UNIX**


Step 4. Remove DB2 Instances

You can optionally remove some or all of the DB2 Version 6 instances on your system. Once an instance is removed, all the DB2 databases owned by the instance, if any, will not be usable. Remove DB2 instances only if you are not planning to use DB2 Version 6 products, or if you do not want to migrate existing instances to a later version of DB2.

To remove an instance, perform the following steps:

Step  1.

Log in as the instance owner.

Step  2.

Stop the instance by issuing the db2stop command.

Step  3.

Back up files in the INSTHOME/sqllib directory, if needed, where INSTHOME is the home directory of the instance owner.

You might want to save the database manager configuration file, db2systm, the db2nodes.cfg file, or user defined function or fenced stored procedure applications in INSTHOME/sqllib/function, where INSTHOME is the home directory of the instance owner.

Step  4.

Log off as the instance owner.

Step  5.

Log in as user with root authority.

Step  6.

Remove the instance by entering the following command:

   DB2DIR/instance/db2idrop InstName


where DB2DIR = /usr/lpp/db2_06_01 on AIX


= /opt/IBMdb2/V6.1 on Solaris

and where InstName is the login name of the instance.

Figure hint not displayed.

Because INSTHOME is mounted, you only have to run the db2idrop command once to remove the instance.

Step  7.

Optionally, as a user with root authority, remove the instance owner's user ID and group (if used only for that instance). Do not remove these if you are planning to re-create the instance.

This step is optional since the instance owner and the instance owner group may be used for other purposes.

The db2idrop command removes the instance entry from the list of instances and removes the INSTHOME/sqllib directory, where INSTHOME is the home directory of the instance.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]