How to find the host and Port for IBM DB2
Print
Modified on: Mon, 20 Jun, 2016 at 11:18 PM
For connecting to DB 2 database, ETL Validator currently requires the hostname and port number. But some of the customers might be configured to use a ODBC DSN name. Here are the steps to find out the host name and port number for IBM DB2:
The first task involves running the IBM DB2 command line processor to list the node directory. The steps below were taken from the post here:
-
On UNIX or Linux, navigate to the IBM DB2 Universal Database server or IBM DB2 Universal Database client sqllib directory, which is located in the IBM DB2 Universal Database instance owner user home directory. For example, on UNIX:
cd /db2home/db2inst1/sqllib
-
On UNIX or Linux, set the IBM DB2 Universal Database environment variables by sourcing the appropriate script:
If necessary, log in to the operating system as the IBM DB2 Universal Database instance owner. Logging in sets up all the IBM DB2 Universal Database environment variables.
On Windows, the IBM DB2 Universal Database installation sets up all necessary environment variables.
-
Start the IBM DB2 Universal Database command line processor (CLP).
-
On UNIX or Linux, enter the following command:
db2
-
On Windows, select Start | Programs | IBM DB2 | Command Line Tools | Command Line Processor.
-
Determine if the desired IBM DB2 Universal Database node has already been cataloged. At the CLP prompt, enter:
list node directory
The node directory listing will give the host name and the SVCENAME (service name). SVCENAME is the port that DB2 is listening on. To resolve this name to an actual port number, you need to refer to the services file, which is located at %SystemRoot%\system32\drivers\etc\services
Did you find it helpful?
Yes
No
Send feedback Sorry we couldn't be helpful. Help us improve this article with your feedback.