IBM Books

DB2 Connect User's Guide


Creating a Database Object

The database object defines the host or AS/400 database server to DB2 Connect. It must always be defined.

For each host or AS/400 database server that you will access, use the DCE command cdscp create object to create a database object. For example:

   cdscp create object database_global_name

Add the following attributes to the object:

DB_Object_Type
D for database

DB_Product_Name
The relational database product (for example, DB2_for_MVS, or DB2_for_OS390)

DB_Native_Database_Name
The database name on the host or AS/400 database server system, as follows:

MVS or OS/390
The LOCATION value

VSE or VM
The database name

OS/400
The relational database name

DB_Database_Protocol
DRDA

DB_Authentication
SERVER, CLIENT, or DCE, as described in Security with DCE Directory Services.

DB_Principal
If the Authentication method is DCE, enter the DCE Principal in this attribute.

DB_Communication_Protocol
The following information about the communication protocol between the DB2 Connect server and the host or AS/400 database server:

  1. For the communication protocol APPC:

    1. The communication protocol (APPC)

    2. The network ID of the host or AS/400 database server

    3. The LU name for the host or AS/400 database server

    4. The transaction program name for connections to the host or AS/400 database server. For DB2 for MVS/ESA, specify DB2DRDA. For any other operating system, specify a valid value that is not in hexadecimal format.

    5. The mode name

    6. The security type, as described in Security with DCE Directory Services. For example:
         APPC;SPIFNET;NYM2DB2;DB2DRDA;IBMRDB;PROGRAM
      

  2. For the communication protocol TCPIP:

    1. The communication protocol (TCPIP)

    2. The destination TCP/IP hostname (for the host or AS/400 database server).

    3. The TCP/IP port number.

    4. Type of connection (whether using SOCKS or NONE). This is optional. If not specified, NONE is used. For example, the following are the attribute values for the communication protocol TCP/IP:
         tcpip;jaguar;19713;NONE
      

To create a Database object with system security you could put the following instructions into a file:

   create object /.../cdscell1/subsys/database/DBMVS01
   add    object /.../cdscell1/subsys/database/DBMVS01 DB_Object_Type=D
   add    object /.../cdscell1/subsys/database/DBMVS01 DB_Product_Name=DB2_for_MVS
   add    object /.../cdscell1/subsys/database/DBMVS01 DB_Database_Protocol=DRDA
   add    object /.../cdscell1/subsys/database/DBMVS01 DB_Native_Database_Name=\
                     NEW_YORK
   add    object /.../cdscell1/subsys/database/DBMVS01 DB_Authentication=SERVER
   add    object /.../cdscell1/subsys/database/DBMVS01 DB_Communication_Protocol=\
                     APPC;SPIFNET;NYM2DB2;DB2DRDA;IBMRDB;PROGRAM

Then, enter the command:

   cdscp < filename
Note:In the file, specify a backslash (\) whenever you want a statement to continue to the next line.

To create a Database object with DCE security you could put the following instructions into a file:

   create object /.../cdscell1/subsys/database/DBMVS02
   add    object /.../cdscell1/subsys/database/DBMVS02 DB_Object_Type=D
   add    object /.../cdscell1/subsys/database/DBMVS02 DB_Product_Name=DB2_for_MVS
   add    object /.../cdscell1/subsys/database/DBMVS02 DB_Database_Protocol=DRDA
   add    object /.../cdscell1/subsys/database/DBMVS02 DB_Native_Database_Name=\
                     NEW_YORK
   add    object /.../cdscell1/subsys/database/DBMVS02 DB_Authentication=DCE
   add    object /.../cdscell1/subsys/database/DBMVS02 DB_Principal=\
                 /.../cdscell1/principal_name
   add    object /.../cdscell1/subsys/database/DBMVS02 DB_Communication_Protocol=\
                     APPC;SPIFNET;NYM2DB2;DB2DRDA;IBMRDB;NONE

Then, enter the command:

   cdscp < filename


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

[ DB2 List of Books | Search the DB2 Books ]