Registering host databases in LDAP

When you register host databases in LDAP, there are two possible configurations: direct connection to the host databases or, connection to the host database though a gateway.

About this task

For direct connection to the host databases, you register the host server in LDAP, then catalog the host database in LDAP specifying the node name of the host server. For connection to the host database though a gateway, you register the gateway server in LDAP, then catalog the host database in LDAP specifying the node name of the gateway server.

If LDAP support is available at the Db2 Connect gateway, and the database is not found at the gateway database directory, the Db2® database system looks up LDAP and attempts to keep the found information.

Procedure

In general, you can manually configure host database information in LDAP so that each client is not required to manually catalog the database and node locally on each computer. The process is as follows:

  1. Register the host database server in LDAP.

    You must specify the remote computer name, instance name, and the node type for the host database server in the REGISTER command using the REMOTE, INSTANCE, and NODETYPE clauses. The REMOTE clause can be set to either the host name or the LU name of the host server machine. The INSTANCE clause can be set to any character string that has eight characters or less. (For example, the instance name can be set to Db2.) The NODETYPE clause must be set to DCS to indicate that this is a host database server.

  2. Register the host database in LDAP using the CATALOG LDAP DATABASE command.

    Any additional DRDA parameters can be specified by using the PARMS clause. The database authentication type should be set to SERVER.

Example

The following example shows both a direct connection to the host databases and a connection to the host database though a gateway. There is a host database called NIAGARA_FALLS, which can accept incoming connections using TCP/IP. If the client cannot connect directly to the host because it does not have Db2 Connect, then it connects using a gateway called goto@niagara.

The following steps must be done:
  1. Register the host database server in LDAP for TCP/IP connectivity. The TCP/IP hostname of the server is "myhost" and the port number is "446". The NODETYPE clause is set to DCS to indicate that this is a host database server.
       db2 register ldap as nftcpip tcpip hostname myhost svcename 446 
          remote mvssys instance mvsinst nodetype dcs
  2. Register a Db2 Connect gateway server in LDAP for TCP/IP connectivity. The TCP/IP hostname for the gateway server is "niagara" and the port number is "50000".
       db2 register ldap as whasf tcpip hostname niagara svcename 50000 
          remote niagara instance goto nodetype server
  3. Catalog the host database in LDAP using TCP/IP connectivity. The host database name is "NIAGARA_FALLS", the database alias name is "nftcpip". The GWNODE clause is used to specify the nodename of the Db2 Connect gateway server.
       db2 catalog ldap database NIAGARA_FALLS as nftcpip at node nftcpip 
          gwnode whasf authentication server

After completing the registration and cataloging shown previously, if you want to connect to the host using TCPIP, you connect to nftcpip. If you do not have Db2 Connect on your client workstation, the connection goes through the gateway using TCPIP. From the gateway, it connects to the host using TCP/IP.