SSIS Package unable to connect DB when disable TLS 1.0

0

I'm using SSIS Package which is developed in 2008, to read a data from text file and load into database. As per microsoft policy, TLS 1.0 no longer supports.

So, we have disabled TLS 1.0 and ran the SSIS Package. It's getting error as follows:

Error: 2020-08-10 22:58:07.45 Code: 0xC0202009 Source: filenameofpackage Connection manager "OLEDBConnection" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "[DBNETLIB][ConnectionOpen (SECCreateCredentials()).]SSL Security error.". End Error

How to solve this issue?

sql-server
ssl
ssis
tls1.2
oledbconnection
asked on Stack Overflow Aug 11, 2020 by Vijayadhiliban • edited Aug 11, 2020 by Dale K

1 Answer

1

SSIS 2008 is based on .net framework 3.5 which means no support for Tls 1.2 out of the box unless you have installed some system updates see this.

Assuming your system had correct updates then you can try below line in script task (Must be very first task in SSIS package) to enable Tls1.2 in .net framework 3.5 code

 // Enable TLS 1.1 and 1.2
System.Net.ServicePointManager.SecurityProtocol = (System.Net.SecurityProtocolType)768                                               | (System.Net.SecurityProtocolType)3072;

// OR -- Enable JUST TLS 1.2
//System.Net.ServicePointManager.SecurityProtocol = (System.Net.SecurityProtocolType)3072;
  1. Drag a Script Task in control flow. Make sure all other tasks comes after this task
  2. Edit script task (Select C# as your language and write above lines in main() method

For more information check this link. Blog post is for SSIS 2012 but same can be applied for 2008

answered on Stack Overflow Aug 14, 2020 by ZappySys

User contributions licensed under CC BY-SA 3.0