DB2 Version 9.7 for Linux, UNIX, and Windows

Creating instances

Although an instance is created as part of the installation of the database manager, your business needs might require you to create additional instances.

About this task

Restrictions

Before you begin

If you belong to the Administrative group on Windows, or you have root user authority on Linux or UNIX operating systems, you can add additional instances. The computer where you add the instance becomes the instance-owning computer (node zero). Ensure that you add instances on a computer where a DB2® administration server resides. Instance IDs should not be root or have password expired.

Procedure

To add an instance using the command line:

Enter the command: db2icrt instance_name.
When creating instance on an AIX® server, you must provide the fenced user id, for example:
  DB2DIR/instance/db2icrt -u db2fenc1 db2inst1

When using the db2icrt command to add another DB2 instance, you should provide the login name of the instance owner and optionally specify the authentication type of the instance. The authentication type applies to all databases created under that instance. The authentication type is a statement of where the authenticating of users will take place.

You can change the location of the instance directory from DB2PATH using the DB2INSTPROF environment variable. You require write-access for the instance directory. If you want the directories created in a path other than DB2PATH, you have to set DB2INSTPROF before entering the db2icrt command.

For DB2 Enterprise Server Edition (ESE), you also must declare that you are adding a new instance that is a partitioned database system. In addition, when working with a ESE instance having more than one database partition, and working with Fast Communication Manager (FCM), you can have multiple connections between database partitions by defining more TCP/IP ports when creating the instance.

For example, for Windows operating systems, use the db2icrt command with the -r port_range parameter. The port range is shown as follows, where the base_port is the first port that can be used by FCM, and the end_port is the last port in a range of port numbers that can be used by FCM:
  -r:base_port,end_port