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:
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.
- 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 - 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 - 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.