Vlad Drumea points out a new thing to keep an eye on:
SQL Server 2025 provides ODBC sqlcmd version 17 which enforces an encrypted connection.
If you’re trying to use it to connect to instances that don’t have a CA-signed certificate or where TLS encryption was never properly configured, sqlcmd will throw the famous “certificate chain not trusted” error message:
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : SSL Provider: The certificate chain was issued by an authority that is not trusted.
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Client unable to establish connection.
The proper answer to this is to get trusted certificates. The workaround is what Vlad describes, so click through for that.
Leave a Comment