DB2连接通过pyodbc和pandas.io.sql在Unix框中与非root [英] DB2 connection through pyodbc and pandas.io.sql in Unix Box with non-root
问题描述
我正在尝试使用pyodbc和pandas.io.sql通过python连接到IBM DB2,现在扭曲的是我不是超级用户,或者说我没有任何权利安装DB2驱动程序或其他任何东西。 p>
可以使用pyodbc和pandas.io.sql连接到这样的条件的DB2。
代码到目前为止我使用的是
cnxn = pyodbc.connect('Driver = {FreeTDS}; Hostname = eee; Port = 25369 ; Protocol = TCPIP; Database = rt; CurrentSchema = abc; UID = abc; PWD = efg;')
错误
pyodbc.Error:('IM002','[IM002] [unixODBC] [驱动程序管理器]数据源名称没有找到,没有指定默认驱动(0)(SQLDriverConnect)')
或者可以检查是否有预安装的DB2驱动程序。
至少需要用于ODBC和CLI的IBM Data Server驱动程序。你不需要root来安装它,它只是一堆图书馆。在这里找到正确的版本: http://www-01.ibm.com /support/docview.wss?uid=swg24033997
I am trying to connect to IBM DB2 through python using pyodbc and pandas.io.sql, now the twist is I am not Super User or better to say I dont have any right to install DB2 Driver or anything else.
Is it possible to use pyodbc and pandas.io.sql to connect to DB2 with such conditions.
The code which I used so far is
cnxn = pyodbc.connect('Driver={FreeTDS}; Hostname=eee;Port=25369;Protocol=TCPIP;Database=rt;CurrentSchema=abc;UID=abc;PWD=efg;')
Error
pyodbc.Error: ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)')
Or is it possible to check if there is preinstalled DB2 driver.
At a minimum you need the IBM Data Server Driver for ODBC and CLI. You don't need to be root to install it, it's just a bunch of libraries. Find the correct version here: http://www-01.ibm.com/support/docview.wss?uid=swg24033997
这篇关于DB2连接通过pyodbc和pandas.io.sql在Unix框中与非root的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!