[unixODBC-support] basic config questions
Rick Schumeyer
rschumeyer at gmail.com
Fri Mar 27 17:23:56 GMT 2009
I'm trying to (eventually) connect a ruby-on-rails program to SQL
Server. I'm running CentOS 5.2. I installed unixODBC and FreeTDS
from source in the default location (/usr/local).
The FreeTDS part seems to be working. The command "tsql -S eeyoredb
-U xxx -P xxx" is successful.
But I cannot get the unixODBC part to work. I always get
"Data source name not found, and no default driver specified"
I have tried many things suggested by several google searches, but no success.
Can I create the odbc.ini and odbcinst.ini files in /usr/local/etc
using a text editor? Or do I need to use the odbcinst program? (I'm
not really sure what that does)
The current state of my odbc.ini and odbcinst.ini files are below.
Then I try isql:
[rick at buster ~]$ isql -v sqlserver
[IM002][unixODBC][Driver Manager]Data source name not found, and no
default driver specified
[ISQL]ERROR: Could not SQLConnect
I'm really lost.
I checked, and the shared library files are really in /usr/local/lib.
========================================
/usr/local/etc/odbc.ini
========================================
[sqlserver]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
Trace = No
Server = 192.168.1.4
Database = tracker
========================================
/usr/local/etc/odbcinst.ini
========================================
[FreeTDS]
Description = TDS driver (Sybase/MS SQL)
Driver = /usr/local/lib/libtdsodbc.so
Setup = /usr/local/lib/libtdsS.so
FileUsage = 1
========================================
/usr/local/etc/freetds.conf
========================================
[global]
# TDS protocol version
; tds version = 4.2
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
# A typical Microsoft server
[eeyoredb]
host = eeyore
port = 1433
tds version = 8.0
==================================================
More information about the unixODBC-support
mailing list