Re: FreeTDS and unixODBC issues on Mac OS X

Vinh Nguyen <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Sat, May 15, 2010 at 7:39 PM, Paul Thurston <[email protected]> wrote:
> Vinh:
>
> Also, osql is finding more than one error in your set-up.
> You'll probably want to correct both of the issues in order to get ODBC up and running.
>
> 1) invalid IP address - this is due to a configuration error in odbc.ini.

So I recompiled both unixODBC and FreeTDS now, specifying "./configure
--with-tdsver=8.0 --with-unixodbc=/usr/local/unixODBC-2.3.0" linking
FreeTDS to unixODBC according to
http://www.unixodbc.org/doc/FreeTDS.html (I didn't do this before).

isql now works, but osql still gives the same 2 errors.  The missing
strings directory is still there for osql, so I manually specified it
with the -I flag:

$ TDSDUMP=stderr osql -I /usr/local -S adrcDSN -U USERNAME -P PASSWORD
"" is NOT a directory, overridden by
"/usr/local".
checking odbc.ini files
        reading /Users/vinh/.odbc.ini
[adrcDSN] found in /Users/vinh/.odbc.ini
found this section:
        [adrcDSN]
        Driver=/usr/local/lib/libtdsodbc.so
        ##Description=adrc
        Trace=No
        ##servername=adrc
        Server=MYIP
        ##Address=MYIP
        Port=1433
        TDS_Version=8.0
        Database=IBADataDictionary
        ## can have above database or not

looking for driver for DSN [adrcDSN] in /Users/vinh/.odbc.ini
  found driver line: "  Driver=/usr/local/lib/libtdsodbc.so"
  driver "/usr/local/lib/libtdsodbc.so" found for [adrcDSN] in .odbc.ini
found driver named "/usr/local/lib/libtdsodbc.so"
/usr/local/lib/libtdsodbc.so is an executable file
"Server=MYIP" found, not using freetds.conf
Server=MYIP is ""
osql: no value found for "Server=MYIP" entry in .odbc.ini

Since isql now works, consider this RESOLVED.  Thanks for your help.

> 2) missing strings directory - looks like a potential build time/installation time issue.
>
> Try adjusting your settings here.
> The "good" osql output should look like the output here:
> http://www.freetds.org/userguide/odbcdiagnose.htm#WITH.UNIXODBC
>
> In the example above, the relationship between freetds.conf and odbc.ini is displayed, which should help you get things set-up.
>
> Best,
>
>
> Paul
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.