I have my freetds.conf
set up thusly. Notice that I specifically have set up the database as myawesomedb:
[EXAMPLE_CONF]
driver = /usr/lib64/libtdsodbc.so
host = example.org
database = myawesomedb
port = 5150
tds version = 8.0
;client charset = UTF-8
Similarly, I've set up the odbc.ini
like so:
[EXAMPLE_CONF]
Description = SQL Server 2005
Driver = FreeTDS
Database = myawesomedb
Servername = EXAMPLE_CONF
TDS_Version = 8.0
However when I connect using tsql, it seems to ignore that I've set the database:
$ tsql -S EXAMPLE_CONF -U jordan
locale is "en_US.UTF-8"
locale charset is "UTF-8"
Password:
1> select db_name()
2> go
master
This is what I want to happen:
$ tsql -S EXAMPLE_CONF -U jordan
locale is "en_US.UTF-8"
locale charset is "UTF-8"
Password:
1> select db_name()
2> go
myawesomedb
I assume I'm just missing something in the configuration?
Here is the relevant version info:
FreeTDS version: 0.64 release: 11.el5.centos
unixODBC: version: 2.2.11 release: 7.1
0 Answers