Skip to main content

Microsoft Ole Db Provider For Sql Server Tls 1.2 __link__ -

conn.Open();

using (OleDbConnection conn = new OleDbConnection( "Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDB;Integrated Security=SSPI;"))

6.1 Test Provider Availability Get-ChildItem "HKLM:\SOFTWARE\Classes" -ErrorAction SilentlyContinue | Where-Object $_.PSChildName -like "*MSOLEDBSQL*" 6.2 Capture Network Traffic Use Wireshark or netsh trace to observe TLS handshake: microsoft ole db provider for sql server tls 1.2

Provider=SQLOLEDB;Data Source=sqlserver.contoso.com;Initial Catalog=MyDB;Integrated Security=SSPI; to:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client] "Enabled"=dword:00000001 "DisabledByDefault"=dword:00000000 Before (fails with TLS 1.2 only server): microsoft ole db provider for sql server tls 1.2

Registry keys (reboot required):

Then ensure TLS 1.2 is enabled:

[DBNETLIB][ConnectionOpen (SECDoClientHandshake()).]SSL Security error. [Microsoft OLE DB Provider for SQL Server] Cannot generate SSPI context. The only Microsoft-supported OLE DB provider that fully supports TLS 1.2 (and TLS 1.3 where applicable) is MSOLEDBSQL (Microsoft OLE DB Driver for SQL Server).