[unixODBC-support] How to Configure a Freetds Datasource to connect to a High Availability Server

Funny,Solomon Solomon.Funny at fhlbny.com
Wed Dec 7 17:52:31 GMT 2016

Good Morning,

My company is using a High Availability clustered SQL Server environment.

I am trying to create an Freetds ODBC datasource which will connect to the primary server, using the listener name.

I can connect using tsql, but when I try to connect using isql, I fail to connect:

isql -v  agl-entdbd5 sql005 iam2#nice
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect

I did notice on one server there is a file called ODBCDataSources which exists on one server and not on the server where I am having difficulty connecting from (lx-had16).

Any advice will be appreciated!!!

odbc.ini, odbcinst.ini, freetds.conf installed in /etc

lx-had16:funnys:/etc> odbcinst -j
unixODBC 2.2.14
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
USER DATA SOURCES..: /etc/odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8

Below is the configuration:


Driver                     = FreeTDS
Description          = Connect to SQL Server using  FreeTDS Driver
Servername        = NTS-ENTDBD1
Database              = prod01

# ENTDBD5 is the datasource name
Driver                  = FreeTDS
Description        = Connect to SQL Server using  FreeTDS Driver
Servername      = agl-entdbd5
Database            = prod01


Description = Microsoft SQL Server Access with FreeTDS
Driver = /usr/lib64/libtdsodbc.so.0


# NTS-ENTDBD1\DELTA ==> SQL Server Instance
   host = NTS-ENTDBD1
   instance = DELTA
   tds_version = 7.0

# agl-entdbd5 ==> SQL Server Instance
# agl-entdbd5 is the listener name that will connect to the primary replica
       host = agl-entdbd5
       instance = MSSQLSERVER  ===> No named instances on agl-entdbd5, using default instance name
       tds_version = 7.0

Confidentiality Notice: The information contained in this e-mail and any attachments (including, but not limited to, any attached e-mails) may be legally privileged and confidential. If you are not an intended recipient, you are hereby notified that any dissemination, distribution or copying of this e-mail is strictly prohibited. If you have received this e-mail in error, please notify the sender and permanently delete the e-mail and any attachments immediately. You should not retain, copy or use this e-mail or any attachment for any purpose, nor disclose all or any part of the contents to any other person.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20161207/8a1b2d79/attachment.html>

More information about the unixODBC-support mailing list