Shrikant
Shrikant

Reputation: 21

isql exception unixODBC data source name not found

I am trying to connect my php application with SQL server in my Linux box. I installed unixODBC successfully and made required changes in odbc.ini and odbcinst.ini file.

When I run command.<br><b>sqlcmd -S DSN -U USERNAME -P Password</b>

I am able to connect to sql server, but when I tried to connect with same DSN using isql (isql -v DSN USERNAME PASSWORD)<br> I am gating Data source name not found exception.

content of my odbc.ini file is

[SPSQLDEV]
Driver = ODBC Driver 11 for SQL SERVER
server = *.com,portno
Database = TEST

content of odbcinst.ini is


[SQL SERVER Native Client 11.0]
Driver = /opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0
Threading = 1
Output of command odbcinst -q -d is.
SQL Server Native Client 11.0
out put of command odbcinst -q -s is
SPSQLDEV

Upvotes: 0

Views: 1712

Answers (1)

ram mil
ram mil

Reputation: 81

On MacOS put your odbc.ini on /usr/local/etc/odbc.ini then run your isql command

Upvotes: 0

Related Questions