Hi,
I have a "ETL framework" built in SSIS. It has been running fine for several year, but when trying to run it on SQL Server 2019 I´m getting into trouble.
Earlier I was using an OLE DB connection manager with the "SQL Server Native Client" (SQLNCLI11.1) provider.
Googling around I found that this one is deprecated and shouldn´t be used together with SQL Server 2019 so I changed to the new "Microsoft OLE DB Driver for SQL Server" (MSOLEDBSQL.1).
First I though that this solved my problem, but I still get random errors so let me explain the problem in depth.
I´ve create a small SSIS project from scratch just to be able to reproduce the problem.
The project consist of 2 packages:
"Sub Package" - Contains one "Execute SQL Task" (just runs simple SQL statement "SELECT 1") using an OLE DB Connection (Project Level Connection Manager).
This OLE DB Connection uses the OLE DB Provider "Microsoft OLE DB Driver for SQL Server" (MSOLEDBSQL.1).
The ConnectionString of the OLE DB Connection is set through an Expression. In this test package the Expression is "hardcoded" as:
"Data Source=my_server_name;Initial Catalog=FrameWorkETL;Provider=MSOLEDBSQL.1;Integrated Security=SSPI;Auto Translate=False;"
"Main Package" - Contain 2 For Loop containers running in parallell. Each loop runs for 1000 laps and each lap it runs an Execute Package Task with "Sub Package".
I´m running the "Main Package" under SQL Server Agent.
Sometimes the package runs fine, but many times I randomly get different error messages.
Example error 1:
Package:Error: 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 Driver for SQL Server"
Hresult: 0x80004005 Description: "Invalid connection string attribute".
Example error 2:
Package:Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server"
Hresult: 0x80040E4D Description: "Invalid authorization specification".
Example Error 3:
Package:Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E73.
An OLE DB record is available. Source: "Microsoft OLE DB Service Components"
Hresult: 0x80040E73 Description: "Format of the initialization string does not conform to the OLE DB specification.".
It is olso common that the package fails with "Unexpected Termination". Then it looks like this in the Event Viewer:
Faulting module name: ntdll.dll, version: 10.0.17763.292, time stamp: 0x7ded7809
Exception code: 0xc0000374
Fault offset: 0x00000000000faf49
Faulting process id: 0x1a18
Faulting application start time: 0x01d62865c4ae326b
Faulting application path: C:\Program Files\Microsoft SQL Server\150\DTS\Binn\ISServerExec.exe
Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
Report Id: 5348cd22-fdea-46aa-a908-5848856a5e53
Faulting package full name:
Faulting package-relative application ID:
Looking in the SSIS internal log table [internal].[event_message_context] I can see that the Connectionstring sometimes get corrupt.
It gets corrupt in different ways which might explain why I get different error messages.
Example of corrupt connectionstring from log table:
Data Source=my_server_name;Initial Catalog=FrameWorkETL;Provider=MSOLEDBSQL.1; (missing the last part of the string).
Data Source=my_server_name;Initial Catalog=FrameWorkETL;Provider= (also missing some part of the string).
Data Source=my_server_name;Initial Catalog=FrameWorkETL;Provider=MSOLEDBSQL.1;Integrated Security=SSPI;Auto Translate=False;MSOLEDBSQL.1;Integrated Security=SSPI;Auto Translate=False; (extra parts added last in the string)
I´ve only been able to reproduce the problem under the following circumstances:
- The Connection Manager uses the OLE DB Provider "Microsoft OLE DB Driver for SQL Server" (MSOLEDBSQL.1) - Might be the same problem with SQLNCLI11.1 provider. The package runs fine if I use for example an ADO.Net Connection Manager with SqlClient Data Provider.
- The Connectionstring of the Connection Manager is set through an Expression. - The package runs fine if the connectionstring is not set through an Expression.
- There are "tasks" running in parallel trying to initialize a database connection. - The package runs fine if the "Main Package" only has one for loop. = No connections are initialized in parallell.
- The package runs on a SQL Server 2019 machine. - The Package runs fine on for example a SQL Server 2017 (even if the connection manager connects to a SQL Server 2019 database).
My environment:
VM with Windows Server 2019 standard
SQL Server 2019 (15.0.4033.1) CU4 (latest CU).
MSOLEDB Provider version 18.3 (latest)
Any help appreciated.
Stefan