IBM Books

Quick Beginnings


Step 4. Creating a DB2 Instance

A DB2 instance is an environment where you store data and run applications. Use the db2icrt command to create an instance of the product. If you are not familiar with the concepts of a database instance, see Chapter 36. "Working with DB2 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:
* Figure db2icrt not displayed.
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 server product 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. Authentication type, DCE, is valid. However, it is not valid to choose DCE as an AuthType for this command. To enable DCE authentication for a DB2 instance, 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 an required parameter.
Note:FencedID may not be root or bin.

InstName
is the login name of the instance owner.

If a server product is installed, the syntax is:

   db2icrt -u FencedID InstName

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 of the instance owner.

* Figure hint not displayed.

You should not create files or directories under INSTHOME/sqllib directory other than those created by DB2 products. This avoids a potential loss of data if an instance is deleted. There is one exception. If your system supports fenced User Defined Functions and fenced Stored Procedures, put the fenced User Defined Functions and the fenced Stored Procedures applications in the INSTHOME/sqllib/function directory.



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

[ DB2 List of Books | Search the DB2 Books ]