DB2 Version 9.7 for Linux, UNIX, and Windows

Working with instances on the same or different DB2 copies

You can run multiple instances concurrently, in the same DB2® copy or in different DB2 copies.

About this task

To work with instances in the same DB2 copy, you must:
  1. Create or upgrade all instances to the same DB2 copy.
  2. Set the DB2INSTANCE environment variable to the name of the instance you are working with before issuing commands against that instance.

To prevent one instance from accessing the database of another instance, the database files for an instance are created under a directory that has the same name as the instance name. For example, when creating a database on drive C: for instance "DB2", the database files are created inside a directory called C:\DB2. Similarly, when creating a database on drive C: for instance TEST, the database files are created inside a directory called C:\TEST. By default, its value is the drive letter where DB2 product is installed. For more information, see the dftdbpath database manager configuration parameter.

To work with an instance in a system with multiple DB2 copies, use either of the following methods:

Procedure