Connection string for SqlClient/OLEDB driver like jdbc:jtds driver?

315 Views Asked by At

I am working on .NET6 WebApi project on Ubuntu/Windows and the connection to the SQL Server DB is configured to use windows authentication. On windows I can use this connection string Data Source=DB-Name;Initial Catalog=Cat1;Integrated Security=SSPI. On Linux, we have ruled out using Kerboros for authentication and instead, we want to find a connection string similar to jdbc:jtds:sqlserver://DBName:Port;domain=ABC_XYZ;useNTLMv2=true for java apps. Is this possible using SQL client, ODBC, OLEDB or any other supported clients for .net6? Using the JDBC connection string, I can connect to the desired databases in the Jetbrains Rider.

1

There are 1 best solutions below

3
On

The .Net SqlClient does not support NTLM with provided credentials, there's a tracking issue here. Only Kerberos, SQL Auth, and (for Azure SQL) AAD auth.

JDBC is the only Microsoft driver that supports NTLM on Linux.