Yoni Mantzur
Yoni Mantzur

Reputation: 42

Migrate from FreeTDS driver to MSODBC17 driver

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?

Upvotes: 0

Views: 388

Answers (0)

Related Questions