IBM Books

Quick Beginnings


Removing Instances

On OS/2, Windows 95, or Windows NT Systems:

To remove a DB2 instance, perform the following steps:

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

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

  3. Stop the instance by issuing the db2stop command.

  4. Back up files in the sqllib\instance_name directory, if needed. For example, you might want to save the database manager configuration file, db2systm.
    Note:If the DB2INSTPROF environment variable is set, these files will be in a different location than the one used in this example.

  5. Execute the db2idrop command:
       db2idrop instance_name
    

    where instance_name is the name of the instance being dropped. This command removes the instance entry from the list of instances and removes the sqllib\instance_name directory.

On UNIX Systems:

To remove a DB2 instance, perform the following steps:

  1. Log in as the instance owner.

  2. Back up files in the INSTHOME/sqllib directory, if needed. For example, you might want to save the database manager configuration file, db2systm, or user-defined function or fenced stored procedures applications in INSTHOME/sqllib/function, where INSTHOME is the home directory of the instance owner.

  3. Log out as the instance owner.

  4. Log in as root.

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


    where DB2DIR = /usr/lpp/db2_05_00 on AIX


    = /opt/IBMdb2/V5.0 on HP-UX or Solaris


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


    = /opt/IBMdb2/V2.1 on SINIX or SGI

    and InstName is the login name of the instance.

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