有人知道如何使用远程 DB2 服务器在 Linux 上运行 Web2py 吗?
我尝试使用 pyodbc,但它的文档很差
我找不到它的分步指南。
我的配置文件:
odbcinst.ini:
[DB2]
Description = DB2 Driver
Driver = /opt/odbc_cli/clidriver/lib/libdb2.so
FileUsage = 1
DontDLClose = 1
odbc.ini
[test]
Description = Test to DB2
Driver = DB2
尝试连接:
>>> import pyodbc
>>> cnxn = pyodbc.connect('DRIVER={DB2};SERVER=172.16.1.35;DATABASE=log10;UID=db2admin;PWD=passs')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pyodbc.Error: ('08001', '[08001] [unixODBC][IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "127.0.0.1". Communication function detecting the error: "connect". Protocol specific error code(s): "111", "*", "*". SQLSTATE=08001\n (-30081) (SQLDriverConnect)')
我错过了什么?在此先感谢
基督教