A DB2 instance is an environment where you store data and run applications. Use the db2icrt command to create an instance. You must run this command on the machine where you have DB2 physically installed and have root authority. For more information about database instances, see Chapter 17. "Working with Instances".
It is possible to add an instance to any machine. If you use different machines to create instances, then the list of instances that is stored on any machine may not be a complete list. We recommend creating every instance on one machine, so that the list of instances is complete on that machine. We also recommend that this node be the Administration Server node.
The db2icrt command is in the DB2DIR/instance
directory, where DB2DIR is /usr/lpp/db2_05_00.
|
Run the db2icrt command from the machine where the home
directory of the instance (INSTHOME) physically resides.
Because the INSTHOME directory is NFS-mounted on all machines, you
only have to run the db2icrt command on one machine.
|
The syntax of the db2icrt command is:
where:
Notes:
Note: | FencedID may not be root or bin. |
When you create an instance, ensure that its primary and secondary groups are different from the Administration Server's primary (SYSADM) group. When you create an instance on the same machine as the Administration Server, its SYSADM group is automatically added to the secondary group list of the Administration Server so that you can use the Control Center to perform administration tasks on that instance.
Examples:
db2icrt -u db2fenc1 db2inst1
db2icrt db2inst1
When an instance is created, its name is also added to the list of instances on the system.
The db2icrt command creates the
INSTHOME/sqllib directory, where INSTHOME is the
home directory of the instance owner.
|
To avoid a potential loss of data if an instance is deleted, you should not create user files or directories under the INSTHOME/sqllib directory, other than those created by DB2. Exceptions are:
|