IBM Books

Quick Beginnings for DB2 Universal Database for UNIX


Step 4. Create a DB2 Instance

A DB2 instance is an environment where you store data and run applications. Use the db2icrt command to create an instance. You must have root authority to enter this command. For more information about database instances, see Chapter 16. Working with Instances.

The db2icrt command is located in the DB2DIR/instance directory, where DB2DIR is /opt/IBMdb2/V5.0.

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 ]