0

I needed to change our sql driver from FreeTDS to msobdc17 for msi support. The problem results in a degradation in our insertion operations. Specifically, when we insert in bulk (with batch size~=50), the performance is highly degraded on concurrent processes accessing the same db (with different connection though). I’m getting the following error – probably related:

The transaction operation cannot be performed because there are pending requests working on this transaction

I'm using the following stack environment:

python:3.7.5-slim-stretch (Linux container)
msodbcsql17=17.6.1.1-1
mssql-tools=17.6.1.1-1 
unixodbc-dev=2.3.7
Django==1.11.29
django-pyodbc-azure==1.11.15.0
pyodbc==4.0.30

before that we had FreeTDS with versions:

freetds-dev=0.91-6.1+b4 
freetds-bin=0.91-6.1+b4 
tdsodbc=0.91-6.1+b4 

By now I tried to "play" with:

  1. Enabling MARS
  2. Enabling pool connections
  3. Set Threading=1 in odbcinst.ini

None of those were helpful.

Did someone encounter this issue or any suggestions on configuration parameters can help?

  • FreeTDS actually has features that MSODBC does not, oddly enough. For example, connecting with Windows Auth credentials works with FreeTDS, but not MSODBC. FreeTDS version 0.91 only supported up to TDS protocol version 7.2. MSODBC 2017 supports up to 7.4. I'm wondering if restricting the TDS Version somehow to version 7.2 might help; but I'm not sure you can do that on MSODBC. – FlipperPA Oct 20 '20 at 02:05
  • @FlipperPA actually we used TDS protocol version 8.0 and it worked fine. – Yoni Mantzur Oct 21 '20 at 05:51
  • TDS protocol 8.0 doesn't actually exist. It is a deprecated shim for TDS version 7.1. http://www.freetds.org/userguide/tdshistory.html – FlipperPA Oct 21 '20 at 11:22

0 Answers0