IBM Books

Quick Beginnings for DB2 Connect Enterprise Edition


Removing Instances

On OS/2 and Windows 32-bit operating systems:

Figure hint not displayed.

Ensure that there are no applications using the instance before removing it.

To remove an instance, perform the following steps:

  1. Close all applications that are currently using the instance.

  2. Stop the Command Line Processor by entering the db2 terminate command in each DB2 command window.

  3. Stop the instance by entering the db2stop command.

  4. Back up the files in the x:\sqllib\instance_name directory (where x: is the drive where DB2 is installed) to any directory outside of this path. Once you enter the db2idrop command, the x:\sqllib\instance_name directory is removed and cannot be recovered.
    Note:If the DB2INSTPROF registry value is set, these files will be in a different location than the one used in this example.

  5. Enter the db2idrop command as follows:
       db2idrop instance_name
    

    where instance_name represents the instance you want to drop.

On UNIX Systems:

To remove an instance, perform the following steps:

  1. Log in as the instance owner.

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

    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.

  3. Log off as the instance owner.

  4. Log in as user with root authority.

  5. Remove the instance using the db2idrop command. You can enter the DB2IDROP command as follows:
       DB2DIR/instance/db2idrop InstName
    

    InstName is the login name of the instance.

    where DB2DIR = /usr/lpp/db2_05_00 on AIX


    = /opt/IBMdb2/V5.0 HP-UX, SCO UnixWare 7, Solaris, or SGI IRIX


    = /usr/IBMdb2/V2.1 on SCO OpenServer


    = /opt/IBMdb2/V2.1 on SINIX

  6. 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.


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

[ DB2 List of Books | Search the DB2 Books ]