简体   繁体   English

无法使用Robot框架中的ibm_db api连接到DB2

[英]Can not connect to DB2 using ibm_db api in Robot framework

I used below statement to connect to DB2 database (on IBM i Access server) in RIDE editor 我使用以下语句在RIDE编辑器中连接到DB2数据库(在IBM i Access服务器上)

Connect To Database Using Custom Params    ibm_db    'DATABASE=mydb;HOSTNAME=10.53.x.x;PORT=8471;PROTOCOL=TCPIP;UID=myuser;PWD=xxxx;','',''

But it always connecting and can not finishing. 但是它总是连接并且无法完成。 I can telnet the port 8471 (this is port for accessing database) 我可以远程登录端口8471(这是用于访问数据库的端口)

When I tried another port I got the below error: 当我尝试另一个端口时,出现以下错误:

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

Do you know how to fix this ? 你知道如何解决这个问题吗?

Try using ibm_db_dbi instead of using ibm_db . 尝试使用ibm_db_dbi而不是ibm_db

It worked for me . 它对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM