IBM Books

Application Building Guide


Appendix A. About Database Manager Instances

DB2 supports multiple database manager instances on the same machine. A database manager instance has its own configuration files, directories, and databases.

Each database manager instance can manage several databases. However, a given database belongs to only one instance. Figure 1 shows this relationship.

Figure 1. Database Manager Instances

db2dbin

Database manager instances give you the flexibility to have multiple database environments on the same machine. For example, you can have one database manager instance for development, and another instance for production.

With UNIX servers you can have different DB2 versions on different database manager instances. For example, you can have one database manager instance running DB2 Version 2, and another running DB2 Universal Database Version 6.

With OS/2 and NT servers you must have the same DB2 version, release, and modification level on each database manager instance. You cannot have one database manager instance running DB2 Version 2, and another instance running DB2 Universal Database Version 6.

You need to know the following for each instance you use:

instance name
For UNIX platforms, this is a valid username that you specify when you create the database manager instance.

For OS/2 and Windows NT, this is an alphanumeric string of up to eight characters. The DB2 instance is created for you during install.

instance directory
The home directory where the instance is located.

For UNIX platforms, the instance directory is $HOME/sqllib, where $HOME is the home directory of the instance owner.

For OS/2 and Windows NT, the instance directory is %DB2PATH%\instance_name. The variable %DB2PATH% determines where DB2 is installed. Depending on which drive DB2 is installed, %DB2PATH% will point to drive:\sqllib.

The instance path on OS/2 and Windows NT is created based on either:

%DB2PATH%\%DB2INSTANCE% (for example, C:\SQLLIB\DB2)

or, if DB2INSTPROF is defined:

%DB2INSTPROF%\%DB2INSTANCE% (for example, C:\PROFILES\DB2)

The DB2INSTPROF environment is used on OS/2 and Windows NT to support running DB2 on a network drive in which the client machine has only read access. In this case, DB2 will be set to point to drive:\sqllib, and DB2INSTPROF will be set to point to a local path (for example, C:\PROFILES) which will contain all instance specific information such as catalogs and configurations, since DB2 requires update access to these files.

For information about creating and managing database manager instances, refer to the Quick Beginnings book for your platform.


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

[ DB2 List of Books | Search the DB2 Books ]