From sontek at gmail.com Wed Sep 2 12:36:51 2015 From: sontek at gmail.com (John Anderson) Date: Wed Sep 2 20:36:56 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 Message-ID: Hey, We currently use pymssql and it was recommended that we checkout mxODBC again (its been a few years) and even though most of our projects require python 3 we have a few legacy python applications that are still on python 2.7 so I thought I would give it a try. I'm currently getting this error: mx.ODBC.Error.OperationalError: ('08003', 0, '[unixODBC][Driver Manager]Connnection does not exist', 13710) with this code: import mx.ODBC.unixODBC as mx db = mx.DriverConnect('DSN=mt1;UID=;PWD=') c = db.cursor() c.tables() res = c.fetchall() and I'm wondering might cause that because I can use isql/tsql and it works: tsql -S mt1 -U -P isql mt1 osql is the only one that doesn't work: osql -S mt1 -U -P checking shared odbc libraries linked to isql for default directories... strings: '': No such file trying /tmp/sql ... no trying /tmp/sql ... no trying /etc ... OK checking odbc.ini files reading /home/sontek/.odbc.ini [mt1] not found in /home/sontek/.odbc.ini reading /etc/odbc.ini [mt1] found in /etc/odbc.ini found this section: [mt1] Driver = FreeTDS Description = ODBC connection via FreeTDS Trace = Yes TraceFile = /tmp/sql.log ServerName = mt1 Database = SM_AccountsNew looking for driver for DSN [mt1] in /etc/odbc.ini found driver line: " Driver = FreeTDS" driver "FreeTDS" found for [mt1] in odbc.ini found driver named "FreeTDS" "FreeTDS" is not an executable file looking for entry named [FreeTDS] in /etc/odbcinst.ini found driver line: " Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so" found driver /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so for [FreeTDS] in odbcinst.ini /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so is not an executable file osql: error: no driver found for mt1 Anyone know what I might be missing? Here is my FreeTDS: [mt1] host = mt1-db01.corp.surveymonkey.com port = 1433 tds version = 7.3 client charset = UTF-8 odbc.ini: [mt1] Driver = FreeTDS Description = ODBC connection via FreeTDS Trace = Yes TraceFile = /tmp/sql.log ServerName = mt1 Database = SM_AccountsNew odbcinst.ini: [FreeTDS] Description = TDS Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Startup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so UsageCount = 1 Threading = 2 -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20150902/8ec7049c/attachment.htm From mal at egenix.com Wed Sep 2 23:05:38 2015 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Sep 2 22:06:15 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 In-Reply-To: References: Message-ID: <55E75692.3070400@egenix.com> On 02.09.2015 20:36, John Anderson wrote: > Hey, We currently use pymssql and it was recommended that we checkout > mxODBC again (its been a few years) and even though most of our projects > require python 3 we have a few legacy python applications that are still on > python 2.7 so I thought I would give it a try. > > I'm currently getting this error: > > mx.ODBC.Error.OperationalError: ('08003', 0, '[unixODBC][Driver > Manager]Connnection does not exist', 13710) This is a typical error message you get when the connection is found by the ODBC manager, i.e. it is configured in the odbc.ini file, but it cannot load it. This can be a permission problem or a linker problem. You can try this to check: ldd /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so Also see our documentation for FreeTDS: http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692966 A note on FreeTDS: You should really use the MS SQL Server Native Client for Linux, if you can. It is much more feature complete compared to FreeTDS and also much easier to configure: https://msdn.microsoft.com/en-us/library/hh568451%28v=sql.110%29.aspx These are the instructions from our documentation: http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692959 > with this code: > > import mx.ODBC.unixODBC as mx > db = mx.DriverConnect('DSN=mt1;UID=;PWD=') > c = db.cursor() > c.tables() > res = c.fetchall() > > and I'm wondering might cause that because I can use isql/tsql and it works: > > tsql -S mt1 -U -P > isql mt1 > > osql is the only one that doesn't work: > > > osql -S mt1 -U -P > > checking shared odbc libraries linked to isql for default directories... > strings: '': No such file > trying /tmp/sql ... no > trying /tmp/sql ... no > trying /etc ... OK > checking odbc.ini files > reading /home/sontek/.odbc.ini > [mt1] not found in /home/sontek/.odbc.ini > reading /etc/odbc.ini > [mt1] found in /etc/odbc.ini > found this section: > [mt1] > Driver = FreeTDS > Description = ODBC connection via FreeTDS > Trace = Yes > TraceFile = /tmp/sql.log > ServerName = mt1 > Database = SM_AccountsNew > looking for driver for DSN [mt1] in /etc/odbc.ini > found driver line: " Driver = FreeTDS" > driver "FreeTDS" found for [mt1] in odbc.ini > found driver named "FreeTDS" > "FreeTDS" is not an executable file > looking for entry named [FreeTDS] in /etc/odbcinst.ini > found driver line: " Driver = > /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so" > found driver /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so for [FreeTDS] > in odbcinst.ini > /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so is not an executable file > osql: error: no driver found for mt1 > > > Anyone know what I might be missing? > > Here is my FreeTDS: > > [mt1] > host = mt1-db01.corp.surveymonkey.com > port = 1433 > tds version = 7.3 > client charset = UTF-8 > > odbc.ini: > > [mt1] > Driver = FreeTDS > Description = ODBC connection via FreeTDS > Trace = Yes > TraceFile = /tmp/sql.log > ServerName = mt1 > Database = SM_AccountsNew > > > odbcinst.ini: > [FreeTDS] > Description = TDS > Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so > Startup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so > UsageCount = 1 > Threading = 2 > > > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > https://www.egenix.com/mailman/listinfo/egenix-users > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 02 2015) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2015-08-27: Released eGenix mx Base 3.2.9 ... http://egenix.com/go83 ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From sontek at gmail.com Wed Sep 2 14:14:05 2015 From: sontek at gmail.com (John Anderson) Date: Wed Sep 2 22:14:12 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 In-Reply-To: <55E75692.3070400@egenix.com> References: <55E75692.3070400@egenix.com> Message-ID: On Wed, Sep 2, 2015 at 1:05 PM, M.-A. Lemburg wrote: > On 02.09.2015 20:36, John Anderson wrote: > > Hey, We currently use pymssql and it was recommended that we checkout > > mxODBC again (its been a few years) and even though most of our projects > > require python 3 we have a few legacy python applications that are still > on > > python 2.7 so I thought I would give it a try. > > > > I'm currently getting this error: > > > > mx.ODBC.Error.OperationalError: ('08003', 0, '[unixODBC][Driver > > Manager]Connnection does not exist', 13710) > > This is a typical error message you get when the connection is found > by the ODBC manager, i.e. it is configured in the odbc.ini file, > but it cannot load it. > > This can be a permission problem or a linker problem. You can > try this to check: > > ldd /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so > > Also see our documentation for FreeTDS: > > http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692966 > > A note on FreeTDS: > > You should really use the MS SQL Server Native Client for > Linux, if you can. It is much more feature complete compared > to FreeTDS and also much easier to configure: > > https://msdn.microsoft.com/en-us/library/hh568451%28v=sql.110%29.aspx > > These are the instructions from our documentation: > > http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692959 > > I figured it is some type of config problem but its really odd because SQLAlchemy can make it work just fine, this lets me connect and query: from sqlalchemy import create_engine engine = create_engine('mssql+mxodbc://:@mt1') I'm looking into the MS SQL Server Native client again as well, we tried it when they first announced it and it would segfault with any significant load and they mostly support Red Hat instead of Ubuntu. I want to compare all variations of it. The reason we are finally looking at other drivers is because the pymssql driver isn't quite fast enough, when selecting 2 million records it takes about 10 seconds: $ time python pymssql_query.py 2148068 real 0m11.138s user 0m9.606s sys 0m0.724s With mxODBC + SQLAlchemy (since I can't get mxodbc to work without SA): $ time python mxodbc_sa.py 2148068 real 0m49.407s user 0m19.013s sys 0m27.161s So it looks like mxodbc is significantly slower than pymssql even though both are utilizing FreeTDS behind the scenes. I'm going to try the native driver next and then I'll let you know. Here is the output of the ldd command: ldd /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so linux-vdso.so.1 => (0x00007ffec93f6000) libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 (0x00007ff192bcd000) libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007ff192985000) libgnutls-deb0.so.28 => /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28 (0x00007ff19266a000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff19244c000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff192082000) libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007ff191e77000) libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007ff191ba8000) libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007ff191977000) libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007ff191772000) libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007ff191567000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff19134c000) libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007ff191105000) libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007ff190ef1000) libnettle.so.4 => /usr/lib/x86_64-linux-gnu/libnettle.so.4 (0x00007ff190cc0000) libhogweed.so.2 => /usr/lib/x86_64-linux-gnu/libhogweed.so.2 (0x00007ff190a91000) libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007ff190811000) /lib64/ld-linux-x86-64.so.2 (0x00007ff193066000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff19060d000) libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007ff190408000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ff1901ec000) libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff18ffe3000) > > with this code: > > > > import mx.ODBC.unixODBC as mx > > db = mx.DriverConnect('DSN=mt1;UID=;PWD=') > > c = db.cursor() > > c.tables() > > res = c.fetchall() > > > > and I'm wondering might cause that because I can use isql/tsql and it > works: > > > > tsql -S mt1 -U -P > > isql mt1 > > > > osql is the only one that doesn't work: > > > > > > osql -S mt1 -U -P > > > > checking shared odbc libraries linked to isql for default directories... > > strings: '': No such file > > trying /tmp/sql ... no > > trying /tmp/sql ... no > > trying /etc ... OK > > checking odbc.ini files > > reading /home/sontek/.odbc.ini > > [mt1] not found in /home/sontek/.odbc.ini > > reading /etc/odbc.ini > > [mt1] found in /etc/odbc.ini > > found this section: > > [mt1] > > Driver = FreeTDS > > Description = ODBC connection via FreeTDS > > Trace = Yes > > TraceFile = /tmp/sql.log > > ServerName = mt1 > > Database = SM_AccountsNew > > looking for driver for DSN [mt1] in /etc/odbc.ini > > found driver line: " Driver = FreeTDS" > > driver "FreeTDS" found for [mt1] in odbc.ini > > found driver named "FreeTDS" > > "FreeTDS" is not an executable file > > looking for entry named [FreeTDS] in /etc/odbcinst.ini > > found driver line: " Driver = > > /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so" > > found driver /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so for [FreeTDS] > > in odbcinst.ini > > /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so is not an executable file > > osql: error: no driver found for mt1 > > > > > > Anyone know what I might be missing? > > > > Here is my FreeTDS: > > > > [mt1] > > host = mt1-db01.corp.surveymonkey.com > > port = 1433 > > tds version = 7.3 > > client charset = UTF-8 > > > > odbc.ini: > > > > [mt1] > > Driver = FreeTDS > > Description = ODBC connection via FreeTDS > > Trace = Yes > > TraceFile = /tmp/sql.log > > ServerName = mt1 > > Database = SM_AccountsNew > > > > > > odbcinst.ini: > > [FreeTDS] > > Description = TDS > > Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so > > Startup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so > > UsageCount = 1 > > Threading = 2 > > > > > > > > > > _______________________________________________________________________ > > eGenix.com User Mailing List http://www.egenix.com/ > > https://www.egenix.com/mailman/listinfo/egenix-users > > > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Sep 02 2015) > >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ > >>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > 2015-08-27: Released eGenix mx Base 3.2.9 ... http://egenix.com/go83 > > ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: > > eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 > D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg > Registered at Amtsgericht Duesseldorf: HRB 46611 > http://www.egenix.com/company/contact/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20150902/1399f9b7/attachment.htm From mal at egenix.com Wed Sep 2 23:55:47 2015 From: mal at egenix.com (M.-A. Lemburg) Date: Wed Sep 2 22:56:05 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 In-Reply-To: References: <55E75692.3070400@egenix.com> Message-ID: <55E76253.60305@egenix.com> On 02.09.2015 22:14, John Anderson wrote: > On Wed, Sep 2, 2015 at 1:05 PM, M.-A. Lemburg wrote: > >> On 02.09.2015 20:36, John Anderson wrote: >>> Hey, We currently use pymssql and it was recommended that we checkout >>> mxODBC again (its been a few years) and even though most of our projects >>> require python 3 we have a few legacy python applications that are still >> on >>> python 2.7 so I thought I would give it a try. >>> >>> I'm currently getting this error: >>> >>> mx.ODBC.Error.OperationalError: ('08003', 0, '[unixODBC][Driver >>> Manager]Connnection does not exist', 13710) >> >> This is a typical error message you get when the connection is found >> by the ODBC manager, i.e. it is configured in the odbc.ini file, >> but it cannot load it. >> >> This can be a permission problem or a linker problem. You can >> try this to check: >> >> ldd /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so >> >> Also see our documentation for FreeTDS: >> >> http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692966 >> >> A note on FreeTDS: >> >> You should really use the MS SQL Server Native Client for >> Linux, if you can. It is much more feature complete compared >> to FreeTDS and also much easier to configure: >> >> https://msdn.microsoft.com/en-us/library/hh568451%28v=sql.110%29.aspx >> >> These are the instructions from our documentation: >> >> http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692959 >> >> > I figured it is some type of config problem but its really odd because > SQLAlchemy can make it work just fine, this lets me connect and query: > > from sqlalchemy import create_engine > engine = create_engine('mssql+mxodbc://:@mt1') SA translates the connect to a call like this: db = mx.Connect('mt1', '', '') It's possible that naming both the DSN and the TDS server using the same identifer confuses some part in the setup when using DriverConnect(). The latter is more flexible, though, since it allows adding more connection options. An ODBC trace will usually show more information about what exactly is not working. The mxODBC documentation explains how this can be enabled (but I see below that you have that enabled already). > I'm looking into the MS SQL Server Native client again as well, we tried it > when they first announced it and it would segfault with any significant > load and they mostly support Red Hat instead of Ubuntu. I want to compare > all variations of it. > > The reason we are finally looking at other drivers is because the pymssql > driver isn't quite fast enough, when selecting 2 million records it takes > about 10 seconds: > > $ time python pymssql_query.py > 2148068 > > real 0m11.138s > user 0m9.606s > sys 0m0.724s > > With mxODBC + SQLAlchemy (since I can't get mxodbc to work without SA): > > $ time python mxodbc_sa.py > 2148068 > > real 0m49.407s > user 0m19.013s > sys 0m27.161s > > So it looks like mxodbc is significantly slower than pymssql even though > both are utilizing FreeTDS behind the scenes. The SA code is likely doing a lot more on top of just running the query. You also have tracing enabled, which slows down things a lot. There are also several options to optimize queries to SQL Server using mxODBC (e.g. using read-only connections, different transaction isolations, direct execution, NO COUNT). We also have the mxODBC Connect product which removes the need for a Unix ODBC driver altogether and uses the MS driver on the Windows database server to directly communicate via shared memory with the database kernel. mxODBC Connect takes care of the client-server communication and is optimized for the Python DB-API way of fetching data. > I'm going to try the native driver next and then I'll let you know. > > Here is the output of the ldd command: > > ldd /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so > linux-vdso.so.1 => (0x00007ffec93f6000) > libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 > (0x00007ff192bcd000) > libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 > (0x00007ff192985000) > libgnutls-deb0.so.28 => /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28 > (0x00007ff19266a000) > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > (0x00007ff19244c000) > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff192082000) > libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007ff191e77000) > libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007ff191ba8000) > libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 > (0x00007ff191977000) > libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 > (0x00007ff191772000) > libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 > (0x00007ff191567000) > libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff19134c000) > libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 > (0x00007ff191105000) > libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 > (0x00007ff190ef1000) > libnettle.so.4 => /usr/lib/x86_64-linux-gnu/libnettle.so.4 > (0x00007ff190cc0000) > libhogweed.so.2 => /usr/lib/x86_64-linux-gnu/libhogweed.so.2 > (0x00007ff190a91000) > libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007ff190811000) > /lib64/ld-linux-x86-64.so.2 (0x00007ff193066000) > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff19060d000) > libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 > (0x00007ff190408000) > libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ff1901ec000) > libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff18ffe3000) Looks fine, so it's probably not related to the linker. >>> with this code: >>> >>> import mx.ODBC.unixODBC as mx >>> db = mx.DriverConnect('DSN=mt1;UID=;PWD=') >>> c = db.cursor() >>> c.tables() >>> res = c.fetchall() >>> >>> and I'm wondering might cause that because I can use isql/tsql and it >> works: >>> >>> tsql -S mt1 -U -P >>> isql mt1 >>> >>> osql is the only one that doesn't work: >>> >>> >>> osql -S mt1 -U -P >>> >>> checking shared odbc libraries linked to isql for default directories... >>> strings: '': No such file >>> trying /tmp/sql ... no >>> trying /tmp/sql ... no >>> trying /etc ... OK >>> checking odbc.ini files >>> reading /home/sontek/.odbc.ini >>> [mt1] not found in /home/sontek/.odbc.ini >>> reading /etc/odbc.ini >>> [mt1] found in /etc/odbc.ini >>> found this section: >>> [mt1] >>> Driver = FreeTDS >>> Description = ODBC connection via FreeTDS >>> Trace = Yes >>> TraceFile = /tmp/sql.log >>> ServerName = mt1 >>> Database = SM_AccountsNew >>> looking for driver for DSN [mt1] in /etc/odbc.ini >>> found driver line: " Driver = FreeTDS" >>> driver "FreeTDS" found for [mt1] in odbc.ini >>> found driver named "FreeTDS" >>> "FreeTDS" is not an executable file >>> looking for entry named [FreeTDS] in /etc/odbcinst.ini >>> found driver line: " Driver = >>> /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so" >>> found driver /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so for [FreeTDS] >>> in odbcinst.ini >>> /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so is not an executable file >>> osql: error: no driver found for mt1 >>> >>> >>> Anyone know what I might be missing? >>> >>> Here is my FreeTDS: >>> >>> [mt1] >>> host = mt1-db01.corp.surveymonkey.com >>> port = 1433 >>> tds version = 7.3 >>> client charset = UTF-8 >>> >>> odbc.ini: >>> >>> [mt1] >>> Driver = FreeTDS >>> Description = ODBC connection via FreeTDS >>> Trace = Yes >>> TraceFile = /tmp/sql.log >>> ServerName = mt1 >>> Database = SM_AccountsNew >>> >>> >>> odbcinst.ini: >>> [FreeTDS] >>> Description = TDS >>> Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so >>> Startup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so >>> UsageCount = 1 >>> Threading = 2 >>> >>> >>> >>> >>> _______________________________________________________________________ >>> eGenix.com User Mailing List http://www.egenix.com/ >>> https://www.egenix.com/mailman/listinfo/egenix-users >>> >> >> -- >> Marc-Andre Lemburg >> eGenix.com >> >> Professional Python Services directly from the Source (#1, Sep 02 2015) >>>>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>>>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ >>>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ >> ________________________________________________________________________ >> 2015-08-27: Released eGenix mx Base 3.2.9 ... http://egenix.com/go83 >> >> ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: >> >> eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 >> D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg >> Registered at Amtsgericht Duesseldorf: HRB 46611 >> http://www.egenix.com/company/contact/ >> > -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 02 2015) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2015-08-27: Released eGenix mx Base 3.2.9 ... http://egenix.com/go83 ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From sallen at zeomega.com Thu Sep 3 02:44:58 2015 From: sallen at zeomega.com (Sheila Allen) Date: Thu Sep 3 08:45:46 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 In-Reply-To: <55E76253.60305@egenix.com> References: <55E75692.3070400@egenix.com> <55E76253.60305@egenix.com> Message-ID: > I'm looking into the MS SQL Server Native client again as well, we tried it when they first announced it and it would segfault with any significant load We're currently testing the MS ODBC Driver for Linux, and ran into a similar segfault under load. This was resolved by upgrading unixODBC 2.3.0 to 2.3.2, even though the MS ODBC Driver officially only supports 2.3.0. Some discussion of the issue here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault I wish Microsoft would show some signs that they plan to maintain the MS ODBC Driver for Linux, such as acknowledging this issue and providing an install script that supports the newer unixODBC 2.3.2. Here is an article on making it work on Debian, along with some useful comments at the bottom. https://blog.afoolishmanifesto.com/posts/install-and-configure-the-ms-odbc-driver-on-debian/ On Wed, Sep 2, 2015 at 3:55 PM, M.-A. Lemburg wrote: > On 02.09.2015 22:14, John Anderson wrote: > > On Wed, Sep 2, 2015 at 1:05 PM, M.-A. Lemburg wrote: > > > >> On 02.09.2015 20:36, John Anderson wrote: > >>> Hey, We currently use pymssql and it was recommended that we checkout > >>> mxODBC again (its been a few years) and even though most of our > projects > >>> require python 3 we have a few legacy python applications that are > still > >> on > >>> python 2.7 so I thought I would give it a try. > >>> > >>> I'm currently getting this error: > >>> > >>> mx.ODBC.Error.OperationalError: ('08003', 0, '[unixODBC][Driver > >>> Manager]Connnection does not exist', 13710) > >> > >> This is a typical error message you get when the connection is found > >> by the ODBC manager, i.e. it is configured in the odbc.ini file, > >> but it cannot load it. > >> > >> This can be a permission problem or a linker problem. You can > >> try this to check: > >> > >> ldd /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so > >> > >> Also see our documentation for FreeTDS: > >> > >> http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692966 > >> > >> A note on FreeTDS: > >> > >> You should really use the MS SQL Server Native Client for > >> Linux, if you can. It is much more feature complete compared > >> to FreeTDS and also much easier to configure: > >> > >> https://msdn.microsoft.com/en-us/library/hh568451%28v=sql.110%29.aspx > >> > >> These are the instructions from our documentation: > >> > >> http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692959 > >> > >> > > I figured it is some type of config problem but its really odd because > > SQLAlchemy can make it work just fine, this lets me connect and query: > > > > from sqlalchemy import create_engine > > engine = create_engine('mssql+mxodbc://:@mt1') > > SA translates the connect to a call like this: > > db = mx.Connect('mt1', '', '') > > It's possible that naming both the DSN and the TDS server using > the same identifer confuses some part in the setup when using > DriverConnect(). The latter is more flexible, though, since it > allows adding more connection options. > > An ODBC trace will usually show more information about what exactly > is not working. The mxODBC documentation explains how this > can be enabled (but I see below that you have that enabled already). > > > I'm looking into the MS SQL Server Native client again as well, we tried > it > > when they first announced it and it would segfault with any significant > > load and they mostly support Red Hat instead of Ubuntu. I want to > compare > > all variations of it. > > > > The reason we are finally looking at other drivers is because the pymssql > > driver isn't quite fast enough, when selecting 2 million records it takes > > about 10 seconds: > > > > $ time python pymssql_query.py > > 2148068 > > > > real 0m11.138s > > user 0m9.606s > > sys 0m0.724s > > > > With mxODBC + SQLAlchemy (since I can't get mxodbc to work without SA): > > > > $ time python mxodbc_sa.py > > 2148068 > > > > real 0m49.407s > > user 0m19.013s > > sys 0m27.161s > > > > So it looks like mxodbc is significantly slower than pymssql even though > > both are utilizing FreeTDS behind the scenes. > > The SA code is likely doing a lot more on top of just running > the query. You also have tracing enabled, which slows down things > a lot. > > There are also several options to optimize queries to SQL Server > using mxODBC (e.g. using read-only connections, different > transaction isolations, direct execution, NO COUNT). > > We also have the mxODBC Connect product which removes the need for > a Unix ODBC driver altogether and uses the MS driver on the > Windows database server to directly communicate via shared > memory with the database kernel. mxODBC Connect takes care of > the client-server communication and is optimized for the > Python DB-API way of fetching data. > > > I'm going to try the native driver next and then I'll let you know. > > > > Here is the output of the ldd command: > > > > ldd /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so > > linux-vdso.so.1 => (0x00007ffec93f6000) > > libodbcinst.so.2 => /usr/lib/x86_64-linux-gnu/libodbcinst.so.2 > > (0x00007ff192bcd000) > > libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 > > (0x00007ff192985000) > > libgnutls-deb0.so.28 => /usr/lib/x86_64-linux-gnu/libgnutls-deb0.so.28 > > (0x00007ff19266a000) > > libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 > > (0x00007ff19244c000) > > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff192082000) > > libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 > (0x00007ff191e77000) > > libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 > (0x00007ff191ba8000) > > libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 > > (0x00007ff191977000) > > libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 > > (0x00007ff191772000) > > libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 > > (0x00007ff191567000) > > libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff19134c000) > > libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 > > (0x00007ff191105000) > > libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 > > (0x00007ff190ef1000) > > libnettle.so.4 => /usr/lib/x86_64-linux-gnu/libnettle.so.4 > > (0x00007ff190cc0000) > > libhogweed.so.2 => /usr/lib/x86_64-linux-gnu/libhogweed.so.2 > > (0x00007ff190a91000) > > libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 > (0x00007ff190811000) > > /lib64/ld-linux-x86-64.so.2 (0x00007ff193066000) > > libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff19060d000) > > libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 > > (0x00007ff190408000) > > libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 > (0x00007ff1901ec000) > > libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff18ffe3000) > > Looks fine, so it's probably not related to the linker. > > >>> with this code: > >>> > >>> import mx.ODBC.unixODBC as mx > >>> db = mx.DriverConnect('DSN=mt1;UID=;PWD=') > >>> c = db.cursor() > >>> c.tables() > >>> res = c.fetchall() > >>> > >>> and I'm wondering might cause that because I can use isql/tsql and it > >> works: > >>> > >>> tsql -S mt1 -U -P > >>> isql mt1 > >>> > >>> osql is the only one that doesn't work: > >>> > >>> > >>> osql -S mt1 -U -P > >>> > >>> checking shared odbc libraries linked to isql for default > directories... > >>> strings: '': No such file > >>> trying /tmp/sql ... no > >>> trying /tmp/sql ... no > >>> trying /etc ... OK > >>> checking odbc.ini files > >>> reading /home/sontek/.odbc.ini > >>> [mt1] not found in /home/sontek/.odbc.ini > >>> reading /etc/odbc.ini > >>> [mt1] found in /etc/odbc.ini > >>> found this section: > >>> [mt1] > >>> Driver = FreeTDS > >>> Description = ODBC connection via FreeTDS > >>> Trace = Yes > >>> TraceFile = /tmp/sql.log > >>> ServerName = mt1 > >>> Database = SM_AccountsNew > >>> looking for driver for DSN [mt1] in /etc/odbc.ini > >>> found driver line: " Driver = FreeTDS" > >>> driver "FreeTDS" found for [mt1] in odbc.ini > >>> found driver named "FreeTDS" > >>> "FreeTDS" is not an executable file > >>> looking for entry named [FreeTDS] in /etc/odbcinst.ini > >>> found driver line: " Driver = > >>> /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so" > >>> found driver /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so for > [FreeTDS] > >>> in odbcinst.ini > >>> /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so is not an executable file > >>> osql: error: no driver found for mt1 > >>> > >>> > >>> Anyone know what I might be missing? > >>> > >>> Here is my FreeTDS: > >>> > >>> [mt1] > >>> host = mt1-db01.corp.surveymonkey.com > >>> port = 1433 > >>> tds version = 7.3 > >>> client charset = UTF-8 > >>> > >>> odbc.ini: > >>> > >>> [mt1] > >>> Driver = FreeTDS > >>> Description = ODBC connection via FreeTDS > >>> Trace = Yes > >>> TraceFile = /tmp/sql.log > >>> ServerName = mt1 > >>> Database = SM_AccountsNew > >>> > >>> > >>> odbcinst.ini: > >>> [FreeTDS] > >>> Description = TDS > >>> Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so > >>> Startup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so > >>> UsageCount = 1 > >>> Threading = 2 > >>> > >>> > >>> > >>> > >>> _______________________________________________________________________ > >>> eGenix.com User Mailing List > http://www.egenix.com/ > >>> https://www.egenix.com/mailman/listinfo/egenix-users > >>> > >> > >> -- > >> Marc-Andre Lemburg > >> eGenix.com > >> > >> Professional Python Services directly from the Source (#1, Sep 02 2015) > >>>>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ > >>>>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ > >>>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > >> ________________________________________________________________________ > >> 2015-08-27: Released eGenix mx Base 3.2.9 ... > http://egenix.com/go83 > >> > >> ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: > >> > >> eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 > >> D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg > >> Registered at Amtsgericht Duesseldorf: HRB 46611 > >> http://www.egenix.com/company/contact/ > >> > > > > -- > Marc-Andre Lemburg > eGenix.com > > Professional Python Services directly from the Source (#1, Sep 02 2015) > >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ > >>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ > >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ > ________________________________________________________________________ > 2015-08-27: Released eGenix mx Base 3.2.9 ... http://egenix.com/go83 > > ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: > > eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 > D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg > Registered at Amtsgericht Duesseldorf: HRB 46611 > http://www.egenix.com/company/contact/ > > > _______________________________________________________________________ > eGenix.com User Mailing List http://www.egenix.com/ > https://www.egenix.com/mailman/listinfo/egenix-users > -- Sheila Allen | Software Architect ZeOmega | Population Health Management Solutions Improving Population Health One Person at a Time Office: +1 214 618 9880 ext 8006 | Mobile: +1 214 491 7146 6200 Tennyson Parkway | Suite 200 | Plano, Texas 75024 USA www.ZeOmega.com -- This e-mail message (including any attachments) may contain information that is confidential, protected by the attorney-client or other applicable privileges, or otherwise comprising non-public information. This message is intended to be conveyed only to the designated recipient(s). If you have any reason to believe you are not an intended recipient of this message, please notify the sender by replying to this message and then deleting it from your system. Any use, dissemination, distribution, or reproduction of this message by unintended recipients is not authorized and may be unlawful. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20150903/0d4bccfc/attachment.htm From mal at egenix.com Thu Sep 3 12:16:22 2015 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Sep 3 11:16:43 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 In-Reply-To: References: <55E75692.3070400@egenix.com> <55E76253.60305@egenix.com> Message-ID: <55E80FE6.8040508@egenix.com> On 03.09.2015 08:44, Sheila Allen wrote: >> I'm looking into the MS SQL Server Native client again as well, we tried >> it when they first announced it and it would segfault with any significant >> load > > We're currently testing the MS ODBC Driver for Linux, and ran into a > similar segfault under load. This was resolved by upgrading unixODBC 2.3.0 > to 2.3.2, even though the MS ODBC Driver officially only supports 2.3.0. > > Some discussion of the issue here: > https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault We are using the MS driver with unixODBC 2.3.2 just fine. The only segfault we've seen so far is related to using Unicode strings with DriverConnect(): http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692959 If you can provide instructions on how to reproduce the problem you are seeing under load, we can try to investigate this some more. > I wish Microsoft would show some signs that they plan to maintain the MS > ODBC Driver for Linux, such as acknowledging this issue and providing an > install script that supports the newer unixODBC 2.3.2. The current version is unixODBC 2.3.4 :-) > Here is an article on making it work on Debian, along with some useful > comments at the bottom. > > https://blog.afoolishmanifesto.com/posts/install-and-configure-the-ms-odbc-driver-on-debian/ We are using these steps on openSUSE: tar xvfz msodbcsql-11.0.2270.0-redhat6.tar.gz cd msodbcsql-11.0.2270.0/ ./install.sh install --force --accept-license This installs the driver into /opt/microsoft/msodbcsql (you can ignore all the warnings). To make the driver, we also have to add a few symlinks for OpenSSL libs, since RedHat uses different names that openSUSE: cd /lib64 ln -sf libssl.so.1.0.0 libssl.so.10 ln -sf libcrypto.so.1.0.0 libcrypto.so.10 ldconfig Finally, and for completeness, we add the lib/ dir to the linker setup in /etc/ld.so.conf.d/odbc.conf: /opt/microsoft/msodbcsql/lib64 The run ldconfig. This last step doesn't appear to be necessary, since the driver also loads without the linker setup, but it's cleaner that way. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 03 2015) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2015-08-27: Released eGenix mx Base 3.2.9 ... http://egenix.com/go83 ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From sallen at zeomega.com Thu Sep 3 06:06:15 2015 From: sallen at zeomega.com (Sheila Allen) Date: Thu Sep 3 12:07:03 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 In-Reply-To: <55E80FE6.8040508@egenix.com> References: <55E75692.3070400@egenix.com> <55E76253.60305@egenix.com> <55E80FE6.8040508@egenix.com> Message-ID: On Thu, Sep 3, 2015 at 4:16 AM, M.-A. Lemburg wrote: > > On 03.09.2015 08:44, Sheila Allen wrote: > >> I'm looking into the MS SQL Server Native client again as well, we tried > >> it when they first announced it and it would segfault with any significant > >> load > > > > We're currently testing the MS ODBC Driver for Linux, and ran into a > > similar segfault under load. This was resolved by upgrading unixODBC 2.3.0 > > to 2.3.2, even though the MS ODBC Driver officially only supports 2.3.0. > > > > Some discussion of the issue here: > > https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault > > We are using the MS driver with unixODBC 2.3.2 just fine. The only > segfault we've seen so far is related to using Unicode strings with > DriverConnect(): > > http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692959 > > If you can provide instructions on how to reproduce the problem > you are seeing under load, we can try to investigate this some > more. The segfault issue goes away with 2.3.2, as mentioned above. This discussion describes how to reproduce the issue using the unixODBC 2.3.0: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault The point here...the concern...is really that the official Microsoft certified unixODBC version is 2.3.0, a very old version with a known bug. The documentation mentions that version repeatedly, and specifically states that 2.3.1 is not supported. So the docs are really outdated, and I guess the installation script is too because it requires additional manual workarounds to use newer versions of unixODBC. Here are the Microsoft installation docs: https://www.microsoft.com/en-us/download/details.aspx?id=36437 This has been raised in several threads, and has been a known issue since 2012, but Microsoft has failed to certify or document use of newer versions of unixODBC since then. Unless I'm just looking in the wrong place. Here's another article that turned up in a search for the driver...once again it describes use of unixODBC 2.3.0. https://msdn.microsoft.com/en-us/library/hh568449(v=sql.110).aspx So the question is whether it's a good idea to advocate for the use of this driver, which seems to be somewhat abandoned after several years. Has anyone seen any statements from Microsoft that they're continuing to support it? I've seen this discussed among users also on the Microsoft blog, with no response: http://blogs.msdn.com/b/sqlnativeclient/archive/2013/01/23/introducing-the-new-microsoft-odbc-drivers-for-sql-server.aspx#10620294 Am I just looking in the wrong places? -- This e-mail message (including any attachments) may contain information that is confidential, protected by the attorney-client or other applicable privileges, or otherwise comprising non-public information. This message is intended to be conveyed only to the designated recipient(s). If you have any reason to believe you are not an intended recipient of this message, please notify the sender by replying to this message and then deleting it from your system. Any use, dissemination, distribution, or reproduction of this message by unintended recipients is not authorized and may be unlawful. -------------- next part -------------- An HTML attachment was scrubbed... URL: /mailman-archives/egenix-users/attachments/20150903/d18c4d2d/attachment.htm From mal at egenix.com Thu Sep 3 14:28:56 2015 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Sep 3 13:29:17 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 In-Reply-To: References: <55E75692.3070400@egenix.com> <55E76253.60305@egenix.com> <55E80FE6.8040508@egenix.com> Message-ID: <55E82EF8.1060003@egenix.com> On 03.09.2015 12:06, Sheila Allen wrote: > On Thu, Sep 3, 2015 at 4:16 AM, M.-A. Lemburg wrote: >> >> On 03.09.2015 08:44, Sheila Allen wrote: >>>> I'm looking into the MS SQL Server Native client again as well, we > tried >>>> it when they first announced it and it would segfault with any > significant >>>> load >>> >>> We're currently testing the MS ODBC Driver for Linux, and ran into a >>> similar segfault under load. This was resolved by upgrading unixODBC > 2.3.0 >>> to 2.3.2, even though the MS ODBC Driver officially only supports 2.3.0. >>> >>> Some discussion of the issue here: >>> > https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault >> >> We are using the MS driver with unixODBC 2.3.2 just fine. The only >> segfault we've seen so far is related to using Unicode strings with >> DriverConnect(): >> >> http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692959 >> >> If you can provide instructions on how to reproduce the problem >> you are seeing under load, we can try to investigate this some >> more. > > The segfault issue goes away with 2.3.2, as mentioned above. This > discussion describes how to reproduce the issue using the unixODBC 2.3.0: > > https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault Thanks, we'll try to replicate this and then check with the various unixODBC versions. > The point here...the concern...is really that the official Microsoft > certified unixODBC version is 2.3.0, a very old version with a known bug. > The documentation mentions that version repeatedly, and specifically states > that 2.3.1 is not supported. The reason for this is likely a change in the naming of the unixODBC shared libs. MS would have to create a new release for 2.3.1. Here's the full story behind all this: unixODBC has had some trouble with a major change in their ABI: they switched from 32-bit SQLLEN to 64-bit SQLLEN (for 64-bit platforms) late in the 2.2.x series (in 2.2.13). To make people more easily recognize this change, a new minor release was created (2.3.0), but unfortunately, they forgot to also bump the shared lib version numbers (from .1 to .2). In 2.3.1, they fixed this, so software built against 2.3.0 won't find the shared libs built by 2.3.0. Now, if you know that software was built against 2.3.0 (as in the case of the MS driver), you can simply symlink the new .2 shared libs to .1 and make things work again. It's a mess, but we'll eventually get over it. Just takes a few years :-) See the change log for more details: http://www.unixodbc.org/ Note that the MS driver only links against the ODBC installer shared lib of unixODBC, not the ODBC driver manager itself, i.e. libodbcinst.so.1. > So the docs are really outdated, and I guess > the installation script is too because it requires additional manual > workarounds to use newer versions of unixODBC. Here are the Microsoft > installation docs: > > https://www.microsoft.com/en-us/download/details.aspx?id=36437 > > This has been raised in several threads, and has been a known issue since > 2012, but Microsoft has failed to certify or document use of newer versions > of unixODBC since then. Unless I'm just looking in the wrong place. > > Here's another article that turned up in a search for the driver...once > again it describes use of unixODBC 2.3.0. > > https://msdn.microsoft.com/en-us/library/hh568449(v=sql.110).aspx > > So the question is whether it's a good idea to advocate for the use of this > driver, which seems to be somewhat abandoned after several years. Has > anyone seen any statements from Microsoft that they're continuing to > support it? I've seen this discussed among users also on the Microsoft > blog, with no response: > > http://blogs.msdn.com/b/sqlnativeclient/archive/2013/01/23/introducing-the-new-microsoft-odbc-drivers-for-sql-server.aspx#10620294 > > Am I just looking in the wrong places? No, the 11.0.2270.0 version is their latest release. It was published in Jan 2013: http://www.microsoft.com/en-us/download/details.aspx?id=36437 Note that this is also their latest version for Windows, so things are not as bad as they may seem :-) http://www.microsoft.com/en-us/download/details.aspx?id=36434 Here's a good search to stay on top with the available driver versions for SQL Server: http://www.microsoft.com/en-us/search/Results.aspx?q=Microsoft%20ODBC%20Driver%20SQL%20Server&form=DLC -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 03 2015) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2015-08-27: Released eGenix mx Base 3.2.9 ... http://egenix.com/go83 ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From mal at egenix.com Thu Sep 3 20:42:59 2015 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Sep 3 19:43:19 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 In-Reply-To: <55E82EF8.1060003@egenix.com> References: <55E75692.3070400@egenix.com> <55E76253.60305@egenix.com> <55E80FE6.8040508@egenix.com> <55E82EF8.1060003@egenix.com> Message-ID: <55E886A3.9090405@egenix.com> On 03.09.2015 13:28, M.-A. Lemburg wrote: > On 03.09.2015 12:06, Sheila Allen wrote: >> On Thu, Sep 3, 2015 at 4:16 AM, M.-A. Lemburg wrote: >>> >>> On 03.09.2015 08:44, Sheila Allen wrote: >>>>> I'm looking into the MS SQL Server Native client again as well, we >> tried >>>>> it when they first announced it and it would segfault with any >> significant >>>>> load >>>> >>>> We're currently testing the MS ODBC Driver for Linux, and ran into a >>>> similar segfault under load. This was resolved by upgrading unixODBC >> 2.3.0 >>>> to 2.3.2, even though the MS ODBC Driver officially only supports 2.3.0. >>>> >>>> Some discussion of the issue here: >>>> >> https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault >>> >>> We are using the MS driver with unixODBC 2.3.2 just fine. The only >>> segfault we've seen so far is related to using Unicode strings with >>> DriverConnect(): >>> >>> http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692959 >>> >>> If you can provide instructions on how to reproduce the problem >>> you are seeing under load, we can try to investigate this some >>> more. >> >> The segfault issue goes away with 2.3.2, as mentioned above. This >> discussion describes how to reproduce the issue using the unixODBC 2.3.0: >> >> https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault > > Thanks, we'll try to replicate this and then check with the > various unixODBC versions. I just ran the following setup without segfaults: * openSUSE Linux 13.1 x64 * unixODBC 2.3.0 * unixODBC .so.1 libs symlink'ed to .so.2 for compatibility with mxODBC 3.3.5 * MS ODBC driver 11.00.2270 Our test suite tries to create up to 100 connections all open at the same time. Unlike the example in the above forum thread it uses DriverConnect(). Perhaps that makes a difference. Also note that the thread mentions a version 11.0.1790 of the MS ODBC driver. That was their first release of the Linux driver: http://www.microsoft.com/en-us/download/details.aspx?id=28160 published in 2012. So I guess the problem was on their side and not in unixODBC; or perhaps a combination of effects on both sides causing the problem. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 03 2015) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2015-08-27: Released eGenix mx Base 3.2.9 ... http://egenix.com/go83 ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From mal at egenix.com Fri Sep 4 00:51:47 2015 From: mal at egenix.com (M.-A. Lemburg) Date: Thu Sep 3 23:52:07 2015 Subject: [egenix-users] Using mxodbc with SQL Server 2012 In-Reply-To: <55E886A3.9090405@egenix.com> References: <55E75692.3070400@egenix.com> <55E76253.60305@egenix.com> <55E80FE6.8040508@egenix.com> <55E82EF8.1060003@egenix.com> <55E886A3.9090405@egenix.com> Message-ID: <55E8C0F3.5080808@egenix.com> On 03.09.2015 19:42, M.-A. Lemburg wrote: > On 03.09.2015 13:28, M.-A. Lemburg wrote: >> On 03.09.2015 12:06, Sheila Allen wrote: >>> On Thu, Sep 3, 2015 at 4:16 AM, M.-A. Lemburg wrote: >>>> >>>> On 03.09.2015 08:44, Sheila Allen wrote: >>>>>> I'm looking into the MS SQL Server Native client again as well, we >>> tried >>>>>> it when they first announced it and it would segfault with any >>> significant >>>>>> load >>>>> >>>>> We're currently testing the MS ODBC Driver for Linux, and ran into a >>>>> similar segfault under load. This was resolved by upgrading unixODBC >>> 2.3.0 >>>>> to 2.3.2, even though the MS ODBC Driver officially only supports 2.3.0. >>>>> >>>>> Some discussion of the issue here: >>>>> >>> https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault >>>> >>>> We are using the MS driver with unixODBC 2.3.2 just fine. The only >>>> segfault we've seen so far is related to using Unicode strings with >>>> DriverConnect(): >>>> >>>> http://www.egenix.com/products/python/mxODBC/doc/#_Toc427692959 >>>> >>>> If you can provide instructions on how to reproduce the problem >>>> you are seeing under load, we can try to investigate this some >>>> more. >>> >>> The segfault issue goes away with 2.3.2, as mentioned above. This >>> discussion describes how to reproduce the issue using the unixODBC 2.3.0: >>> >>> https://social.msdn.microsoft.com/Forums/sqlserver/en-US/23fafa84-d333-45ac-8bd0-4b76151e8bcc/sql-server-driver-for-linux-causes-segmentation-fault >> >> Thanks, we'll try to replicate this and then check with the >> various unixODBC versions. > > I just ran the following setup without segfaults: > > * openSUSE Linux 13.1 x64 > * unixODBC 2.3.0 > * unixODBC .so.1 libs symlink'ed to .so.2 for compatibility > with mxODBC 3.3.5 > * MS ODBC driver 11.00.2270 > > Our test suite tries to create up to 100 connections all open > at the same time. > > Unlike the example in the above forum thread it uses DriverConnect(). > Perhaps that makes a difference. Checked with Connect(): same result - no segfaults. > Also note that the thread mentions a version 11.0.1790 of the MS > ODBC driver. That was their first release of the Linux driver: > > http://www.microsoft.com/en-us/download/details.aspx?id=28160 > > published in 2012. > > So I guess the problem was on their side and not in unixODBC; > or perhaps a combination of effects on both sides causing > the problem. Has anyone else observed intermittent problems with the combination unixODBC + MS SQL Server Native Client 11.00.2270 ? We're always keen on hearing about such problems with ODBC drivers to be able address these using work-arounds in mxODBC. Thanks, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 03 2015) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2015-08-27: Released eGenix mx Base 3.2.9 ... http://egenix.com/go83 ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From info at egenix.com Mon Sep 14 11:24:19 2015 From: info at egenix.com (eGenix Team: M.-A. Lemburg) Date: Mon Sep 14 10:24:41 2015 Subject: [egenix-users] ANN: eGenix mxODBC Plone/Zope Database Adapter 2.2.3 Message-ID: <55F68433.7050902@egenix.com> ________________________________________________________________________ ANNOUNCING mxODBC Plone/Zope Database Adapter Version 2.2.3 for the Plone CMS and Zope server platform Available for Plone 4.0-4.3 and Plone 5.0, Zope 2.12 and 2.13, on Windows, Linux, Mac OS X, FreeBSD and other platforms This announcement is also available on our web-site for online reading: http://www.egenix.com/company/news/eGenix-mxODBC-Zope-DA-2.2.3-GA.html ________________________________________________________________________ INTRODUCTION The eGenix mxODBC Zope DA allows you to easily connect your Zope or Plone CMS installation to just about any database backend on the market today, giving you the reliability of the commercially supported eGenix product mxODBC and the flexibility of the ODBC standard as middle-tier architecture. The mxODBC Zope Database Adapter is highly portable, just like Zope itself, and provides a high performance interface to all your ODBC data sources, using a single well-supported interface on Windows, Linux, Mac OS X, FreeBSD and other platforms. This makes it ideal for deployment in ZEO Clusters and Zope hosting environments where stability and high performance are a top priority, establishing an excellent basis and scalable solution for your Plone CMS. Product page: http://www.egenix.com/products/zope/mxODBCZopeDA/ ________________________________________________________________________ NEWS The 2.2.3 release of our mxODBC Zope/Plone Database Adapter product is a patch level release of the popular ODBC database interface for Plone and Zope. It includes these enhancements and fixes: Feature Updates --------------- * We have integrated a new option to force serialized connects on a per Zope connection object basis. This can be used to work around bugs in ODBC drivers which are not fully thread-safe in the connect phase. The option is disabled per default. Driver Compatibility Enhancements --------------------------------- * ODBC driver compatibility updated. Upgraded to the latest mxODBC 3.3.5 release, adding compatibility enhancements for MS SQL Server. See the mxODBC 3.3.5 release announcements for full details. Installation Enhancements ------------------------- * Added pip install compatibility to mxODBC Zope DA by creating prebuilt archives and uploading a web installer to PyPI. This can be useful if you are installing Zope or Plone using a requirements.txt type approach, e.g. using pip install ThreadLock Products.ZSQLMethods egenix-mxodbc-zopeda * Enabled creating wheels from the prebuilt archives, which helps when running pip with the wheels package installed. pip then tries to build wheels during installation and caches them for future reuse. The complete list of changes is available on the mxODBC Zope DA changelog page. http://www.egenix.com/products/zope/mxODBCZopeDA/changelog.html mxODBC Zope DA 2.2.0 was released on 2014-12-11. Please see the mxODBC Zope DA 2.2.0 release announcement for all the new features we have added. http://www.egenix.com/company/news/eGenix-mxODBC-Zope-DA-2.2.0-GA.html For the full list of features, please see the mxODBC Zope DA feature list: http://www.egenix.com/products/zope/mxODBCZopeDA/#Features The complete list of changes is available on the mxODBC Zope DA changelog page. ________________________________________________________________________ UPGRADING Users are encouraged to upgrade to this latest mxODBC Plone/Zope Database Adapter release to benefit from the new features and updated ODBC driver support. We have taken special care not to introduce backwards incompatible changes, making the upgrade experience as smooth as possible. For major and minor upgrade purchases, we will give out 20% discount coupons going from mxODBC Zope DA 1.x to 2.2 and 50% coupons for upgrades from mxODBC 2.x to 2.2. After upgrade, use of the original license from which you upgraded is no longer permitted. Patch level upgrades (e.g. 2.2.0 to 2.2.3) are always free of charge. Please contact the eGenix.com Sales Team with your existing license serials for details for an upgrade discount coupon. If you want to try the new release before purchase, you can request 30-day evaluation licenses by visiting our web-site or writing to sales@egenix.com, stating your name (or the name of the company) and the number of eval licenses that you need. http://www.egenix.com/products/python/mxODBCZopeDA/#Evaluation ________________________________________________________________________ DOWNLOADS Please visit the eGenix mxODBC Zope DA product page for downloads, instructions on installation and documentation of the packages: http://www.egenix.com/company/products/zope/mxODBCZopeDA/ If you want to try the package, please jump straight to the download instructions: http://www.egenix.com/products/zope/mxODBCZopeDA/#Download Fully functional evaluation licenses for the mxODBC Zope DA are available free of charge: http://www.egenix.com/products/zope/mxODBCZopeDA/#Evaluation ________________________________________________________________________ SUPPORT Commercial support for this product is available directly from eGenix.com. Please see the support section of our website for details: http://www.egenix.com/services/support/ ________________________________________________________________________ MORE INFORMATION For more information on eGenix mxODBC Zope DA, licensing and download instructions, please write to sales@egenix.com. About eGenix (http://www.egenix.com/): eGenix is a software project, consulting and product company focusing on expert project services and professional quality products for companies, Python users and developers. Enjoy, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Sep 14 2015) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> mxODBC Plone/Zope Database Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2015-09-18: PyCon UK 2015 ... 4 days to go 2015-10-21: Python Meeting Duesseldorf ... 37 days to go ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From info at egenix.com Wed Sep 16 11:25:39 2015 From: info at egenix.com (eGenix Team: M.-A. Lemburg) Date: Wed Sep 16 10:25:59 2015 Subject: [egenix-users] ANN: PyDDF Python Sprint 2015 Message-ID: <55F92783.2000109@egenix.com> [This announcement is in German since it targets a Python sprint in D?sseldorf, Germany] ________________________________________________________________________ ANK?NDIGUNG PyDDF Python Sprint 2015 in D?sseldorf Samstag, 26.09.2015, 10:00-18:00 Uhr Sonntag, 27.09.2015, 10:00-18:00 Uhr trivago GmbH, Karl-Arnold-Platz 1A, 40474 D?sseldorf 4. Stock, Raum 25 "Madrid" Python Meeting D?sseldorf http://pyddf.de/sprint2015/ ________________________________________________________________________ INFORMATION Das Python Meeting D?sseldorf (PyDDF) veranstaltet mit freundlicher Unterst?tzung der *trivago GmbH* ein Python Sprint Wochenende im September. Der Sprint findet am Wochenende 26/27.09.2015 im 4. Stock der trivago Niederlassung am Karl-Arnold-Platz 1A statt (nicht am Bennigsen-Platz 1). Bitte beim Pf?rtner melden. Google Maps: https://www.google.de/maps/dir/51.2452741,6.7711581//@51.2450432,6.7714612,18.17z?hl=de Folgende Themengebiete haben wir als Anregung angedacht: * Openpyxl Openpyxl ist eine Python Bibliothek, mit der man Excel 2010 Dateien lesen und schreiben kann. Charlie ist Co-Maintainer des Pakets. * Python 3 Portierung von mxDateTime mxDateTime ist ein Python Bibliothek f?r Datums- und Zeitgr??en, die fr?her der Standard f?r solche Datentypen war, bevor das datetime Modul zu Python hinzukam. Die Bibliothek wird von einer ganzen Reihe Projekten verwendet und soll auf Python 3 portiert werden. Marc-Andre hat mxDateTime geschrieben. F?r die Portierung sind Kenntnisse in Python 2.7, 3.4 und ANSI C von Vorteil. Fehlende Kenntnisse k?nnen aber nat?rlich schnell erlernt werden. Nat?rlich kann jeder Teilnehmer weitere Themen vorschlagen, z.B. * Kivy * Raspberry Pi * FritzConnection * OpenCV * u.a. Alles weitere und die Anmeldung findet Ihr auf der Sprint Seite: http://pyddf.de/sprint2015/ Teilnehmer sollten sich zudem auf der PyDDF Liste anmelden, da wir uns dort koordinieren: https://www.egenix.com/mailman/listinfo/pyddf ________________________________________________________________________ ?BER UNS Das Python Meeting D?sseldorf (PyDDF) ist eine regelm??ige Veranstaltung in D?sseldorf, die sich an Python Begeisterte aus der Region wendet: * http://pyddf.de/ Einen guten ?berblick ?ber die Vortr?ge bietet unser YouTube-Kanal, auf dem wir die Vortr?ge nach den Meetings ver?ffentlichen: * http://www.youtube.com/pyddf/ Veranstaltet wird das Meeting von der eGenix.com GmbH, Langenfeld, in Zusammenarbeit mit Clark Consulting & Research, D?sseldorf: * http://www.egenix.com/ * http://www.clark-consulting.eu/ Mit freundlichen Gr??en, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 16 2015) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> Python Database Interfaces ... http://products.egenix.com/ >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ ________________________________________________________________________ 2015-09-14: Released mxODBC Plone/Zope DA 2.2.3 http://egenix.com/go84 2015-09-18: PyCon UK 2015 ... 2 days to go 2015-09-26: Python Meeting Duesseldorf Sprint 2015 10 days to go eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From info at egenix.com Wed Sep 23 11:12:02 2015 From: info at egenix.com (eGenix Team: M.-A. Lemburg) Date: Wed Sep 23 10:12:19 2015 Subject: [egenix-users] ANN: eGenix mxODBC Connect 2.1.4 - Remote Python Database Interface Message-ID: <56025ED2.6040809@egenix.com> ________________________________________________________________________ ANNOUNCING eGenix.com mxODBC Connect Remote Python Database Interface Version 2.1.4 mxODBC Connect is our commercially supported client-server product for connecting Python applications to relational databases in a truly platform independent way. This announcement is also available on our website for online reading: http://www.egenix.com/company/news/eGenix-mxODBC-Connect-2.1.4-GA.html ________________________________________________________________________ INTRODUCTION The mxODBC Connect Database Interface for Python allows users to easily connect Python applications to all major databases on the market today in a highly portable, convenient and secure way. Python Database Connectivity the Easy Way ----------------------------------------- Building on our mxODBC database interface for Python, mxODBC Connect is designed as client-server application, so you no longer need to find production quality database drivers for all platforms you target with your Python application. Instead, you use an easy to install royalty-free Python client library which connects directly to the mxODBC Connect database server over the network. This makes mxODBC Connect a great basis for writing cross-platform multi-tier database applications and utilities in Python, especially if you run applications that need to communicate with databases such as MS SQL Server and MS Access, Oracle Database, IBM DB2 and Informix, Sybase ASE and Sybase Anywhere, MySQL, PostgreSQL, SAP MaxDB and many more, that run on Windows or Linux machines. Ideal for Database Driven Client Applications --------------------------------------------- By removing the need to install and configure ODBC drivers on the client side and dealing with complicated network setups for each set of drivers, mxODBC Connect greatly simplifies deployment of database driven client applications, while at the same time making the network communication between client and database server more efficient and more secure. For more information, please have a look at the mxODBC Connect product page, in particular, the full list of available features. For more information, please see the product page: http://www.egenix.com/products/python/mxODBCConnect/ ________________________________________________________________________ NEWS mxODBC Connect 2.1.4 is a patch level release of our successful mxODBC Connect database product. It includes these enhancements and fixes: Security Enhancements --------------------- * Updated included OpenSSL libraries to 1.0.1p. Please see the egenix-pyopenssl change log for a complete list of changes. Among other security fixes, this addresses the Logjam attack. http://www.egenix.com/products/python/pyOpenSSL/changelog.html mxODBC Connect Enhancements --------------------------- * Added support for the BinaryNull work-around added to mxODBC 3.3.5 in order to better support VARBINARY columns in MS SQL Server. Both mxODBC Connect Client and Server will need to upgraded to version 2.1.4 in order to be able to use the new singleton. * The mxODBC Connect Client can now be compiled to a wheel file to simplify deployment. Simply point the pip at the prebuilt archive. mxODBC API Enhancements ----------------------- * Upgraded the mxODBC Connect Server to mxODBC 3.3.5: http://www.egenix.com/company/news/eGenix-mxODBC-3.3.5-GA.html MS SQL Server ------------- * Documented and recommended use of SET NOCOUNT ON for running multiple statements or stored procedures. This can not only resolve issues with error reporting, it also results in better performance. * Added a work-around for MS SQL Server Native Client to be able to support VARCHAR/VARBINARY(MAX) columns when using the Native Client with direct execution mode or Python type binding mode. Thanks to ZeOmega for reporting this. * Added new helper singleton BinaryNull to allow binding a NULL to a VARBINARY column with SQL Server in direct execution mode or Python type binding mode (as used for FreeTDS). Using the usual None doesn't work in those cases, since SQL Server does not accept a VARCHAR data type as input for VARBINARY, except by using an explicit "CAST(? AS VARBINARY)". mxODBC binds None as VARCHAR for best compatibility, when not getting any type hints from the ODBC driver. * Added a fix for the MS SQL Server Native Client error "[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]The data types varchar and text are incompatible in the equal to operator." when trying to bind a string of more than 256 bytes to a VARCHAR column while using cursor.executedirect(). cursor.execute() was unaffected by this. Thanks to Paul Perez for reporting this. * Added a note to avoid using "execute " when calling stored procedures with MS SQL Server. This can result in '[Microsoft][SQL Native Client]Invalid Descriptor Index' errors. Simply dropping the "execute " will have the error go away. * Added a work-around to address the FreeTDS driver error '[FreeTDS][SQL Server]The data types varbinary and image are incompatible in the equal to operator.' when trying to bind binary strings longer than 256 bytes to a VARBINARY column. This problem does not occur with the MS SQL Server Native Client. * Reenabled returning cursor.rowcount for FreeTDS >= 0.91. In previous versions, FreeTDS could return wrong data for .rowcount when using SELECTs.This should make SQLAlchemy users happy again. * Add work-around to have FreeTDS ODBC driver accept binary data in strings as input for VARBINARY columns. A side effect of this is that FreeTDS will now also accept binary data in VARCHAR columns. SAP Sybase ASE -------------- * Added work-arounds and improvements for Sybase ASE ODBC drivers to enable working with BINARY and VARBINARY columns. * Added a work-around for a cursor.rowcount problem with Sybase ASE's ODBC driver on 64-bit platforms. It sometimes returns 4294967295 instead of -1. * Added note about random segfault problems with the Sybase ASE 15.7 ODBC driver on Windows. Unfortunately, there's nothing much we can do about this, other than recommend using the Sybase ASE 15.5 ODBC driver version which does not have these stability problems. Fixes --------------------- * Added improved documentation on the direct execution model available in mxODBC. This can help in more complex parameter binding situations and also provides performance boosts for a few databases, including e.g. MS SQL Server. For the full set of changes, including those of the 2.1 series of mxODBC Connect, please check the mxODBC Connect change log: http://www.egenix.com/products/python/mxODBCConnect/changelog.html ________________________________________________________________________ UPGRADING You are encouraged to upgrade to this latest mxODBC Connect release. When upgrading, please always upgrade both the server and the client installations to the same version - even for patch level releases. We will give out 20% discount coupons for upgrade purchases going from mxODBC Connect Server 1.x to 2.1 and 50% coupons for upgrades from mxODBC Connect Server 2.x to 2.1. Please contact the eGenix.com Sales Team (sales@egenix.com) with your existing license serials for details. Users of our stand-alone mxODBC product will have to purchase new licenses from our online shop in order to use mxODBC Connect. You can request free 30-day evaluation licenses by visiting our web-site or writing to sales@egenix.com, stating your name (or the name of the company) and the number of eval licenses that you need. http://www.egenix.com/products/python/mxODBCConnect/#Evaluation ________________________________________________________________________ DOWNLOADS The download archives as well as instructions for installation and configuration of the product can be found on the product page: http://www.egenix.com/products/python/mxODBCConnect/ If you want to try the package, jump straight to the download instructions: http://www.egenix.com/products/python/mxODBCConnect/#Download Fully functional evaluation licenses for the mxODBC Connect Server are available free of charge: http://www.egenix.com/products/python/mxODBCConnect/#Evaluation The mxODBC Connect Client is always free of charge. _______________________________________________________________________ SUPPORT Commercial support for this product is available from eGenix.com. Please see http://www.egenix.com/services/support/ for details about our support offerings. _______________________________________________________________________ INFORMATION About eGenix (http://www.egenix.com/): eGenix is a Python software project, consulting and product company delivering expert services and professional quality products for companies, Python users and developers. We specialize in database driven applications, large scale software designs and integration. Enjoy, -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Sep 23 2015) >>> Python Projects, Coaching and Consulting ... http://www.egenix.com/ >>> Python Database Interfaces ... http://products.egenix.com/ >>> Plone/Zope Database Interfaces ... http://zope.egenix.com/ ________________________________________________________________________ 2015-09-14: Released mxODBC Plone/Zope DA 2.2.3 http://egenix.com/go84 2015-09-26: Python Meeting Duesseldorf Sprint 2015 3 days to go 2015-10-21: Python Meeting Duesseldorf ... 28 days to go eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/