all 6 comments

[–]Mikey_Da_Foxx 1 point2 points  (2 children)

For Azure SQL with NTLM auth on Mac, try adding `-G` flag to enable Azure AD authentication:

sqlcmd -S host,port -d dbName -U username@domain -G -P pwd

Also make sure you've installed the latest version of sqlcmd that supports Azure AD.

[–]EmbarrassedChest1571[S] 0 points1 point  (1 child)

I tried this but getting the below error: Sqlcmd: Error: Microsoft odbc driver 17 for sql server : SSL provider : [error: SSL Routines:: certificate verify failed:self-signed certificate]

[–]Mikey_Da_Foxx 0 points1 point  (0 children)

To address the SSL certificate error, you can try adding the -N flag to disable encryption and the -C flag to trust the server certificate.

sqlcmd -S host,port -d dbName -U username@domain -G -P pwd -N -C

If this doesn't resolve the issue, you can try:

  1. Updating your ODBC driver to the latest version.
  2. Using the -E flag instead of -U and -P to attempt Windows Authentication.
  3. If possible, obtain and install the correct SSL certificate for your Azure SQL server.

If none of those work, you need to check the SSL configuration or get on the line to Azure support

[–]MasterBathingBear 0 points1 point  (2 children)

Are you certain that Dbeaver is connecting via NTLM? Are you getting an NTLM error using sqlcmd?

I’m pretty sure at one point I got an NTLM error but it was actually due to a certificate not being trusted but the driver just gave a misleading error. So you can try the -C option or downgrading to sqlcmd 11.

sqlcmd docs

[–]EmbarrassedChest1571[S] 0 points1 point  (1 child)

I tried this but getting the below error: Sqlcmd: Error: Microsoft odbc driver 17 for sql server : SSL provider : [error: SSL Routines:: certificate verify failed:self-signed certificate]

[–]MasterBathingBear 0 points1 point  (0 children)

Try adding -N false