Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a DSN for ODBC in Linux?

I am digging around in a Linux application that supposedly uses DSNs to connet to SQL Server. The connection stopped working and I can't find the credentials that are being used (all I know is the DSN's name).

I am familiar with DSNs in Windows, but how are they created and where are they stored in Linux?

like image 635
deadprogrammer Avatar asked Dec 30 '08 20:12

deadprogrammer


People also ask

How do I find my DSN in Linux?

For unixODBC, DSNs are listed in /usr/local/etc/odbc. ini . Installed ODBC drivers will be listed in /usr/local/etc/odbcinst. ini .


2 Answers

For unixODBC, DSNs are listed in /usr/local/etc/odbc.ini. Installed ODBC drivers will be listed in /usr/local/etc/odbcinst.ini.

Try:

usr$ find . -iname 'odbc*.ini'
like image 123
initzero Avatar answered Oct 24 '22 01:10

initzero


Simply look for your odbc.ini file. By default it should be under /etc, but I guess it can differ from one Linux flavour to another.

This is a generalized guide for Linux/Unix.

Hope this helps.

like image 11
adilei Avatar answered Oct 24 '22 01:10

adilei