IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition for UNIX


Creating Instances



note

If you are running file collections on an RS/6000 SP system that is running AIX, ensure that the instance user ID is created from the file collections server. When file collections is run, the user ID and group will be deleted if added to an RS/6000 SP node that is not the file collections server.

To see if file collections is running, issue the crontab -l command from one of the RS/6000 SP nodes and look for an entry such as:

10 * * * * /var/sysman/supper update sup.admin
user.admin node.root

The user ID of the instance owner, and the group that is the System Administrative (SYSADM) group, are associated with every instance. The instance owner an the SYSADM group are assigned during the process of creating the instance. One user ID can be used for only one instance. That user ID is also referred to as the instance owner.

Each instance owner must have a unique home directory. All of the files necessary to run the instance are created in the home directory of the instance owner's user ID. If it becomes necessary to remove the instance owner's user ID from the system, you could potentially lose files associated with the instance and lose access to data stored in this instance. For this reason, it is recommended that you dedicate an instance owner user ID to be used exclusively to run DB2.

The primary group of the instance owner user ID is also important. This primary group automatically becomes the system administrative group for the instance and gains SYSADM authority over the instance. (Administrative authority allows users to start, stop, or change the database instance.) Other user IDs that are members of the primary group of the instance user ID also gain this level of authority. For this reason, you may want to assign the instance owner ID to a primary group that is reserved for the administration of instances. (Also make sure that you assign a primary group to the instance owner user ID; otherwise, the system-default primary group is used.)

If you already have a group that you want to make the system administrative group for the instance, you can simply assign this group as the primary group when you create the instance owner user ID. To give other users administrative authority on the instance, add them to the group that is assigned as the system administrative group.

To separate SYSADM authority between instances, ensure that each instance owner user ID uses a different primary group. However, if you choose to have common SYSADM authority over multiple instances, you can use the same primary group for multiple 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.

When you create an instance on a machine that has an Administration Server on it, its SYSADM group is automatically added to the secondary group list of the Administration Server so that you can use the CCA and the Control Center to perform administration tasks on that instance.

To create additional instances using the db2icrt command, enter:

   DB2DIR/instance/db2icrt -u FencedID InstName

where InstName is an alphanumeric string up to eight characters long (see "Usernames, Group Names, and Instance Names" for more information) and

where DB2DIR = /usr/lpp/db2_05_00 on AIX


= /opt/IBMdb2/V5.0 on Solaris


note

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:
Creating an instance
where:

-h | -?
Display a help menu for this command.

-d
Sets the debug mode that you can use for problem determination.

-a AuthType
Is an optional parameter that specifies the authentication type for the instance. Valid authentication types are SERVER, CLIENT, and DCS. If the -a parameter is not specified, the authentication type defaults to SERVER, if a DB2 server is installed. Otherwise, the AuthType is set to CLIENT.

Notes:

  1. All databases in the instance have the same authentication type.

  2. DCE authentication is not valid for this command; however, you can enable DCE authentication for an instance. For more information, refer to the Administration Guide.

-u FencedID
Is the user under which the fenced UDFs and stored procedures will execute. This is not required if you install the DB2 Client Application Enabler or the DB2 Software Developer's Kit. For other products, this is a required parameter.
Note:FencedID may not be root or bin.

InstName
Is the login name of the instance owner.

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:

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.

Figure hint not displayed.

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:

  1. If your system supports fenced user defined functions and fenced stored procedures, put the fenced applications in the INSTHOME/sqllib/function directory.

  2. The location of the db2nodes.cfg file. This file should be put in the INSTHOME/sqllib directory, where INSTHOME is the home directory of the instance owner.


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

[ DB2 List of Books | Search the DB2 Books ]