0
votes

I get the following error when I try to connect Toad for DB2:

ERROR [08001] [IBM] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "10.99.13.5". Communication function detecting the error: "recv". Protocol specific error code(s): "", "", "0". SQLSTATE=08001

enter image description here

Attached is my connection properties. Any help connecting would be great.

1

1 Answers

2
votes

This is tipical problem when the client cannot reach the database. There could be different reasons:

  • Closed port in the local (client) machine. (firewall outbound)
  • If using local catalog, check if everything is correct (db2 catalog database, db2 catalog tcpip node). If using direct connection skip this step.
  • Routing problem (iptables ou network firewall)
  • Database server with closed port (inbonud) - netstat -nato check port.
  • Instance down (ps -ef or task center in windows)
  • DB2COMM registry variable is not set to tcpip
  • Port number is not correctly mapped to service name (instance configuration, use number instead)
  • Database name is not correct (connect locally in the database server)

You can do a telnet from the Windows (client) machine to the server via telnet

telnet databaseServerIP portNumber

Even, if the db2 server is in the same machine, you can do a localhost telnet in order to see that the instance can receive TCP connections

telnet localhost 50000

Once you can do that successfully, you can connect to the database.