Use a remote DB2 database for UDDI
Overview
The WebSphere Application Server UDDI Registry can use a remote UDDI DB2 database installed on a DB2 system running on another machine.
It is possible to connect a DB2 system on one host to use a DB2 database on a remote host. Refer to the DB2 Information Center which supplies information on using the Client Configuration Assistant to achieve this. For the documentation below, the term 'local system' refers to the system running the WebSphere Application Server on which the UDDI Registry is installed and the term 'remote system' refers to another system on which the UDDI DB2 database exists. The UDDI DB2 database is created by running SetupDB2UDDI.jar on the remote system as described within "Setting up the UDDI Registry to use DB2 within a deployment manager cell" or "Setting up the UDDI Registry to use DB2 in a single appserver" and referred to in the last task in the list below. Refer to the DB2 specific version documentation for details.
Here is an example for DB2 V8:
- On the remote host, define the UDDI Registry by entering: java -jar SetupDB2UDDI.jar and following the prompts. The DB2userid and DB2password specified here will be the ones that are used when setupuddi.jacl (or appserversetupuddi.jacl) are run further in these instructions.
- Use DB2's Client Configuration Assistant. When you receive the message "Welcome to the Assistant - would you like to add a database now?" - select "yes"
- On the next screen, click the radio button to "Manually configure a connection to a database" and click on "Next".
- Click TCP/IP on the next screen, and select "The database physically resides on a host or OS/400 system. Click the radio button "Connect directly to the server" and then click "Next".
- The next screen defines the TCP/IP host name and Port Number of the remote system. For the Port Number the use of 50000 is recommended. You are also asked for the service name (for example db2c_db2inst1). Click "Next" when completed.
- The next screen identifies the name of the UDDI database on the remote system and the alias name to be used on the local system. This alias can be anything suitable, including UDDI20 providing there is not a local database of that name.
- The next screen shows "Register this database for ODBC". Leave this as is and click "Next".
- The next screen asks for the Operting System (for example AIX or Windows) and the Remote Instance Name (for example db2inst1). Click "Next" when completed.
- It is not necessary to go any further on this assistant. Click on "Finish" to define the remote database to DB2.
- Another windows displays stating "Test the Connection". Enter the db2userid and db2password for the remote instance in the appropriate fields and click "Test Connection".
- Click "Cancel" and the alias is now correctly set up.
Note: If the user is running a DB2 Client only, and has not got the DB2 Client Configuration Assistant available there are two options available:
- Obtain and install DB2 Adminstration Server (which contains the Client Configuration Assistant).
- Run the commands from the command line:
- Find the port number used by the remote instance you are trying to connect to:
On the remote host as the DB2 instance user:
- Enter the command: "db2 get dbm cfg"
- Find the line containing ".....(SVCENAME) = <service_name>" Make a note of <service_name>
- There is a services file on each supported DB2 platform that changes location depending of the OS. For UNIX platforms this file might typically be found in /etc/services, and on Windows this file might be found in C:\WINNT\system32\drivers\etc\services
- Search this file and find the line for the <service_name> discovered above. Use this port number for the catalog node command. For instance, the service may by "db2c_db2inst1" and the port 50000, depending on the DB2 configuration.
The following commands catalog a node and database alias (on the local host) to allow remote connectivity:
- db2 catalog tcpip node <nodename> remote <remote_hostname> server <port>
Where <nodename> is a node identifier that you choose, remote_hostname is the hostname of the remote host, and port is the port number discovered above
- db2 catalog db UDDI20 at node <nodename>
Where UDDI20 is the name of the UDDI Registry database on the remote system and <nodename> is the identifier you chose in the previous step.
- You can now to the remote database. Test this by:
- db2 connect to uddi20 user <db2userid> using <db2password>
Where <db2userid> is the userid of the DB2 instance on the remote host and <db2password> is the password for the DB2 instance on the remote host.
Run the setupuddi.jacl (or appserversetupuddi.jacl) command on the local system as described in "Setting up the UDDI Registry to use DB2 within a deployment manager cell" or "Setting up the UDDI Registry to use DB2 in a single appserver", ensuring that you specify the alias on the local system as the UDDI database parameter, and the DB2 userid and password on the remote host as the userid and password parameters.
IP Addressing
If you are experiencing problems accessing the remote host, one of the possible causes might be IP addressing. Refer to the "UDDI Troubleshooting Tips" section for a possible solution.
The remote database is now ready for use. Continue with your next task.
Enabling Universal Description, Discovery and Integration (UDDI)