IBM Books

Administration Guide


Creating Directory Objects

There are three types of directory objects that the database administrator needs to create:

Each object contains attributes. Refer to "Attributes of Each Object Class" for a complete description of the attributes.

Before the database administrator can create the objects, the DCE administrator needs to add database information into a CDS table and grant create privileges to the database administrator. Refer to "DCE Administrator Tasks" for the details.

Database Objects

A database object is required for each target database. The object has a name that contains the cell name concatenated to the directory name and the name of the database, for example:

   /.../cell_name/dir_name1/dir_name2/OBJ_NAME
Note:The following is recommended for the name of the database. The name should be less than or equal to 8 characters and all the characters should be upper case. If the name is mixed case or longer than 8 characters, you need to use the CATALOG GLOBAL DATABASE command to assign an alias. See "CATALOG GLOBAL DATABASE Command" for details about the command.

The following is an example of a database object. The object stored in the DCE directory contains other information such as a timestamp. The letter to the left of each attribute indicates if the attribute is required - R, optional - O, or a comment - C.

   Object name:              /.../CELL_TORONTO/subsys/database/AIXDB1
R  DB_Object_Type:           D
C  DB_Product_Name:          DB2_for_AIX
C  DB_Product_Release:       V5R1M000
R  DB_Native_Database_Name:  AIXDBASE
R  DB_Database_Protocol:     DB2RA
R  DB_Authentication:        CLIENT
O  DB_Communication_Protocol:
O  DB_Database_Locator_Name: /.../CELL_TORONTO/subsys/database/AIX_INST
C  DB_Comment:               Test_database_on_AIX

If the database is one of many databases associated with a database manager instance, the database object should contain the name of a database locator object and the communication protocol should be blank. The name of the database locator object is the fully-qualified name of the database manager or DB2 Connect instance.

Here is an example of the DCE commands to create the object. Before any objects can be created, the DCE administrator needs to do the steps described in "DCE Administrator Tasks".

First you must type the following in a file called cdscp.inp:

create object /.:/subsys/database/AIXDB1
 
add object /.:/subsys/database/AIXDB1 DB_Object_Type            = D
add object /.:/subsys/database/AIXDB1 DB_Product_Name           = DB2_for_AIX
add object /.:/subsys/database/AIXDB1 DB_Product_Release        = V5R1M000
add object /.:/subsys/database/AIXDB1 DB_Native_Database_Name   = AIXDBASE
add object /.:/subsys/database/AIXDB1 DB_Database_Protocol      = DB2RA
add object /.:/subsys/database/AIXDB1 DB_Authentication         = CLIENT
add object /.:/subsys/database/AIXDB1 DB_Database_Locator_Name  = /.../CELL_TORONTO/subsys/database/AIX_INST
add object /.:/subsys/database/AIXDB1 DB_Comment                = Test_database_on_AIX

Then you must run either

This should be followed by

Use the following command to display the object:

   cdscp show object /.:/subsys/database/AIXDB1

If the database is the only database associated with a database manager instance, the database object should contain values for the Communication Protocol attribute and the name of the database locator object should be blank. For example:

   Object name:                 /.../CELL_TORONTO/subsys/database/MVSDB
R  DB_Object type:              D
C  DB_Product_Name:             DB2_for_MVS
C  DB_Product_Release:          V5R1M00
R  DB_Native_Database_Name:     MVSDBASE
R  DB_Database_Protocol:        DRDA
R  DB_Authentication:           SERVER
O  DB_Communication_Protocol:   APPC;NET1;TARGETLU1;DB2DRDA;MODE1;PROGRAM
O  DB_Database_Locator_Name:
C  DB_Comment:                  Test_database_on_MVS

Database Locator Objects

These objects contain the details about all the communication protocols used by a DBMS instance or a DB2 Connect instance. One database locator object is required for:

The object has a name that contains the cell name concatenated to the directory name and the one-part name of the database instance, for example:

   /.../cell_name/dir_name1/dir_name2/AIX_INST
Note:If the instance is used as the target of an ATTACH, the one-part name must be less than or equal to 8 characters and all upper case.

The following is an example of a database locator object. The object stored in the DCE directory contains other information such as a timestamp. The letter to the left of each attribute indicates if the attribute is required - R, optional - O, or a comment - C.

   Object name:               /.../CELL_TORONTO/subsys/database/AIX_INST
R  DB_Object_Type:            L
C  DB_Product_Name:           DB2_for_AIX
C  DB_Product_Release:        V5R1M00
R  DB_Communication_Protocol: TCPIP;HOSTNAME1;1234
R  DB_Communication_Protocol: APPC;NET1;TARGETLU1;TPN1;MODE;PROGRAM
C  DB_Comment:                Test_instance_on_AIX

When an attribute is defined in both the database object and the database locator object, the value in the database object is used.

Here is an example of the DCE commands to create the object. Before any objects can be created, the DCE administrator needs to do the steps described in "DCE Administrator Tasks".

First you must type the following in a file called cdscp.inp:

create object /.:/subsys/database/AIX_INST
 
add object /.:/subsys/database/AIX_INST DB_Object_Type            = L
add object /.:/subsys/database/AIX_INST DB_Product_Name           = DB2_for_AIX
add object /.:/subsys/database/AIX_INST DB_Product_Release        = V5R1M00
add object /.:/subsys/database/AIX_INST DB_Communication_Protocol = TCPIP;HOSTNAME1;1234
add object /.:/subsys/database/AIX_INST DB_Communication_Protocol = APPC;NET1;TARGETLU;TPN1;MODE;PROGRAM
add object /.:/subsys/database/AIX_INST DB_Comment                = Test_instance_on_AIX

Then you must run either

This should be followed by

Use the following command to display the object:

   cdscp show object /.:/subsys/database/AIX_INST

Routing Information Objects

Routing information objects are required for host access. When a mismatch exists in the database protocol used by a client and the database protocol used by the target database, the routing object tells the client which DB2 Connect instance to use. Attributes exist for each target database, which include the database protocols that are available and the name of the database locator object for the DB2 Connect instance. The object has a name that contains the cell name concatenated to the directory name and a unique one-part name, for example:

   /.../cell_name/dir_name1/dir_name2/ROUTE1

The following is an example of a routing information object. The object stored in the DCE directory contains other information such as a timestamp. The letter to the left of each attribute indicates if the attribute, and each token within an attribute is required - R, optional - O, or a comment - C.

Client group 1 is Client_1, Client_2, and Client_3 in Figure 88.

   Object name:    /.../CELL_TORONTO/subsys/database/ROUTE1
R  DB_Object_Type: R
C  DB_Comment:     Routing_for_client_group_1
 
R  DB_Target_Database_Info
   R  Database name                 = /.../CELL_TORONTO/subsys/database/MVSDB
   R  Outbound protocol from router = DRDA
   R  Inbound protocol to router    = DB2RA
   R  Authenticate at gateway       = 1
   O  Parameter string              = NOMAP,D,INTERRUPT_ENABLED
   R  DB_Database_Locator_Name      = /.../CELL_TORONTO/subsys/database/GW_INST
 
R  DB_Target_Database_Info
   R  Database name                 = *OTHERDBS
   R  Outbound protocol from router = DRDA
   R  Inbound protocol to router    = DB2RA
   R  Authenticate at gateway       = 0
   O  Parameter string              =
   R  DB_Database_Locator_Name      = /.../CELL_TORONTO/subsys/database/OTH_INST

The database name *OTHERDBS is a special value that identifies a common router used to access any target database not explicitly defined in the routing information object.

Here is an example of the DCE commands to create the object. The backslash (\) character is a continuation character.

Before any objects can be created, the DCE administrator needs to do the steps described in "DCE Administrator Tasks".

First you must type the following in a file called cdscp.inp:

create object /.:/subsys/database/ROUTE1
 
add object /.:/subsys/database/ROUTE1 DB_Object_Type = R
add object /.:/subsys/database/ROUTE1 DB_Comment     = Routing_for_client_group_1
add object /.:/subsys/database/ROUTE1 DB_Target_Database_Info = \
/.../CELL_TORONTO/subsys/database/MVSDB;\
drda;db2ra;1;NOMAP,D,INTERRUPT_ENABLE;\
/.../CELL_TORONTO/subsys/database/GW_INST
add object /.:/subsys/database/ROUTE1 DB_Target_Database_Info = \
*OTHERDBS;drda;db2ra;0;;\
/.../CELL_TORONTO/subsys/database/OTH_INST

Then you must run either

This should be followed by

Use the following command to display the object:

   cdscp show object /.:/subsys/database/ROUTE1

For more information about the DCE commands, refer to the following DCE publications:


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

[ DB2 List of Books | Search the DB2 Books ]