Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8994101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:20:53+00:00 2026-06-15T23:20:53+00:00

odbc isql was unable to connect to data source: $ isql SMS_GTWY username password

  • 0

odbc isql was unable to connect to data source:

 $ isql SMS_GTWY username password -v

returns:

 [S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
 [01000][unixODBC][FreeTDS][SQL Server]Unknown host machine name.
 [ISQL]ERROR: Could not SQLConnect

while tsql is ok:

 $ tsql -S SERVER001 -U username -P password

returns:

 locale is "C/UTF-8/C/C/C/C"
 locale charset is "UTF-8"
 using default charset "UTF8"
 1> 

$ cat ~/.freetds.conf:

 [SERVER001]
   host = 192.168.8.101
   port = 1433
   tds version = 8.0
   client charset = UTF8

$ cat ~/.odbc.ini:

  [SMS_GTWY]
  Description = SERVER001 Server
  Driver      = freetds
  Database    = SMS_GTWY
  ServerName  = SERVER001
  TDS_Version = 7.1

$ cat ~/.odbcinst.ini:

  [freetds]
  Description = MS SQL database access with FreeTDS
  Driver      = /usr/local/lib/libtdsodbc.so
  Setup       = /usr/local/lib/libtdsodbc.so
  UsageCount  = 1

freetds and unixODBC are install by homebrew.

I have a similar setup on CentOS and odbc isql to mssqlserver is working fine. There is a noticable difference, I do not see a libtdsS.so installed on OS X.

# cat /etc/odbcinst.ini on CentOS:

 [freetds]
 Description = MS SQL database access with FreeTDS
 Driver      = /usr/lib/libtdsodbc.so
 Setup       = /usr/lib/libtdsS.so 
 UsageCount  = 1

Is that the cause of problem?

p.s. $ odbcinst -j returns:

 unixODBC 2.3.1
 DRIVERS............: /usr/local/Cellar/unixodbc/2.3.1/etc/odbcinst.ini
 SYSTEM DATA SOURCES: /usr/local/Cellar/unixodbc/2.3.1/etc/odbc.ini
 FILE DATA SOURCES..: /usr/local/Cellar/unixodbc/2.3.1/etc/ODBCDataSources
 USER DATA SOURCES..: /Users/horace/.odbc.ini
 SQLULEN Size.......: 8
 SQLLEN Size........: 8
 SQLSETPOSIROW Size.: 8

$ odbcinst -q -d returns:

 [freetds]

$ odbcinst -q -s returns:

 [SMS_GTWY]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:20:54+00:00Added an answer on June 15, 2026 at 11:20 pm

    isql works after reinstall unixodbc and freetds ( --with-unixodbc ):

     brew uninstall freetds
     brew uninstall unixodbc
    
     brew install unixodbc
     brew install freetds --with-unixodbc
    

    Now, $ isql -v SMS_GTWY username password returns:

    +---------------------------------------+
    | Connected!                            |
    |                                       |
    | sql-statement                         |
    | help [tablename]                      |
    | quit                                  |
    |                                       |
    +---------------------------------------+
    SQL> 
    

    Credit: https://gist.github.com/565440

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do I get a database from ODBC data source to SQL Server 2005?
I am using C++ ODBC to connect to a local SQL Server. Once I
I'm trying to use Perl ODBC to connect to a Microsoft SQL server. My
I am using the ODBC extension in PHP to connect to an SQL 2000
I configured mysql ODBC connector in ODBC Data Source Configuration => test connection is
I have a pdo connection with ODBC (v2000.86.359.00) connecting to an SQL Server (v8.00.2039
How does the ODBC driver transfer data between an application to MSSQL Server 2005?
I have to connect to a MSSQL server from Arch Linux with ODBC. I
I'm using ODBC (Win32) to connect to our Pervasive SQL database. I have post
Driver={MySQL ODBC 5.1 Driver};Server=192.168.1.103;Database=mysql;User=root; Password=;Option=3; It works just fine when use localhost or 127.0.0.1,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.