freeTDS not using its config
I spent a long time today debugging a similar problem. I had set "TDS version" in freetds.conf but it was not being used in my ODBC connection. After reading the freetds source code (connectparams.c:odbc_parse_connect_string) I discovered that:
- If your connection string uses "SERVER=" then both freetds.conf and odbc.ini are ignored
- If your connection string uses "SERVERNAME=" then the settings in the appropriate freetds.conf server are used
- If your connection string uses "DSN=" then the settings in the appropriate odbc.ini DSN are used
odbcinst.ini is a red herring. FreeTDS never checks that for settings.
The settings you specify in the connection string are always respected. It also always respects the environment variables like TDSVER.
freetds not recognizing version from any config files
You're running FreeTDS v0.91 which does not support TDS version 7.4. IIRC the highest it supports is 7.2. Trying using version 7.2.
If you want to use TDS version 7.3, you'll need at least FreeTDS 0.95, and if you want 7.4, you'll need FreeTDS 1.0.
I have a PR to clarify this, but it hasn't been pushed out to the documentation.
Good luck!
tsql utility (FreeTDS) can connect to SQL Server but pymssql cannot
I find a clue and I'm quite surprised byt it... If I use a username
with less than 32 characters, I have no more issue with pymssql
! I didn't find anything about this weird bug (?) but I promess it fixes my issue.
I need to see the code of pymssql
and see if I find any lenght restriction or issue about the lenght of the username
Related Topics
SQL Switch/Case in 'Where' Clause
SQL - If Exists Update Else Insert Into
How to Store Only Time; Not Date and Time
Why Does MySQL Report a Syntax Error on Full Outer Join
Oracle SQL - How to Retrieve Highest 5 Values of a Column
MySQL: View With Subquery in the from Clause Limitation
SQL Selecting from Two Tables With Inner Join and Limit
Default Row Order in Select Query - SQL Server 2008 VS SQL 2012
How to Change the Character Set (And Collation) Throughout a Database
Ms Access Query: Concatenating Rows Through a Query
How to Get Script of SQL Server Data
MySQL, Better to Insert Null or Empty String
Is There Any Boolean Type in Oracle Databases
How to Insert Datetime Value into a SQLite Database