2

Im using Debian machine and I was trying to connect to remote sql server, but encounter the error when I try to connect via isql:

root@debian:~/installtest# isql -v SQLServer-Conn
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[37000][unixODBC][FreeTDS][SQL Server]Login failed for user ''.
[ISQL]ERROR: Could not SQLConnect

Here is my odbc.ini

[SQLServer-Conn]
Description=MS SQL connection to remote db
Driver=FreeTDS
Server=10.xx.xx.xx
Port=49xxx
User=username
Password=password
Database=remotedb
Trace=No

Here is my odbcinst.ini

[FreeTDS]
Description = ODBC for SQL Srv
Driver      = /usr/lib/i386-linux-gnu/odbc/libtdsodbc.so
Setup       = /usr/lib/i386-linux-gnu/odbc/libtdsS.so
UsageCount  = 1

The db was fine as I was able to connect using this same machine via tsql command. So i'm not sure if im missing something on the .ini files Thanks for the help

1
  • Were you able to get this to work? If so, can you please update your question with the exact odbc.ini and odbcinst.ini and freetds.conf files you used? As well as the exact connection string? That would be fabulous! Commented Aug 29, 2019 at 21:59

1 Answer 1

2

You need to pass isql a username and password in addition to your DSN.

isql -v SQLServer-Conn username password

Give that a try - good luck!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.