IBM Books

Quick Beginnings for DB2 Extended Enterprise Edition for UNIX


Step 6. Create a DB2 Instance



note

If you are planning on setting up High Availability (HA) for DB2 using Solstice HA 1.3, skip the following step and see Appendix C. "Implementing Failover Support in the Solaris Operating Environment" for instructions.

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 located in the DB2DIR/instance directory, where DB2DIR is /opt/IBMdb2/V5.0.

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 ]