SQLCmd error:1416F086:SSL routines.
Applies to: SQL Server on Containers, SQL Server on Linux.
Date created: May 9, 2024.
Problem Description.
Trying to connect to a SQL Server container using SQLCmd we got the following
error:
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server
: SSL Provider: [error:1416F086:SSL
routines:tls_process_server_certificate:certificate verify failed:self signed
certificate].
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Client unable to
establish connection.
Cause.
SQLCmd is unable to validate the server certificate.
Workaround/Solution.
Use the -C option to make SQLCmd implicitly trust the server certificate
without validation. This option is equivalent to the ADO.NET option
TRUSTSERVERCERTIFICATE = true.