Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.