连接到DB2数据库 [英] Connecting to DB2 database
问题描述
我尝试连接Toad for DB2时出现以下错误:
I get the following error when I try to connect Toad for DB2:
ERROR [08001] [IBM] SQL30081N通讯错误已被检出
。正在使用的通信协议:TCP / IP。通讯
正在使用API:SOCKETS。检测到错误的位置:
10.99.13.5。通讯功能检测错误:recv。
协议特定的错误代码:,,0。 SQLSTATE = 08001
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.
推荐答案
当客户端无法访问数据库时,这是一个棘手的问题。可能有不同的原因:
This is tipical problem when the client cannot reach the database. There could be different reasons:
- 本地(客户端)机器中的封闭端口。 (防火墙出站)
- 如果使用本地目录,请检查一切是否正确(db2目录数据库,db2目录tcpip节点)。如果使用直接连接,请跳过此步骤。
- 路由问题(iptables ou网络防火墙)
- 关闭端口(inbonud)的数据库服务器 - netstat -nato检查端口。
- 实例向下(Windows中的ps -ef或任务中心)
- DB2COMM注册表变量未设置为tcpip
- 端口号未正确映射到服务名称(实例配置,使用数字)
- 数据库名称不正确(在数据库服务器中本地连接)
- 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)
您可以通过telnet从Windows(客户端)机器到服务器执行telnet
You can do a telnet from the Windows (client) machine to the server via telnet
telnet databaseServerIP portNumber
即使db2服务器是在同一台机器上,您可以执行本地主机telnet以查看该实例可以接收TCP连接
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
一旦你可以成功地完成,你可以连接到数据库se。
Once you can do that successfully, you can connect to the database.
这篇关于连接到DB2数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!