Technical Anshu Home › Tutorials › SQL Server Encryption Error
🔐 SQL Server Fix

Fix SQL Server Encryption Error - One Click Solution

SQL Server connects, then refuses the login because it cannot trust the server's certificate. This is not a network problem and your data is not gone - it is a trust problem. Work through the fixes in the order the video shows them: the quick client-side option, the same switch inside an app connection string, and the proper fix on the server itself.

✍️ Technical Anshu🔐 SQL Server🎧 Multi-Language Audio
Fix SQL Server Encryption Error - One Click Solution
🎧 Multi-Language Audio: In the video player, click [Settings] (⚙️) ➔ [Audio track] to select your preferred audio.

📑Chapters

  1. The login error - "The certificate chain was issued by an authority that is not trusted"
  2. What the error really means - encryption is demanded, the server's certificate cannot prove its identity
  3. The quick client fix - Trust server certificate in the SSMS connect window
  4. The same fix inside an application connection string
  5. The proper fix - give the server a real certificate clients trust on their own
  6. Verifying the fix - reconnect the strict way and prove encryption is really on

📋 Overview & Step-by-Step Guide

1

Read the Error - It Is a Trust Problem, Not a Network Problem

Your network is fine and the server is running. The connection reached SQL Server, the server offered an encrypted channel for the login, and your PC refused it because the certificate proving the server's identity is signed by nobody your PC trusts. The full error SSMS shows is:

📌 The error, exactly as SSMS shows it: "A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)"

By default, SQL Server protects the login with a self-signed certificate it creates itself. A self-signed certificate does encrypt the traffic, but it cannot prove the server is really your server, so clients that demand verified encryption reject it. Every honest fix is one of two things: make the client accept this particular server knowingly (Steps 2 and 3), or give the server a certificate clients trust on their own (Step 4).

2

The Quick Client Fix in SSMS - Trust Server Certificate

This is the fast route shown in the video. It changes nothing on the server; it tells this one connection to accept the server's certificate without checking who signed it. In the SSMS Connect to Server window, click Options to open the extra tabs, go to the Connection Properties tab, set encryption to Mandatory (or leave it as offered), tick Trust server certificate, and click Connect. The login goes through straight away.

⚠️ Know what the checkbox switches off: the traffic stays encrypted, but the identity check is skipped - the client would also accept a fake server placed in between. On your own office LAN, for a server you control, this is the accepted day-to-day workaround, and in development and test machines it is a fair trade. Over the internet, or on a production server holding customer data, treat it as a temporary bridge only and finish the job with Step 4. It is a bridge, not the destination.
3

The Same Fix Inside an App Connection String

If an application fails instead of SSMS, the same switch lives in its connection string. Add the two settings explicitly - Encrypt=True turns the protected channel on, and TrustServerCertificate=True is the connection-string spelling of the SSMS checkbox:

Connection String
Server=SQL01;Database=AppDB;User Id=appuser;Password=YourPassword;Encrypt=True;TrustServerCertificate=True;

Use your own server name, database and login in place of the example values. The trade-off is exactly the same as the checkbox in Step 2, with one extra danger: baked into a shipped application's configuration, the skipped check applies to every user, invisibly and permanently. Keep it in development and staging configurations, and in production treat it as borrowed time until the server certificate in Step 4 is in place.

📌 Why apps broke without being rebuilt: recent drivers changed their defaults - Microsoft.Data.SqlClient 5.1 and newer, and ODBC Driver 18, turned Encrypt on by default. Connection strings that never mentioned encryption started demanding it, against servers whose self-signed certificates cannot pass validation. Nothing about your database changed; the contract inside the string did. Writing the settings explicitly means the next driver update cannot change your app's behaviour behind your back.
4

The Proper Fix - Give the Server a Real Certificate

The permanent repair happens once, on the server, and afterwards every client connects strictly with no checkbox and no warning. First get a certificate for the server's full DNS name (for example sql01.company.local) from your internal certificate authority or a public CA, with Server Authentication usage. Import it, with its private key, into the Local Computer certificate store on the SQL Server machine. Then right-click the certificate, choose All Tasks → Manage Private Keys, and grant the SQL Server service account Read permission on the private key. Open SQL Server Configuration Manager, expand SQL Server Network Configuration, right-click Protocols for MSSQLSERVER, choose Properties, and select the certificate on the Certificate tab. On the Flags tab you can also set ForceEncryption to Yes so every client is required to encrypt. Restart the SQL Server service - the change does nothing until you do.

✅ The two traps that cause almost every "it did not work": a certificate whose name does not match the name clients connect by (connect by the server's DNS name, not its IP address), and a service account that cannot read the private key. After the restart, the SQL Server error log should record that the certificate was successfully loaded for encryption - if it complains instead, the private-key permission is the first place to look.
⚠️ About ForceEncryption: setting it to Yes on the server forces encryption for every connection - which is the right end state only once a trusted certificate is installed. Forcing it while the server still carries its self-signed certificate simply makes every strict client fail with this same error, all at once.
5

Verify the Fix the Strict Way

A login that succeeds quietly proves less than people think, because some setting combinations connect without real protection. Prove both halves. First, reconnect from a client the strict way: connect using the server's DNS name - the name inside the certificate - set encryption to Mandatory and leave Trust server certificate unticked. The login should succeed with no warning. Then, in that same session, ask the server whether the connection is actually encrypted by running this query in SSMS:

SQL Query
SELECT session_id, encrypt_option, auth_scheme FROM sys.dm_exec_connections WHERE session_id = @@SPID;

encrypt_option showing TRUE is the passing grade. FALSE with a working login means the connection succeeded by dropping protection, and the job is not done. That passing test is the real finish line: any correctly configured client, including future SSMS versions, now connects with full validation and no special settings.

🏷️Topic Search Variables & Keywords

🔍 SQLServer 🔍 CertificateNotTrusted 🔍 TrustServerCertificate 🔍 SSMS 🔍 ForceEncryption 🔍 TechnicalAnshu 🔍 SQL Server Encryption Error 🔍 Certificate Chain Not Trusted 🔍 Encrypt Connection 🔍 Connection String Fix 🔍 SQL Server Configuration Manager 🔍 SSL Provider Error
🎙️ Full Transcript — tap to expand

Step-by-Step Troubleshooting Guide & Solutions - FIX SQL CERTIFICATE NOT TRUSTED NOW! EASY GUIDE. On-screen demonstration by Technical Anshu.

SQL Server login fails with the certificate chain was issued by an authority that is not trusted error? The one click client fix, the connection string fix, and the proper server certificate fix, in the right order.

(transcript ends here on the source page)

❓ Frequently Asked Questions

Is this tutorial 100% free to follow?

Yes! All guides and methods demonstrated by Technical Anshu use free, legal, and educational resources.

Can beginners follow this guide?

Absolutely! Every step is demonstrated on-screen with detailed instructions so anyone can follow along easily.

Where can I ask questions if I get stuck?

Leave a comment directly on the YouTube video, and our community and Technical Anshu will help you out.

🚀 Watch the Full Tutorial on YouTube

🚀 Watch the full step-by-step video tutorial on YouTube: https://www.youtube.com/watch?v=5skIAEm5d5M

Subscribe to Technical Anshu for IT support, Windows troubleshooting, and server management.

▶️ Watch Full Video
This tutorial is based on Technical Anshu's Fix SQL Server Encryption Error video • Stuck on any step? Ask in the video comments — you will get help there 🙏