I am having issues setting up ODBC to connect to my Azure SQLServer database.
I had a Petra (16) installation on my laptop that had ODBC setup for this purpose. Recently, I did a fresh install of Mint 17 and upgraded to 17.1 on the same laptop. Then I setup ODBC the same way as I had working on Petra. But this time I got errors. As the ODBC version was an old one, I uninstalled it and installed the latest ODBC pacakge (2.3.2) using ./configure and make install. Re-did all the setups and still same problems.
I have setup below:
- /etc/odbc.ini
/etc/odbcinst.ini
/etc/ODBCDataSources/tds.driver.template
set up below variables in /etc/environment:
Code:
ODBCINI="/etc/odbc.ini"
ODBCSYSINI="/etc"
ODBCINSTINI="odbcini.ini"
When I go to /etc/ODBCDataSources and do
Code:
>>odbcinst -i -d -f tds.driver.template
odbcinst: SQLInstallDriverEx failed with Unable to find component name
During a lot of tinkering yesterday, at some point I was able to run this same command successfully and it did get installed then. But the error has reappeared. However, the driver seems to be installed fine:
Code:
>>odbcinst -q -s
[ms-sql]
Code:
>>odbcinst -j
unixODBC 2.3.2
DRIVERS............: /etc/odbcini.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /etc/odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
BUT
Code:
>>odbcinst -q -d
odbcinst: SQLGetPrivateProfileString failed with Unable to find component name.
I can connect via tsql though:
Code:
>>TDSVER=8.0 tsql -H <server> -U <usr> -D <database> -p 1433 -P <pwd>
locale is "en_IN"
locale charset is "UTF-8"
using default charset "UTF-8"
Default database being set to <...>
1>
But cannot make isql work:
Code:
>>isql -v ms-sql <usr> <pwd>
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
Result: I am not able to connect to this from python using pyodbc.
Any pointers to resolve this will be greatly appreciated!!
Thanks in advance.