[freetds] emerge unixODBC freetds

James K. Lowden jklowden at freetds.org
Tue Feb 3 22:21:47 EST 2009

rasiel payumo wrote:
> my odbc.ini is at /etc/unixODBC/odbc.ini 
> i had a feeling that my odbc.ini is not correct also here's what i've
> wrote:
> [alpha]
This is the name you should be trying to connect to.

> Driver          = TDS
There should be a section called [TDS] in your odbcinst.ini that points to

> Description     = puls3 mssql server
> Trace           = Yes
> TraceFile       = /tmp/unixodbc.trace
> Servername      = elk
> Server          =

You can't have both "server" and "servername".  I'm assuming you want an
ODBC-only setup?  If so, delete the servername line.  


> Port            = 1433
> Database        = myTestDB
> UID             = sa
  ^^^ ignored, not a valid odbc.ini attribute.  See the user guide.  
> Language        = us_english

You should add:

TDS_Version = 7.0

> i don't have osql

Well, I did give you links to download the file in an earlier message.  I
don't know why I should repeat them, but here goes:



You'll see "download" links on both pages.  You know what to do.  

For instructions on using osql, please see read osql.txt.  Since you're
new at this, a couple of hints:

1.  The file doesn't need to be "installed".  It's just a shell script,
not very different from (but much better than!) a .BAT file in Windows, if
you're familiar with them.  

2.  Unlike Windows, the current directory is not in the PATH; when you

	$ osql -S alpha -U sa -P passwd

the system looks for "osql" in each directory mentioned in the PATH
environment variable, but *not* in the current directory.  So, to run a
script that's in the current directory, you do this instead:

	$ ./osql -S alpha -U sa -P passwd



More information about the FreeTDS mailing list