1.2: Microsoft Ole Db Provider For Sql Server Tls
Then ensure TLS 1.2 is enabled:
using (OleDbConnection conn = new OleDbConnection( "Provider=MSOLEDBSQL;Data Source=myServer;Initial Catalog=myDB;Integrated Security=SSPI;")) microsoft ole db provider for sql server tls 1.2
conn.Open();
[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): Then ensure TLS 1
[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). microsoft ole db provider for sql server tls 1.2
Registry keys (reboot required):
Provider=SQLOLEDB;Data Source=sqlserver.contoso.com;Initial Catalog=MyDB;Integrated Security=SSPI; to: