Skip to content

Commit e657958

Browse files
committed
final edits
1 parent 9ab09e2 commit e657958

1 file changed

Lines changed: 40 additions & 26 deletions

File tree

support/sql/database-engine/connect/certificate-chain-not-trusted.md

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ ms.custom: sap:Database Connectivity and Authentication
1212

1313
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.
1414

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.
1616

1717
## [Upgraded to Microsoft OLE DB Driver 19 for SQL Server](#tab/ole-db-driver-19)
1818

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:
2020

2121
> [Microsoft OLE DB Driver 19 for SQL Server]: Client unable to establish connection
2222
2323
> [Microsoft OLE DB Driver 19 for SQL Server]: SSL Provider: The certificate chain was issued by an authority that is not trusted.
2424
2525
### Cause of certificate chain trust error when upgrading to Microsoft OLE DB Driver 19
2626

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.
2828

29-
These errors occur if both the following conditions are true:
29+
These errors occur if both of the following conditions are true:
3030

3131
- The **Force encryption** setting for the SQL Server instance is set to **No**.
3232

@@ -36,30 +36,39 @@ The error occurs because of a change in the default behavior of the client drive
3636

3737
### Solutions for certificate chain trust error when upgrading to Microsoft OLE DB Driver 19
3838

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
4040

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).
4442

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
4644

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.
4958
5059
## [Upgraded to Microsoft ODBC Driver 18.*x* for SQL Server](#tab/odbc-driver-18x)
5160

5261
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:
5362

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.
5564
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
5766
5867
### Cause of certificate chain trust error when upgrading to Microsoft ODBC Driver 18
5968

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.
6170

62-
These errors occur if both the following conditions are true:
71+
These errors occur if both of the following conditions are true:
6372

6473
- The **Force encryption** setting for the SQL Server instance is set to **No**.
6574

@@ -69,21 +78,26 @@ The error occurs because of a change in the default behavior of the client drive
6978

7079
### Solutions for certificate chain trust error when upgrading to Microsoft ODBC Driver 18
7180

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
7382

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).
7884

79-
---
85+
#### Disable mandatory encryption for ODBC
8086

81-
## See also
87+
Modify the encryption settings in your connection string or DSN:
8288

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`.
8492

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).
8694

87-
- [Support Policies for SQL Server Native Client](/sql/relational-databases/native-client/applications/support-policies-for-sql-server-native-client)
95+
---
8896

89-
- [SNAC lifecycle explained](https://techcommunity.microsoft.com/t5/sql-server-blog/snac-lifecycle-explained/ba-p/385381)
97+
## Related content
98+
99+
- [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)
101+
- [Certificate validation failure](certificate-validation-failure.md)
102+
- [Support Policies for SQL Server Native Client](/sql/relational-databases/native-client/applications/support-policies-for-sql-server-native-client)
103+
- [SNAC lifecycle explained](https://techcommunity.microsoft.com/t5/sql-server-blog/snac-lifecycle-explained/ba-p/385381)

0 commit comments

Comments
 (0)