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: docs/connect/oledb/major-version-differences.md
+48-49Lines changed: 48 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
1
---
2
-
title: "MSOLEDBSQL major version differences"
2
+
title: "MSOLEDBSQL Major Version Differences"
3
3
description: Learn about breaking changes between OLE DB Driver 19 and version 18, including encryption defaults, property type changes, and migration steps.
4
4
author: David-Engel
5
5
ms.author: davidengel
6
-
ms.date: 01/29/2026
6
+
ms.reviewer: randolphwest
7
+
ms.date: 01/30/2026
7
8
ms.service: sql
8
9
ms.subservice: connectivity
9
10
ms.topic: "reference"
@@ -17,90 +18,88 @@ helpviewer_keywords:
17
18
18
19
This article describes breaking changes between Microsoft OLE DB Driver 19 for SQL Server and earlier versions.
19
20
20
-
> [!TIP]
21
+
> [!TIP]
21
22
> **MSOLEDBSQL19** (Microsoft OLE DB Driver 19 for SQL Server) is the current recommended OLE DB driver. It supports TDS 8.0 and modern security features. Version 19.2.0+ also supports TLS 1.3. Use `Provider=MSOLEDBSQL19` in your connection strings.
| Certificate validation | Skipped when client sets `Encrypt=no`| Always evaluated when encryption occurs |
31
32
| Driver name |`MSOLEDBSQL`|`MSOLEDBSQL19`|
32
33
| CLSID |`MSOLEDBSQL_CLSID` (legacy) |`MSOLEDBSQL_CLSID` (updated in header) |
33
34
34
-
> [!WARNING]
35
-
> **ActiveDirectoryPassword authentication is deprecated.** If you're migrating from version 18 to 19 and using `Authentication=ActiveDirectoryPassword`, plan to migrate to a more secure authentication method. See [Deprecated authentication methods](#deprecated-authentication-methods) for alternatives.
35
+
> [!WARNING]
36
+
> **ActiveDirectoryPassword authentication is deprecated**. If you're migrating from version 18 to 19 and using `Authentication=ActiveDirectoryPassword`, plan to migrate to a more secure authentication method. See [Deprecated authentication methods](#deprecated-authentication-methods) for alternatives.
36
37
37
38
## Encryption property changes
38
39
39
40
### Encrypt property type change
40
41
41
42
The driver property `SSPROP_INIT_ENCRYPT` changes from `VT_BOOL` to `VT_BSTR`.
42
43
43
-
| Connection string | Version 18 values | Version 19 values|
|`Strict`|*(no equivalent)*| TDS 8.0 encryption; requires SQL Server 2022+ |
55
56
56
-
> [!TIP]
57
+
> [!TIP]
57
58
> Starting with version 19.2.0, TDS 8.0 connections can use TLS 1.3 when connecting to SQL Server 2022 or later. The `ServerCertificate` property was also added in this version. For more information, see [TLS 1.3 support](../../relational-databases/security/networking/tls-1-3.md).
58
59
59
-
> [!NOTE]
60
-
> For backward compatibility, version 19 accepts all version 18 values (`yes`/`no`) in addition to the new values (`Optional`/`Mandatory`/`Strict`).
60
+
For backward compatibility, version 19 accepts all version 18 values (`yes`/`no`) in addition to the new values (`Optional`/`Mandatory`/`Strict`).
61
61
62
62
### Default encryption behavior
63
63
64
64
| Version | Default | Result |
65
-
| -------| -------|------ |
65
+
| --- | --- | --- |
66
66
| 18 and earlier |`no`| Connections unencrypted by default |
67
67
| 19+ |`Mandatory`| Connections encrypted by default |
68
68
69
-
To restore version 18 behavior, add one of these to your connection string:
69
+
To restore version 18 behavior, add one of these options to your connection string:
70
70
71
71
- Provider: `Encrypt=Optional;`
72
72
- IDataInitialize: `Use Encryption for Data=Optional;`
73
73
74
74
### Certificate validation behavior
75
75
76
76
| Scenario | Version 18 | Version 19+ |
77
-
| --------| ----------|----------- |
77
+
| --- | --- | --- |
78
78
| Client sets `Encrypt=no`, server doesn't force encryption | No validation | No validation |
79
79
| Client sets `Encrypt=no`, server forces encryption |`Trust Server Certificate`**ignored**|`Trust Server Certificate`**evaluated**|
80
80
| Client sets `Encrypt=yes`|`Trust Server Certificate` evaluated |`Trust Server Certificate` evaluated |
81
81
82
-
> [!IMPORTANT]
83
-
> Version 19 clients using default settings fail to connect when the server forces encryption and uses an untrusted certificate. Update your `Trust Server Certificate` setting or use a trusted certificate.
82
+
#### Compatibility notes
84
83
85
-
> [!NOTE]
86
-
> `TrustServerCertificate` was **not removed** in version 19. The option still works. Version 18 ignored this setting when `Encrypt` was set to `no`, even when the server forced encryption. Version 19 now evaluates `TrustServerCertificate` in all encrypted scenarios.
84
+
Version 19 clients using default settings fail to connect when the server forces encryption and uses an untrusted certificate. Update your `Trust Server Certificate` setting or use a trusted certificate.
87
85
88
-
> [!NOTE]
89
-
> The version 19 driver, before 19.4.1, had an installer issue that could set the `TrustServerCertificate` registry option to `no` on systems that previously had v18 installed. When this occurred, the driver would use the more secure registry setting, which could make connection string options appear to have no effect. This was resolved in version 19.4.1. A fresh installation of v19 (without v18 present) always correctly defaulted the registry option to `yes`. For more information, see [Registry settings](features/registry-settings.md).
86
+
`TrustServerCertificate` was **not removed** in version 19. The option still works. Version 18 ignored this setting when `Encrypt` was set to `no`, even when the server forced encryption. Version 19 now evaluates `TrustServerCertificate` in all encrypted scenarios.
90
87
91
-
> [!TIP]
92
-
> Keyword format differs by interface:
93
-
> - Provider connection strings use no spaces: `TrustServerCertificate=yes;`
94
-
> - IDataInitialize connection strings use spaces: `Trust Server Certificate=yes;`
88
+
The version 19 driver, before 19.4.1, had an installer issue that could set the `TrustServerCertificate` registry option to `no` on systems that previously had v18 installed. When this problem occurred, the driver would use the more secure registry setting, which could make connection string options appear to have no effect. This issue was resolved in version 19.4.1. A fresh installation of v19 (without v18 present) always correctly defaulted the registry option to `yes`. For more information, see [Registry settings](features/registry-settings.md).
95
89
96
-
For more information, see [Encryption and certificate validation](features/encryption-and-certificate-validation.md).
90
+
Keyword format differs by interface:
97
91
98
-
### Registry Force Protocol Encryption
92
+
- Provider connection strings use no spaces: `TrustServerCertificate=yes;`
93
+
- IDataInitialize connection strings use spaces: `Trust Server Certificate=yes;`
94
+
95
+
For more information, see [Encryption and certificate validation in OLE DB](features/encryption-and-certificate-validation.md).
96
+
97
+
### Registry settings for Force Protocol Encryption
99
98
100
99
The **Force Protocol Encryption** registry setting uses numeric values that map to encryption modes:
101
100
102
101
| Registry value | Encryption mode | Description |
103
-
| --------------| ---------------|----------- |
102
+
| --- | --- | --- |
104
103
|`0`|`Optional`| Encryption only if server requires it |
105
104
|`1`|`Mandatory`| Encryption required |
106
105
|`2`|`Strict`| TDS 8.0 encryption |
@@ -112,19 +111,19 @@ The driver uses the most secure option between the registry setting and the conn
112
111
Version 19 supports side-by-side installation with version 18. The driver name includes the major version number for differentiation.
113
112
114
113
| Interface | Version 18 | Version 19 |
115
-
| ---------| ----------|---------- |
114
+
| --- | --- | --- |
116
115
| Provider keyword |`MSOLEDBSQL`|`MSOLEDBSQL19`|
117
116
| CLSID constant |`MSOLEDBSQL_CLSID`|`MSOLEDBSQL_CLSID` (updated in `msoledbsql.h`) |
118
117
| UI display name | Microsoft OLE DB Driver for SQL Server | Microsoft OLE DB Driver 19 for SQL Server |
119
118
120
-
**Migration steps:**
119
+
### Migration steps
121
120
122
121
1. Include the updated `msoledbsql.h` header in your project.
123
122
1. For `IDBInitialize`: No changes needed (CLSID updated in header).
124
123
1. For `IDataInitialize`: Change `Provider=MSOLEDBSQL` to `Provider=MSOLEDBSQL19`.
125
124
1. For UI tools (SSMS, data link properties): Select **Microsoft OLE DB Driver 19 for SQL Server**.
126
125
127
-
**Connection string examples:**
126
+
### Connection string examples
128
127
129
128
Version 18 (before):
130
129
@@ -159,25 +158,25 @@ Version 19 introduces properties for enhanced certificate validation with `Stric
159
158
Specifies the host name to validate against the server's TLS/SSL certificate. Use this property when the server name in the connection string differs from the certificate's Common Name (CN) or Subject Alternative Name (SAN).
160
159
161
160
| Interface | Property |
162
-
| ---------|-------- |
161
+
| --- | --- |
163
162
| Provider keyword |`HostNameInCertificate`|
164
163
| IDataInitialize keyword |`Host Name In Certificate`|
165
164
| OLE DB property |`SSPROP_INIT_HOST_NAME_CERTIFICATE`|
166
165
167
-
> [!NOTE]
166
+
> [!NOTE]
168
167
> This property is ignored when `Trust Server Certificate` is enabled. When `Encrypt=Strict`, the certificate is always validated.
169
168
170
169
### ServerCertificate (v19.2.0+)
171
170
172
171
Specifies the path to a certificate file (PEM, DER, or CER format) for exact certificate matching. The driver compares this certificate against the server's certificate during the TLS handshake.
173
172
174
173
| Interface | Property |
175
-
| ---------|-------- |
174
+
| --- | --- |
176
175
| Provider keyword |`ServerCertificate`|
177
176
| IDataInitialize keyword |`Server Certificate`|
178
177
| OLE DB property |`SSPROP_INIT_SERVER_CERTIFICATE`|
179
178
180
-
> [!IMPORTANT]
179
+
> [!IMPORTANT]
181
180
> `ServerCertificate` can only be used when `Encrypt=Strict`. Attempting to use it with `Mandatory` or `Optional` encryption results in a connection error.
182
181
183
182
## Deprecated authentication methods
@@ -186,18 +185,18 @@ Specifies the path to a certificate file (PEM, DER, or CER format) for exact cer
186
185
187
186
The `ActiveDirectoryPassword` authentication method (Microsoft Entra ID Password authentication) is deprecated. This authentication is based on the [OAuth 2.0 Resource Owner Password Credentials (ROPC) grant](/entra/identity-platform/v2-oauth-ropc), which is incompatible with multifactor authentication (MFA) and poses security risks.
188
187
189
-
> [!WARNING]
188
+
> [!WARNING]
190
189
> Microsoft is moving away from this high-risk authentication flow to protect users from malicious attacks. Plan to migrate to a more secure authentication method before this option is removed. For more information, see [Planning for mandatory multifactor authentication for Azure](/entra/identity/authentication/concept-mandatory-multifactor-authentication).
| Interactive user context | Multifactor authentication |`Authentication=ActiveDirectoryInteractive`|
197
196
| App running on Azure | Managed Identity |`Authentication=ActiveDirectoryMSI`|
198
197
| Service/daemon without user | Service Principal |`Authentication=ActiveDirectoryServicePrincipal`|
199
198
200
-
For more information, see [Using Microsoft Entra ID](features/using-azure-active-directory.md).
199
+
For more information, see [Use Microsoft Entra ID](features/using-azure-active-directory.md).
201
200
202
201
## Troubleshooting
203
202
@@ -240,12 +239,12 @@ For more information, see [Using Microsoft Entra ID](features/using-azure-active
240
239
- Update your connection string from `Provider=MSOLEDBSQL` to `Provider=MSOLEDBSQL19`.
241
240
- Include the updated `msoledbsql.h` header if using `IDBInitialize` with the CLSID.
242
241
243
-
## See also
242
+
## Related content
244
243
245
-
-[OLE DB Driver for SQL Server](oledb-driver-for-sql-server.md)
246
-
-[Using Connection String Keywords with OLE DB Driver](applications/using-connection-string-keywords-with-oledb-driver-for-sql-server.md)
247
-
-[Encryption and certificate validation](features/encryption-and-certificate-validation.md)
248
-
-[Universal Data Link (UDL) Configuration](help-topics/data-link-pages.md)
249
-
-[SQL Server Login Dialog Box (OLE DB)](help-topics/sql-server-login-dialog.md)
250
-
-[Initialization and authorization properties (OLE DB driver)](ole-db-data-source-objects/initialization-and-authorization-properties.md)
244
+
-[Microsoft OLE DB Driver for SQL Server](oledb-driver-for-sql-server.md)
245
+
-[Using connection string keywords with OLE DB Driver for SQL Server](applications/using-connection-string-keywords-with-oledb-driver-for-sql-server.md)
246
+
-[Encryption and certificate validation in OLE DB](features/encryption-and-certificate-validation.md)
247
+
-[Universal Data Link (UDL) configuration](help-topics/data-link-pages.md)
248
+
-[SQL Server Login dialog box (OLE DB)](help-topics/sql-server-login-dialog.md)
249
+
-[Initialization and authorization properties](ole-db-data-source-objects/initialization-and-authorization-properties.md)
0 commit comments