[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: setup ODBC data source

> I am trying to connect MSSQL from debian system. The 
> reference which I was following, used Redhat's ODBCConfig. 
> As that is not available on Debian, so I could not succeed 
> there. Which is the equivalent to ODBCConfig in Deabin?
> I have file /etc/odbc.ini which has at its end:
> Name: MSSQLServer
> Description: TDS MSSQL (description isn't important)
> Servername:
> UID: sa
> PWD:
> Port: 1433

That's strange, it's a different syntax from mine.  My odbc.ini looks like:

Driver  	= TDS
Description     = SDWA data whse, LatestQuarter database
Servername      = SDW
Database        = LatestQuarter

But that may depend on your version of ODBC.  Check your logs or output for
syntax errors, but if you haven't seen any it's probably OK.

> and file /etc/odbcinst.ini which has at its end:
>      [TDS]
>      Description = FreeTDS ODBC Driver
>      Driver              = /usr/lib/libtdsodbc.so
>      Setup: /usr/lib/libtdsS.so
>      FileUsage   = 1

Looks okay.

> File /usr/local/etc/freetds.conf has at its end:
> [TDS]
>          host =
>          port = 1433
>          tds version = 7.0

I think this is wrong.  In place of TDS, you should have the value of the
Servername field from odbc.ini.  So instead of [TDS] you should have
[].  For example, my freetds.conf that goes with the odbc.ini
above looks like

	host = xx.xx.xx.xx
	port = 1433
	tds version = 8.0

Note that the Servername (SDW in my case) is a logical name; it doesn't have
to be the server's IP address.

Good luck,

Reply to: