Home » Breaking change in the sqlcmd version shipped with SQL Server 2025

Breaking change in the sqlcmd version shipped with SQL Server 2025

by Vlad Drumea
0 comments

This short blog post covers a potentially breaking change that comes with the version of sqlcmd shipped with SQL Server 2025.

Issue

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.

If you have automation relying on sqlcmd, they’ll start failing because of this.

Fixing the certificate chain not trusted error

Ideally, you’d have TLS encryption properly configured with a valid CA-signed certificate.

If that’s not feasible for reasons that are completely up to you and/or your Org., then ad the -C switch to the sqlcmd command.

Example:

  • changing from
  • to
cmd window showing the certificate chain not trusted error breaking change sqlcmd sql server 2025

Conclusion

SQL Server 2025 is still in public preview, but keep this in mind once you start using it when relying on the sqlcmd that gets installed along with it.

You might run into the “certificate chain not trusted” error working with:

You may also like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.