IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition for UNIX

Removing Instances

To remove an instance, perform the following steps:

  1. Log in as the instance owner.

  2. Stop the instance by issuing the db2stop command.

  3. Back up files in the INSTHOME/sqllib directory, if needed.

    For example, 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.

  4. Log off as the instance owner.

  5. Log in as root.

  6. Remove the instance by executing the db2idrop command:
       DB2DIR/instance/db2idrop InstName

    where DB2DIR = /usr/lpp/db2_05_00 on AIX

    = /opt/IBMdb2/V5.0 on Solaris

    and InstName is the login name of the instance.


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

  7. As root, 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.

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

[ DB2 List of Books | Search the DB2 Books ]