Multiple instances of the database manager
Multiple instances of the database manager might be created on a single server. This means that you can create several instances of the same product on a physical computer, and have them running concurrently. This provides flexibility in setting up environments.
Note: The same instance name cannot be used in two different Db2® copies.
You might want to have multiple instances to create the following
environments:
- Separate your development environment from your production environment.
- Separately tune each environment for the specific applications it will service.
- Protect sensitive information from administrators. For example, you might want to have your payroll database protected on its own instance so that owners of other instances are not able to see payroll data.
Note:
- On Linux® or UNIX operating systems only: To have more than one instance, the Db2 product must be installed with root privileges. Each instance can run simultaneously, though they are independent of the other.
- On UNIX operating systems only: To prevent environmental conflicts between two or more instances, ensure that each instance home directory is on a local file system.
- On Windows operating systems only: Instances are cataloged as either local or remote in the node directory. Your default instance is defined by the DB2INSTANCE environment variable. You can ATTACH to other instances to perform maintenance and utility tasks that can be done only at an instance level, such as creating a database, forcing off applications, monitoring a database, or updating the database manager configuration. When you attempt to attach to an instance that is not in your default instance, the node directory is used to determine how to communicate with that instance.
- On any platform: Db2 database program files are physically stored at one location and each instance points back to the copy to which that instance belongs so that the program files are not duplicated for each instance that is created. Several related databases can be located within a single instance.