I’ve tried several different config options based on this page (http://enlook.wordpress.com/2013/05/02/error-sql-error-unixodbcdriver-managerdata-source-name-not-found-and-no-default-driver-specified/#comment-2783)
And a very similar post here at Connecting MS SQL using freetds and unixodbc: isql - no default driver specified however when I try to test the connection with isql I continue to get “[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect”.
I am running Ubuntu 12.04 LTS server and installed freeTDS via apt-get.
results of odbcinst -q -d:
@cabana:/etc# odbcinst -q -d
[TDSDRIVER]
results of odbcinst -q- s
@cabana:/etc# odbcinst -q -s
[MSSQL]
[SQL01]
tds.driver.template:
@cabana:/etc# cat tds.driver.template
[TDSDRIVER]
Description = FreeTDS driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
FileUsage = 1
UsageCount =1
tds.datasource.template:
@cabana:/etc# cat tds.datasource.template
[SQL01]
Driver = TDSDRIVER # name that we specified in the driver file
Description = MSSQL ODBC Driver
Trace = No
TraceFile = /var/log/freetds.log
Server = 10.0.0.200 # this name specified in the freetds.conf
Port = 1433
Database = MyDatabase
TDS_Version = 8.0
freetds.conf:
@cabana:/etc# cat freetds.conf
[global]
tds version = 8.0
[MICROSOFT]
host = 10.0.0.200
port = 1433
tds version = 8.0
odbc.ini:
@cabana:/etc# cat odbc.ini
[MSSQL]
Driver = FreeTDS # name that we specified in the driver file
Description = MSSQL ODBC Driver
Trace = No
TraceFile = /var/log/freetds.log
Servername = 10.0.0.200 # this name specified in the freetds.conf
Port = 1433
Database = MyDatabase
TDS_Version = 7.0
[SQL01]
Driver = TDSDRIVER # name that we specified in the driver file
Description = MSSQL ODBC Driver
Trace = No
TraceFile = /var/log/freetds.log
Server = 10.0.0.200 # this name specified in the freetds.conf
Port = 1433
Database = MyDatabase
TDS_Version = 8.0
odbcinst.ini:
@cabana:/etc# cat odbcinst.ini
[TDSDRIVER]
Description = FreeTDS driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so
FileUsage = 1
UsageCount = 2
tsql is not installed so testing with isql I get this:
@cabana:/etc# isql -v SQL01 user pass
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect
What am I doing wrong?