'Is sqloledb actually using MSOLEDBSQL on Windows Server 2019

A legacy piece of software using the provider "sqloledb.1" via the OleDbConnection Class (System.Data.OleDb.dll) is still working on Windows Server 2019 with TLS1.2. Whereas on Server 2016 or 2012 R2 with TSL1.2 it is not?

Windows Server 2016 gets the following error, which is expected as it is using the sqloledb which doesn't support TLS1.2. This is well known as seen here.

[DBNETLIB][ConnectionOpen (SECCreateCredentials()).]SSL Security error.

Windows Server 2019 works and I do not know why. Is it struggling to find the sqloledb and defaulting to the new driver (MSOLEDBSQL) that supports TLS1.2?

All servers have the same version of the Microsoft OLE DB Driver for SQL Server installed, 18.5.

Tried different versions of SQL server, 2017 and 2019.

Update

sqloledb.dll properties showing the version information

Server 2019

sqloledb Server 2019

Server 2016

enter image description here



Solution 1:[1]

SQL Server OLEDB Providers

OLEDB Provider Available with Minimum SQL Server TLS Installed with
SQLOLEDB Windows 2000 SQL Server 7 (70) TLS 1.0 Windows
SQLNCLI SQL Server 2005 SQL Server 7 (70) Yes Manually
SQLNCLI10 SQL Server 2008 SQL Server 2000 (80) Yes Manually
SQLNCLI11 SQL Server 2012 SQL Server 2005 (90) Yes Manually
MSOLEDBSQL SQL Server 2016 SQL Server 2005 (90) Yes Manually

Famously, the SQL Server driver that comes with Windows does not support anything above TLS 1.0. But i like David Browne's answer, where he hints that TLS 1.2 support is coming to Windows 10.

Solution 2:[2]

As far as I could read in the Internet the native client is faster than the MSOLEDBSQL driver when working with ADO as OleDB is a different layer in between.

Solution 3:[3]

vec <- c(0, 1, 1, 0)
endvec <- c(5, 10, 15) # or seq(5, 15, by = 5) or something else
lapply(endvec, function(a) c(vec, a))
# [[1]]
# [1] 0 1 1 0 5
# [[2]]
# [1]  0  1  1  0 10
# [[3]]
# [1]  0  1  1  0 15

or more briefly:

Map(c, list(vec), endvec)
# [[1]]
# [1] 0 1 1 0 5
# [[2]]
# [1]  0  1  1  0 10
# [[3]]
# [1]  0  1  1  0 15

Solution 4:[4]

Here's one way to do it with map from the purrr package resulting in a list object holding each of the vectors. This assumes n is the maximum number you want to reach for the last element.

n <- 1000
base_vec <- c(0, 1, 1, 0)
vec_list <- map(seq(5, n, by=5), ~c(base_vec, ..1))

Sample output:

> vec_list[[1]]
[1] 0 1 1 0 5
> vec_list[[2]]
[1]  0  1  1  0 10
> vec_list[[3]]
[1]  0  1  1  0 15

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ian Boyd
Solution 2 Limux
Solution 3 r2evans
Solution 4 geoff