IBM Books

Administration Guide


How a Client Connects to a Database

Figure 88 shows a sample configuration of a database network with two DCE cells. /.../CELL_TORONTO and /.../CELL_VANCOUVER are the names of the cells. (Each of these cells contains a directory called /.:/subsys/database/ and while not illustrated in diagram, is used in other examples.)

Figure 88. Configuration of A Network Database


sqld0dc0

To allow the clients in the TORONTO cell to access all the databases in both cells, values must be specified in the database manager configuration parameters and the following objects must be created:

The following provide examples of how a client connects to a database:

These examples include the database manager configuration parameters that must be specified.

Connecting to Databases in the Same Cell

This section describes several examples of how clients connect to databases in the same cell.

  1. Client_1 connects to AIXDB2. The database shares the same directory path name as the client.

    The database administrator needs to:

    The local system database directory does not contain AIXDB2, so the DCE directory is searched using the fully-qualified name. The name is created by concatenating the value for the configuration parameter dir_path_name (or the DB2DIRPATHNAME registry value) with AIXDB2.

    The sequence of events is:

    1. Client_1 obtains the database object for AIXDB2 using the DCE name of the database /.../CELL_TORONTO/subsys/database/AIXDB2.
    2. From this object, Client_1 knows that AIXDB2 uses the DB protocol DB2RA, which is the same protocol that Client_1 uses.
    3. The DB protocols match, so Client_1 reads the DBMS locator object for AIX_INST, retrieves the communications protocol attribute value that matches the one it uses, and uses the information to start a conversation with that DBMS instance.
  2. Client_3 connects to MVSDB. The database shares the same directory path name as the client and uses a different database protocol from the client.

    The database administrator needs to:

    The sequence of events is:

    1. Client_3 obtains the database object for MVSDB using the DCE name of the database /.../CELL_TORONTO/subsys/database/MVSDB.
    2. From this object, Client_3 finds that MVSDB only uses the DB protocol DRDA, which is not the protocol that Client_3 uses.
    3. Client_3 then obtains the routing information object using the name defined in the route_obj_name configuration parameter or the DB2ROUTE registry value. The client finds the target database information for MVSDB.
    4. Client_3 reads the database locator object associated with the MVSDB target database information, retrieves the communication protocol, and sends an SQL CONNECT request to the router.
    5. The router then sets up an APPC connection with MVSDB.

Connecting to a Database in a Different Cell

This section describes an example of how a client connects to a database in a different cell when the database protocols are different.

  1. Client_3 has previously been configured to use the following:
  2. In order for Client_3 to connect to VMDB, the database administrator needs to:

    The sequence of events is:

    1. Client_3 finds the fully qualified DCE name of VANVMDB in its system database directory.
    2. Client_3 obtains the database object for VMDB using the DCE name of the database /.../CELL_VANCOUVER/subsys/database/VMDB.
    3. From this object, Client_3 finds that VMDB only uses the DB protocol DRDA, which is not the protocol that Client_3 uses.
    4. Client_3 then obtains the routing information object using the name defined in the route_obj_name configuration parameter or the DB2ROUTE registry value. The client finds the target database information for VMDB.
    5. Client_3 reads the database locator object associated with the VMDB target database information and retrieves the communication protocol and sends an SQL CONNECT request to the router.
    6. The router then sets up an APPC connection with VMDB.


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

[ DB2 List of Books | Search the DB2 Books ]