The error indicates that the TLS certificate presented by SQL Server Express 2017 cannot be validated by the client because the issuing Certificate Authority (CA) is not trusted.
This typically happens in these cases:
- SQL Server is using a certificate from a non‑trusted CA
- The certificate was issued by an internal or self‑signed CA that is not in the client’s Trusted Root Certification Authorities store.
- SQL Server is using its self‑generated certificate and encryption is enforced
- If “Force Encryption” is enabled on SQL Server and it uses a self‑signed certificate, clients must explicitly trust that certificate or its issuer.
To fix it, use one of these supported approaches:
- Install a trusted certificate and CA
- Configure SQL Server Express 2017 with a TLS certificate issued by a CA that is trusted by the client machines (for example, a corporate PKI or a public CA).
- Ensure the issuing CA’s root certificate is present in the client’s Trusted Root Certification Authorities store.
- Trust the existing SQL Server certificate on the client
- Export the current SQL Server TLS certificate.
- Import it into the client’s Trusted Root Certification Authorities (or appropriate) certificate store so the chain becomes trusted.
- Use TrustServerCertificate (less secure)
- In the connection string, set
TrustServerCertificate=trueso the client skips certificate chain validation. This is explicitly described as less secure and should only be used when acceptable by policy.
- In the connection string, set
- Disable forced encryption (insecure)
- If SQL Server has “Force Encryption” enabled, turning it off will avoid the TLS requirement, but this is considered insecure and not recommended.
The recommended and most secure solution is to use a TLS certificate signed with at least SHA‑256 by a CA that the client trusts, and ensure that CA is in the client’s trusted root store.
References: