Connecting to DB2 database

醉酒当歌 提交于 2019-12-13 05:26:40

问题


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

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


回答1:


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.



来源:https://stackoverflow.com/questions/14987937/connecting-to-db2-database

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!