IBM Support

Test connect to DB2 AS/400 suing Data Direct ODBC Driver fails



When performing the Test Connect from the ODBC Data Source Administrator I receive the following warning: [IBM ( DataDirect OEM)][ODBC DB2 Wire Protocol driver] Connection refused. Verify Host Name and Port Number.

Diagnosing The Problem

  • Verify the Host Name and Port Number:
    1. To determine the port number:
      • The port number which you have to specify is the one of your DB2 DRDA listener on your AS400 (by default port 446). This may or may not be started yet. To check if your DRDA listener has been started, is active, and that you have specified the correct port number:
      • Log on to your AS400
      • Type netstat
      • Select option 3 - "work with tcp/ip connection status"
      • In the local port column you will find 'drda' if the DRDA listener has been started successfully. Choose PF14 to find out the port number on which it listens.
      • If DRDA is not currently listening, the AS/400 command "CHGDDMTCPA AUTOSTART(*YES) PWDRQD(*YES)" will start the listener.
    2. Use ping to verify you can reach the host, e.g. ping <host name>.
    3. Use telent to verify the port is not blocked, e.g. telnet <host name> <port>
      • Open up a command (DOS) window and type: telnet ip 446
      • If it is successful it will bring you to a blank screen. To get out of the blank screen use ctrl + ] to escape. this will then leave you at a "telnet>" prompt where you type quit.
      • If it is not successful you will receive an error. For example: "Could not open connection to the host, on port 446: Connect failed.", this indicates that the connection is blocked, most likely by a firewall. If you are not able to connect to it via telnet then you need to work with your System Administrator or Network Administrator to resolve it.

Resolving The Problem

In this case the port was blocked. After allowing access through the firewall for the port the Test Connection was successful.

[{"Product":{"code":"SSVSEF","label":"IBM InfoSphere DataStage"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"--","Platform":[{"code":"PF033","label":"Windows"}],"Version":"8.5;8.1;8.0.1;7.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018