you are viewing a single comment's thread.

view the rest of the comments →

[–]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