I'm using freetds 0.95 on mac os x (yosemite) to connect to SQL server [want to connect to local db] but all of my attempts have failed so far.
odbcinst -j
on terminal gives me the following:
unixODBC 2.3.2
DRIVERS............: /usr/local/Cellar/unixodbc/2.3.2_1/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/Cellar/unixodbc/2.3.2_1/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/Cellar/unixodbc/2.3.2_1/etc/ODBCDataSources
USER DATA SOURCES..: /Users/user/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
Initially, I want to connect to my local sql server.
Below is an extract of my freetds.conf located at /usr/local/etc/freetds.conf
# A typical Microsoft server
[#egServer70]
# host = ntmachine.domain.com
# port = 1433
# tds version = 7.0
[TITAN]
host = 127.0.0.1
port = 3306
tds version = 8.0
[testing]
host = 127.0.0.1
port = 1433
tds version = 8.0
I have tried to use TDS Version 8.0 but the connection still fails.
When I run either tsql -S TITAN -U root
or tsql -S testing -U root
, I get the following error:
locale is "en_US.UTF-8"
locale charset is "UTF-8"
using default charset "UTF-8"
Error 20002 (severity 9):
Adaptive Server connection failed
There was a problem connecting to the server
Below are:
odbcinst.ini file located at /usr/local/Cellar/unixodbc/2.3.2_1/etc
[FreeTDS]
Description=Open source FreeTDS Driver
Driver=/usr/local/lib/libtdsodbc.so
UsageCount=1
odbc.ini file located at /usr/local/Cellar/unixodbc/2.3.2_1/etc
[testing]
Driver=FreeTDS
Server=localhost
#Port=3306
#charset=UTF8
User=
Password=
#Database=admin
## can specify an actual database to each DSN
TDS_Version=8.0
[Default]
Driver=/usr/local/lib/libtdsodbc.so
I don't really know what I have done wrong so far, maybe I have wrongly installed the odbc on the os, freetds. Please help me sort this out.