IBM Books

Quick Beginnings for DB2 Universal Database for UNIX


Creating Instances

The instance owner and the group that is the System Administrative (SYSADM) group are associated with every instance. The instance owner and 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 is also important. This primary group automatically becomes the system administrative group for the instance and gains SYSADM authority over the instance. Other user IDs that are members of the primary group of the instance owner also gain this level of authority. For this reason, you may want to assign the instance owner's user 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.

You can use the DB2 Installer program or the db2icrt command to create an instance. See Chapter 4. Installing Additional Products and Creating Additional Instances to create instances by using the DB2 Installer program. The DB2 Installer program is available for AIX, HP-UX, SCO UnixWare 7, SGI IRIX, and Solaris operating systems.

To create additional instances using the db2icrt command, enter:

   DB2DIR/instance/db2icrt -u FencedID instance_name

where instance_name 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 HP-UX, SCO UnixWare 7, or Solaris
Note:To create instances on a SINIX operating system, see Create an Instance of the Product.

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. The authentication type of the instance applies to all databases owned by the instance.

  2. While authentication type (DCE) is an optional parameter, it is not valid to choose (DCE) for this command.

-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.

-p PortName
Is an optional parameter that specifies the TCP/IP service name or port number to be used. This value will then be set in the instance's database configuration file.

-s InstType
Is an optional parameter that allows different types of instances to be created. Valid instance types are ee, eee and client.

instance_name
Is the login name of the instance owner.

If a server product is installed, the syntax is:

   db2icrt -u FencedID instance_name

Examples:

When an instance is created, its name is also added to the list of instances on the system.


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

[ DB2 List of Books | Search the DB2 Books ]