1

I am trying to connect to SQL Server running on Windows from a Redhat machine. I can login to the server through the "SQL Server" account but not from a "Windows Authentication" account. I tried all sorts of tricks - but none worked:

# isql FBI_MS CORP\\Kapilv kapil
# isql FBI_MS 192.168.14.158\\CORP\\Kapilv kapil
# isql FBI_MS 'CORP\Kapilv' kapil

I also googled and came across: https://askubuntu.com/questions/167491/connecting-ms-sql-using-freetds-and-unixodbc-isql-no-default-driver-specified

I have unixODBC drivers but do not have freetds. I should still be able to connect without freetds. Or is it impossible to connect with just unixODBC drivers?

-- I installed freetds as suggested by Benny Hill and followed the configurations - I could still not get it to work.

odbc.ini:

[FBI_MSW]
Description = FBI MS SQL Server database using freetds
Driver = freetds
Database = FBI
ServerName = 192.168.14.158
TDS_Version = 8.0

odbcinst.ini (RedHat installation of freetds does not come with a Set Up file

[freetds]
Description = MS SQL database access with Free TDS
Driver = /usr/local/freetds/lib/libtdsodbc.so
Setup =
TraceFile = /tmp/freetds.log
FileUsage = 1
UsageCount = 1

Now, when I try to connect - I get the following error messages:

[root@localhost sqlncli-11.0.1790.0]# isql -v FBI_MSW CORP\\Kapilv kapil
[S1000][unixODBC][FreeTDS][SQL Server]Unable to connect to data source
[01000][unixODBC][FreeTDS][SQL Server]Unknown host machine name.
[ISQL]ERROR: Could not SQLConnect

I cannot even connect to SQL Server account through freetds (which i could without freetds) - what can i say about Windows Authentication account?

Community
  • 1
  • 1
Kapil Vyas
  • 567
  • 2
  • 7
  • 21

2 Answers2

0

What is the error message you got?

It is better to be sure, if you can reach the MS SQL server, so try: telnet 192.168.14.158 1433 (or the port it is running on)

imanzuk
  • 51
  • 1
  • 5
  • There are no connectivity issues. I can connect to MS SQL server through port 1433 with a SQL-Server account but cannot connect through Windows-authentication. I have enabled both modes of login access in the properties. – Kapil Vyas Dec 11 '12 at 16:11
0

You will need to install FreeTDS.

Look at this question and the answer I submitted there to see configuration examples.

Community
  • 1
  • 1
Benny Hill
  • 5,943
  • 4
  • 36
  • 58