[unixODBC-support] System DSN does not work, but User DSN does

Paul MacDougall paul at medallia.com
Sun Oct 15 04:08:35 BST 2006

I cannot get System DSNs working with my installation, however I have
found that user DSNs work fine.

Through various tests I found just linking the system odbc.ini to
~/.odbc.ini "solves" the problem.  This is not an acceptable solution.

Copying the file works too, of course.  And if I change the user DSN
name only it will work, the system one will still not work (just to
prove that it is the user DSN working and not the system).

Has anyone else experienced this?  Any solutions, or ideas?

Here's some anonymized output for info purposes showing that the system
dsn does not work, then making a symlink makes thinks work:

Script started on Sat 14 Oct 2006 09:47:35 PM PDT
~#odbcinst -j
unixODBC 2.2.12
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
USER DATA SOURCES..: /home/paul/.odbc.ini
~#cat /usr/local/etc/odbcinst.ini
Description             = v0.64 with protocol v8.0
Driver          = /usr/local/lib/libtdsodbc.so
UsageCount              = 1

~#cat /usr/local/etc/odbc.ini
Driver          = FreeTDS
Description             = database
Trace           = No
Server          =
Port            = 1433
Database                = master

~#cat /home/paul/.odbc.ini
~#isql -v DB user pass
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[ISQL]ERROR: Could not SQLConnect
~#ln -sf /usr/local/etc/odbc.ini /home/paul/.odbc.ini
~#ls -l /home/paul/.odbc.ini
lrwxrwxrwx  1 paul paul 23 Oct 14 21:48 /home/paul/.odbc.ini ->
~#isql -v DB user pass
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
SQL> quit

Script done on Sat 14 Oct 2006 09:48:48 PM PDT

More information about the unixODBC-support mailing list