0

I am having a lot of issues trying to connect to my mssql server. I have gone through what feels like hundreds of SO threads and articles over the last two days trying to connect these two.

Here's what I can do.

From Ubuntu, I can ping Window MSSQL Server I can successfully telnet 192.168.0.40 1433

I can even successfully connect using tsql -H sqlserver.domain.com.au -p 1433 -U nbar -P nb

No I don't mind you seeing my passwords as they are demo user I created.

I even get data with use database

go

select * from table

But when I try the same using tsql -S Myserver -U nbar -P nb

I get nothing! Only the counter.

Eventually it times out.

Here is my freetds.conf

[MyServer]
        host = sqlserver.domain.com.au
        port = 1443
        tds version = 7.3

For further information my eventual goal is to connect a flask app using pyodbc.

I recently tried to configure my odbc.ini

[MYSERVER]
Description = "My Test Connection"
Driver = FreeTDS
ServerName = MyServer
Server = 192.168.0.40
Port = 1433
Database = databaseName

Any shoving in the right direction would be greatly appreciated. If you think I missed some information let me know and I will add via edits.

Achmann
  • 196
  • 1
  • 11
  • Since you don't mention it, have you defined the driver `FreeTDS` in your odbcinst.ini? [This](http://guywyant.info/log/206/connecting-to-ms-sql-server-from-ubuntu/) looks like a complete guide, although a bit old. – shmee Sep 12 '18 at 06:30
  • Ahh a guide I havn't seen! I hope this is the one! Googlefu may be off – Achmann Sep 12 '18 at 06:50
  • OK claims it can't find the driver, followed this thread which i've being on before https://stackoverflow.com/questions/21237678/how-to-fix-the-unixodbcdriver-managerdata-source-name-not-found-and-no-defa and it still is the same error despite the fact I can see the .so in the folder – Achmann Sep 12 '18 at 07:01
  • Hrm, what is the exact error message when complaining about the driver? Is your freetds compiled to support version 7.3 (should be visible with `tsql -C`)? Do the libs you linked in odbcinst.ini exist and are accessible (possibly needs the 64 bit libs)? – shmee Sep 12 '18 at 07:32
  • Check your `odbcinst.ini` and make sure the path to the driver is correct - the `.so` file should exist at the destination specified in the file. – FlipperPA Sep 15 '18 at 20:10

0 Answers0