DB2 Version 9.7 for Linux, UNIX, and Windows

Attaching to and detaching from instances

On all platforms, to attach to another instance of the database manager, which might be remote, use the ATTACH command. To detach from an instance, use the DETACH command.

About this task

To attach to an instance using the command line, enter:
    db2 attach to <instance name>
For example, to attach to an instance called testdb2 that was previously cataloged in the node directory:
    db2 attach to testdb2
After performing maintenance activities for the testdb2 instance, for example, to detach from an instance using the command line, enter:
    db2 detach
Attaching to and detaching from client applications:
  • To attach to an instance from a client application, call the sqleatin API,
  • To detach from an instance from a client application, call the sqledtin API.

Before you begin

More than one instance must already exist.