Microsoft Ole Db Provider For Sql Server Tls 1.2 ^new^ -

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

conn.Open();

Set conn = Server.CreateObject("ADODB.Connection") conn.Open "Provider=SQLOLEDB;Data Source=myServer;Initial Catalog=myDB;Integrated Security=SSPI;" microsoft ole db provider for sql server tls 1.2

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

Then ensure TLS 1.2 is enabled:

[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):

[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):