DB2 Version 9.7 for Linux, UNIX, and Windows

db2idrop - Remove instance command

Removes a DB2® instance that was created by db2icrt.

You can only drop instances that are listed by db2ilist for the same DB2 copy where you are issuing db2idrop from.

On Linux and UNIX operating systems, this utility is located in the DB2DIR/instance directory, where DB2DIR represents the installation location where the current version of the DB2 database system is installed. On Windows operating systems, this utility is located under the DB2PATH\bin directory where DB2PATH is the location where the DB2 copy is installed.

Note: A non-root-installed DB2 instance, on Linux and UNIX operating systems, cannot be dropped using this command. The only option is to uninstall the non-root DB2 copy. See Usage notes below for more details.

Authorization

Root user authority on Linux and UNIX operating systems or Local Administrator on Windows operating systems.

Command syntax

For Linux and UNIX operating systems

Read syntax diagramSkip visual syntax diagram
>>-db2idrop--+-----+--+-----+--+-----+--InstName---------------><
             '- -d-'  '- -f-'  +- -h-+             
                               '- -?-'             

For Windows operating systems

Read syntax diagramSkip visual syntax diagram
>>-db2idrop--+-----+--+-----+--InstName------------------------><
             '- -f-'  '- -h-'             

Command parameters

For Linux and UNIX operating systems

InstName
Specifies the name of the instance.
-d
Enters debug mode, for use by DB2 database support.
-f
This parameter is deprecated.

Specifies the force applications flag. If this flag is specified all the applications using the instance will be forced to terminate.

-h | -?
Displays the usage information.
For Windows operating systems
InstName
Specifies the name of the instance.
-f
Specifies the force applications flag. If this flag is specified all the applications using the instance will be forced to terminate.
-h
Displays usage information.

Example

If you created db2inst1 on a Linux or UNIX operating system by issuing the following command:
/opt/IBM/db2/copy1/instance/db2icrt -u db2fenc1 db2inst1
To drop db2inst1, you must run the following command:
/opt/IBM/db2/copy1/instance/db2idrop db2inst1

Usage notes