[英]ibm_db connect DB2 using SSLClientKeystoredb in Python
[英]Not able to connect zOS DB2 with python ibm_db
我无法使用 python ibm db
包连接到远程zOS DB2
。 连接时出现以下错误:
: [IBM][CLI Driver] SQL30081N A communication error has been detected.
Communication protocol being used: "TCP/IP".
Communication API being use d: "SOCKETS".
Location where the be error was detected: "HOSTNAME".
Communication function detecting the error: "recv".
Protocol specific error code(s): "104", "*", "0". SQLSTATE=08001`
我该如何解决这个错误?。
只是添加防火墙是开放的。 Telnet 和 openssl 工作正常。
没看懂你是怎么连接的。 请尝试以下操作来帮助我们了解您来自哪里:
import ibm_db
ibm_db.connect("DATABASE=;HOSTNAME=;PORT=;PROTOCOL=TCPIP;UID=;PWD=;", "", "")
我能够使用以下连接字符串连接到远程 zOS DB2:
导入 ibm_db
ibm_db.connect("Security=SSL;database=dbname;hostname=hostip;port=port;Protocol=TCPIP;SSLClientKeystoredb=pathtothekeystoredbfile(file extension.kdb);SSLClientKeystash=pathtothekeystashfile(file extension.sth);uid=userid;pwd = 密码", "", "")
另外,我必须将许可证文件“db2consv_zs.lic”放到 ibm_db 的 LICENSE 文件夹中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.