You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/sql/database-engine/connect/certificate-chain-not-trusted.md
+40-26Lines changed: 40 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,21 +12,21 @@ ms.custom: sap:Database Connectivity and Authentication
12
12
13
13
This article helps you troubleshoot certificate chain trust errors that occur when you upgrade database applications from SQL Server Native Client 11.0 (SNAC) to Microsoft OLE DB Driver 19 or Microsoft ODBC Driver 18 for SQL Server.
14
14
15
-
When you upgrade from SNAC 11.0 to newer drivers, your applications might fail to connect to SQL Server with certificate chain trust errors. This issue occurs because the newer drivers enable encryption by default and require certification validation, while SNAC disabled it by default. This article explains why these errors occur and provides workarounds to resolve them.
15
+
When you upgrade from SNAC 11.0 to newer drivers, your applications might fail to connect to SQL Server with certificate chain trust errors. This problem happens because the newer drivers enable [encryption](/sql/relational-databases/security/securing-sql-server#encryption-and-certificates) by default and require certificate validation, while SNAC disabled it by default. This article explains why these errors occur and provides solutions to resolve them.
16
16
17
17
## [Upgraded to Microsoft OLE DB Driver 19 for SQL Server](#tab/ole-db-driver-19)
18
18
19
-
After you upgrade from SQL Server Native Client 11.0 (Provider=SQLNCLI11) to Microsoft OLE DB Driver 19 for SQL Server, connection attempts might fail with the following error:
19
+
After you upgrade from SQL Server Native Client 11.0 (Provider=SQLNCLI11) to Microsoft OLE DB Driver 19 for SQL Server, connection attempts might fail with the following error message:
20
20
21
21
> [Microsoft OLE DB Driver 19 for SQL Server]: Client unable to establish connection
22
22
23
23
> [Microsoft OLE DB Driver 19 for SQL Server]: SSL Provider: The certificate chain was issued by an authority that is not trusted.
24
24
25
25
### Cause of certificate chain trust error when upgrading to Microsoft OLE DB Driver 19
26
26
27
-
This error indicates that the client computer is unable to verify the authenticity of the SQL Server certificate because it was issued by a certificate authority (CA) that is not trusted by the client.
27
+
This error indicates that the client computer can't verify the authenticity of the SQL Server certificate because it was issued by a certificate authority (CA) that the client doesn't trust.
28
28
29
-
These errors occur if both the following conditions are true:
29
+
These errors occur if both of the following conditions are true:
30
30
31
31
- The **Force encryption** setting for the SQL Server instance is set to **No**.
32
32
@@ -36,30 +36,39 @@ The error occurs because of a change in the default behavior of the client drive
36
36
37
37
### Solutions for certificate chain trust error when upgrading to Microsoft OLE DB Driver 19
38
38
39
-
-**Solution 1:**Use Microsoft OLE DB Driver for SQL Server 18.x. You can download the driver from [Release notes for the Microsoft OLE DB Driver for SQL Server](/sql/connect/oledb/release-notes-for-oledb-driver-for-sql-server).
39
+
#### Use OLE DB Driver 18.x
40
40
41
-
-**Solution 2:**
42
-
- If the application connection string property already specifies a value of **Yes** or **Mandatory** for the **Encrypt/Use Encryption for Data** setting, change the value to **No** or **Optional**. For example, **Use Encryption for Data=Optional**.
43
-
- If the connection string doesn't specify any value for **Encrypt/Use Encryption for Data**, add **Use Encryption for Data=Optional** to the connection string. For more information, see [Encryption and certificate validation](/sql/connect/oledb/features/encryption-and-certificate-validation).
41
+
Use Microsoft OLE DB Driver for SQL Server 18.x. You can download the driver from [Release notes for the Microsoft OLE DB Driver for SQL Server](/sql/connect/oledb/release-notes-for-oledb-driver-for-sql-server).
44
42
45
-
-**Solution 3:** Add `;TrustServerCertificate=true` to the SQL Server connection string. This change tells the client to trust the certificate without validation.
43
+
#### Disable mandatory encryption for OLE DB
46
44
47
-
> [!NOTE]
48
-
> Currently, MSOLEDBSQL19 prevents the creation of linked servers without encryption and a trusted certificate (a self-signed certificate is insufficient). If you need linked servers, use the existing supported version of MSOLEDBSQL.
45
+
Modify the encryption settings in your connection string:
46
+
47
+
- If the application connection string property already specifies a value of `Yes` or `Mandatory` for the `Encrypt/Use Encryption for Data` setting, change the value to `No` or `Optional`. For example, `Use Encryption for Data=Optional`.
48
+
- If the connection string doesn't specify any value for `Encrypt/Use Encryption for Data`, add `Use Encryption for Data=Optional` to the connection string.
49
+
50
+
For more information, see [Encryption and certificate validation](/sql/connect/oledb/features/encryption-and-certificate-validation).
51
+
52
+
#### Trust the server certificate without validation
53
+
54
+
Add `;TrustServerCertificate=true` to the SQL Server connection string. This setting tells the client to trust the certificate without validation.
55
+
56
+
> [!NOTE]
57
+
> Currently, MSOLEDBSQL19 prevents the creation of linked servers without encryption and a trusted certificate (a self-signed certificate is insufficient). If you need linked servers, use the existing supported version of MSOLEDBSQL.
49
58
50
59
## [Upgraded to Microsoft ODBC Driver 18.*x* for SQL Server](#tab/odbc-driver-18x)
51
60
52
61
After you upgrade from SQL Server Native Client 11.0 (Driver={SQL Server Native Client 11.0}) to Microsoft ODBC Driver 18 for SQL Server (Driver={ODBC Driver 18 for SQL Server}), connection attempts might fail with the following error message:
53
62
54
-
> [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: The certificate chain was issued by an authority that is not trusted.
63
+
> \[Microsoft\]\[ODBC Driver 18 for SQL Server\]SSL Provider: The certificate chain was issued by an authority that is not trusted.
55
64
56
-
> [Microsoft][ODBC Driver 18 for SQL Server]Client unable to establish connection
65
+
> \[Microsoft\]\[ODBC Driver 18 for SQL Server\]Client unable to establish connection
57
66
58
67
### Cause of certificate chain trust error when upgrading to Microsoft ODBC Driver 18
59
68
60
-
This error indicates that the client computer is unable to verify the authenticity of the SQL Server certificate because it was issued by a certificate authority (CA) that is not trusted by the client.
69
+
This error indicates that the client computer can't verify the authenticity of the SQL Server certificate because it was issued by a certificate authority (CA) that the client doesn't trust.
61
70
62
-
These errors occur if both the following conditions are true:
71
+
These errors occur if both of the following conditions are true:
63
72
64
73
- The **Force encryption** setting for the SQL Server instance is set to **No**.
65
74
@@ -69,21 +78,26 @@ The error occurs because of a change in the default behavior of the client drive
69
78
70
79
### Solutions for certificate chain trust error when upgrading to Microsoft ODBC Driver 18
71
80
72
-
-**Solution 1:**Use the Microsoft ODBC Driver 17 for SQL Server. You can download the driver from [Download ODBC Driver for SQL Server](/sql/connect/odbc/download-odbc-driver-for-sql-server).
81
+
#### Use ODBC Driver 17
73
82
74
-
-**Solution 2:**
75
-
- If the application connection string property already specifies a value of **Yes** or **Mandatory** for **Encrypt**, change the value to **No** or **Optional**.
76
-
- If the value isn't already specified, add `Encrypt = Optional;.
77
-
- If you're using a DSN, change the encryption setting from **Mandatory** to **Optional**. For more information, see [DSN and connection string keywords and attributes](/sql/connect/odbc/dsn-connection-string-attribute).
83
+
Use the Microsoft ODBC Driver 17 for SQL Server. You can download the driver from [Download ODBC Driver for SQL Server](/sql/connect/odbc/download-odbc-driver-for-sql-server).
78
84
79
-
---
85
+
#### Disable mandatory encryption for ODBC
80
86
81
-
## See also
87
+
Modify the encryption settings in your connection string or DSN:
82
88
83
-
-[Enable encrypted connections to the Database Engine](/sql/database-engine/configure-windows/enable-encrypted-connections-to-the-database-engine)
89
+
- If the application connection string property already specifies a value of `Yes` or `Mandatory` for `Encrypt`, change the value to `No` or `Optional`.
90
+
- If the value isn't already specified, add `Encrypt=Optional;` to the connection string.
91
+
- If you're using a DSN, change the encryption setting from `Mandatory` to `Optional`.
84
92
85
-
-[The certificate received from the remote server was issued by an untrusted certificate authority error when you connect to SQL Server](../connect/error-message-when-you-connect.md)
93
+
For more information, see [DSN and connection string keywords and attributes](/sql/connect/odbc/dsn-connection-string-attribute).
86
94
87
-
-[Support Policies for SQL Server Native Client](/sql/relational-databases/native-client/applications/support-policies-for-sql-server-native-client)
-[Enable encrypted connections to the Database Engine](/sql/database-engine/configure-windows/enable-encrypted-connections-to-the-database-engine)
100
+
-[The certificate received from the remote server was issued by an untrusted certificate authority error when you connect to SQL Server](error-message-when-you-connect.md)
0 commit comments