[egenix-users] Help with setup

Adil Lotia adil.lotia at gmail.com
Wed Oct 18 20:21:27 CEST 2006


Hi,

I would like to connect to SQL Server 2005 from Python 2.4 running on Ubuntu
Linux.

I am still trying to come up to grips with how to get going on this, but at
this
point I am not sure if I am on the right track. Have I have not installed
some
piece or have I have messed up my environment by installing "too much"
stuff?! Part
of the problem is that I probably don't understand all the layers needed in
this
layer cake!

I downloaded egenix-mx-commercial-2.0.7-py2.4_ucs4_1.i386.rpm and converted
it to a .deb via 'alien' and installed it. (mxDateTime 2.0.6 is also
installed)

I then installed iODBC 3.52.3-1, and create this ~/odbc.ini file:

[ODBC]
Debug=1
Trace=0
DebugFile=/tmp/odbc-debugfile.log
TraceFile=/tmp/odbc-tracefile.log
TraceAutoStop=1

[ODBC Data Sources]
TestReportDB=Test Reporting Database

[TestReportDB]
Driver=/usr/lib/python2.4/site-packages/mx/ODBC/unixODBC/mxODBC.so
Description=SQL Server 2005
Database=dmarc_reporting
LogonID=adminservices
Password=xxxx
Address=192.168.201.17,1423

Then tried to test the connection -- (Sort of following the doc on iODBC
site.)

alotia at gensym:/usr/lib$ iodbctest
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0305.1107

Enter ODBC connect string (? shows list): ?

DSN                              | Driver
------------------------------------------------------------------------------
TestReportDB                     | Test Reporting Database

Enter ODBC connect string (? shows list):
DSN=TestReportDB;UID=adminservices;PWD=xxxx
1: SQLDriverConnect = [iODBC][Driver Manager]libodbc.so.1: cannot open
shared object file: No such file or directory (0) SQLSTATE=00000
                                             ^^^^^^^^^^^
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be
loaded (0) SQLSTATE=IM003
alotia at gensym:


At this point I was not sure if libiodbc and libodbc have the same
functionality,
but I thought I'll install it as well. Ended up installing libodbc from the
unixODBC (2.2.11-11build1) package.

Now, when I try iodbctest, I get:
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0305.1107

Enter ODBC connect string (? shows list): ?

DSN                              | Driver
------------------------------------------------------------------------------
TestReportDB                     | Test Reporting Database

Enter ODBC connect string (? shows list):
DSN=TestReportDB;UID=adminservices;PWD=xxxx
1: SQLDriverConnect = [iODBC][Driver
Manager]/usr/lib/python2.4/site-packages/mx/ODBC/unixODBC/mxODBC.so:
undefined symbol: _Py_NoneStruct (0) SQLSTATE=00000
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be
loaded (0) SQLSTATE=IM003
alotia at gensym:

I did some searching for _Py_NoneStruct, but I did not find any hits in the
context
of mxODBC.

At this point I am not sure if I am completely on the wrong track. BTW, I
have
downloaded Microsoft's SQL Server 2005 JDBC driver, and used it to
successfully
connect to the DB using dbvis, so at least I know that I have no
connectivity
or authorization problems.

Thanks for any help.

Best,
-Adil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20061018/47477f17/attachment.htm


More information about the egenix-users mailing list