0

I'm attempting to connect to Azure SQL Server 2017 from Debian 8 or 9. Our SQL Server instance is connected to our Active Directory requiring Active Directory Authentication.

Thus far, I've tried connecting using the Microsoft ODBC Driver in conjunction with unixODBC to no avail.

Recent attempts with FreeTDS haven't worked well either. Errors vary but typically result in server timeouts or being unable to connect to the server altogether.

Are there recommended best practices for making this connection with these constraints?

Here is the recommended connection string for the database in question:

Driver={ODBC Driver 13 for SQL Server};Server=tcp:xxxx.windows.net,1433;Database=xxxx;Uid={your_user_name};Pwd={your_password_here};Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;Authentication=ActiveDirectoryPassword

Primarily, I'm unsure about how to configure odbc.ini,odbcinst.ini and freetds.conf to accommodate this connection string.

Details:

  • FreeTDS Version = 7.4
  • FreeTDS Protocol = 1.00.92
  • MS ODBC Driver Version = 13.1
TallTed
  • 9,069
  • 2
  • 22
  • 37
Evan Kaeding
  • 192
  • 1
  • 6
  • [Documentation of Microsoft driver DSN/connect-string keywords](https://learn.microsoft.com/en-us/sql/connect/odbc/dsn-connection-string-attribute?view=sql-server-2017)? [Documentation for troubleshooting Microsoft driver](https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017#troubleshooting-connection-problems)? – TallTed Mar 22 '19 at 22:03
  • With FreeTDS, have you tried connecting with `tsql` from the command line to make sure you have everything right? `TDSVER=7.4 tsql -H servername.database.windows.net -U "DOMAIN\\username" -D databasename -p 1433 -P password` If you're on a domain, you need the double backslash. – FlipperPA Mar 22 '19 at 22:48
  • https://stackoverflow.com/questions/39398646/how-do-i-connect-to-azure-using-unixodbc-and-freetds – Mike Ubezzi Mar 22 '19 at 23:00
  • @FlipperPA Yes, I just tried what you suggested and received the following: `Adaptive Server connection failed` with little else to go on. `Error 20002` – Evan Kaeding Mar 25 '19 at 22:44

0 Answers0