连接到 DB2 数据库 [英] Connecting to DB2 database

查看:30
本文介绍了连接到 DB2 数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试连接 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 检查端口.
  • 实例关闭(ps -ef 或 windows 中的任务中心)
  • DB2COMM 注册表变量未设置为 tcpip
  • 端口号未正确映射到服务名称(实例配置,请改用数字)
  • 数据库名称不正确(在数据库服务器本地连接)

您可以通过远程登录从 Windows(客户端)机器远程登录到服务器

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

telnet databaseServerIP portNumber

即使 db2 服务器在同一台机器上,您也可以进行 localhost 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

一旦你能成功地做到这一点,你就可以连接到数据库了.

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

这篇关于连接到 DB2 数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆