SSIS Package error - Illegal operation attempted on a registry key that has been marked for deletion - ssis

We have a package that will be triggered through MVC application by invoking store procedure which creates a execution request for the Package. MVC app is hosted on different server and DB is on different server. This error started occurring after 3 months of Windows Server 2019 migration.
Package executes successfully most of the time, but fails once or twice per day with the following errors. After re-executing the package immediately it succeeds. Error occurs in the below order.
Illegal operation attempted on a registry key that has been marked for deletion
Failed to acquire connection. Connection may not be configured correctly or you may not have the right permissions on this connection.
Upon capturing the "ISServexec.exe" process dump and analyzed through DebugDiag, we came to know the below details.
System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {2206CDB2-19C1-11D1-89E0-00C04FD7A829} failed due to the following error: 800703fa Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA).
System.InvalidOperationException: The .Net Framework Data Providers require Microsoft Data Access Components(MDAC). Please install Microsoft Data Access Components(MDAC) version 2.6 or later.
System.Runtime.InteropServices.COMException: Illegal operation attempted on a registry key that has been marked for deletion.
Microsoft.SqlServer.Dts.Runtime.DtsGenericException: Illegal operation attempted on a registry key that has been marked for deletion.
Note:
Package doesn't have any excel reading operations. Just source table to target table load (both same database).
We have validated the MDAC version in the DB server as 6.3.
App Server: Windows 2019 with .Net framework 4.8 installed.
DB Server: Windows 2019, SQL Server 2019, SSIS v15, .Net framework 4.8.
Package executed using domain service account.
We have triggered the Package through SQL job and Package did not fail at all. Almost 200 executions tested. This failure is random and only fails when store procedure invoked through MVC application.
We have used ProcMon to collect the "ISServexec.exe" logs and only thing we noticed is hive unloaded and no errors.
SQL Profiler didnt even capture the error.
Package is not failing at the same step when this error occurs.
Package logging is configured to write errors in event log, but in event log only "package is failed" information is captured.
Package configured to use Oledb connection type. SQL Native client and MSOLEDB providers are used and error occurs in both the providers.
Package has been upgraded to SQL 2019. Hence we created a new Package in Visual Studio 2019 from scratch and this also fails with same error.
No errors captured in SQL Server extended events.
My Questions:
What are possible ways to validate the service account holds necessary permissions when the above error happens. Is this required ?
Is there any tools that I can use to debug and find the cause of the error or additional information ?
Is this oledb driver issue ?
How to capture any logs at windows server level when package execution happens.
Sorry for the detailed explanation. Any suggestions would be greatly appreciated.

Related

SSIS Package Works in VS but not in SSIS because of ODBC Data Flow Task Error

We have a test package that was designed using VS2017 that has one "Data Flow Task" object with "ODBC Source" and "ODBC Destination" objects within it. The package is simply trying to move records from table 'Table_1' to table 'Table_2' in the same SQL Server 2014 database named 'Test'.
When we execute the package from VS2017, it runs successfully.
However, when we import that package into SSIS, and then run the package directly from there, we get the following error messages (see screen shots below):
The version of ODBC Destination, clsid {51B271F1-3B7E-4875-870E-62A0456FE2AD} is not compatible with this version of the DataFlow.
The version of ODBC Source, clsid {F8600F4A-E321-42F4-AA59-DA00FA374EA5} is not compatible with this version of the DataFlow.
The component is missing, not registered, not upgradeable, or missing required interfaces. The contact information for this component is "ODBC Destination;Connector for Open Database Connectivity (ODBC) by Attunity; Attunity Ltd.; All Rights Reserved; http://www.attunity.com;7".
Any ideas as to what is causing these errors?
Couple side questions / interesting notes:
Why is it referencing Attunity? We are not using the Attunity connectors. We are using ODBC. I don't even have Attunity installed on this machine (I did at one point but uninstalled it).
If you don't use the DataFlow task with the OBDC driver and just use a simple 'Execute SQL Task' object in the package that runs a simple 'INSERT INTO Table_2...' statement, the package runs in SSIS. There is something wrong with using the Data Flow Task.
Screen shots:
Here you can see the package is running successfully in VS2017:
The package was imported into SSIS:
When you run it in SSIS, it fails with the following errors:
Found the answer from other posts.
First, change the TargetServerVersion property for the project to the version of SQL Server you are using for SSIS as explained by the links below and the screen shot shows.
The version of ODBC source is not compatible with this version of the dataflow
SSIS: version of ODBC source is not compatible with this version of the dataflow
After you do that, you may run into an error that states something like the following:
[ODBC Destination [2]] Error: The AcquireConnection method call to the connection manager MyConnectionManager failed with error code 0xC0014009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
If you get that error, change the Run64BitRuntime property to 'True' for the project as explained by the link below and the screen shot shows.
‌https://social.msdn.microsoft.com/Forums/sqlserver/en-US/eb9e6826-b650-433b-bab9-16da214efd99/the-acquireconnection-method-call-to-the-connection-manager-mydatabaseodbc-failed-with-error-code?forum=sqlintegrationservices

Visual Studio Update Wizard MySql

I am running Visual Studio 2010, and attempting to update my Entity Framework project using the Update Wizard. When I attempt to add a single table from the MySql database, the add tab will show the table that I am attempting to add, however when I click finish, I get the following error message.
Unable to generate the model because of the following exception: 'An error occurred while executing the command definition. See the inner exception for details.
Fatal error encountered during command execution.
Fatal error encountered attempting to read the resultset.
Reading from the stream has failed.
Attempted to read past the end of the stream.
I get the same error message if attempt to create the Entity Framework from scratch. In addition, Server Explorer shows that the connection is successful when I test it.
I have also contacted Host Gator who is hosting the database and they where not able to see any issues on their side.
The problem ended up being that our shared server, was not able to handle the Update Request from the Entity Connector Framework and was timing out. Once we moved our database over to a different server we no longer had an issue.

Error code 0x80004005 when executing package as a scheduled job

The error message is:
POSTGRES dm_genders_d failed validation and returned error code
0x80004005.
I've seen several references to this almost assuredly being a permissions issue, which sounds right to me, but I have been completely unable to identify the relevant permissions.
The Postgres connection is using ODBC. The package is moving data from PostgreSQL to SQL Server. Currently both 32bit and 64bit drivers exist, but I haven't seen how to choose between them.
I have made all of the recommended changes to 32 bit for the job.
We are using Windows Authentication.
I've set up a proxy to execute the job as my user.
None of this has alleviated this error.
UPDATE: Yes, the 32 bit data source has been defined, and it is being used.
I had this error and I could solve it by Add ODBC connection in the "system DSN" instead of "User DSN" tab.
Start > ODBC Data Sources
Also I ran package with 32-bit runtime
for this: right click on your job in SQL Server Agent > properties > steps > edit
in the window that appear (Job Step Properties) you can set 32-bit runtime. (below picture)

How to fix the error CPackage::LoadFromXML that causes the package to fail?

I had this package which been running fine since a year or more. All of sudden it has thrown below error. Though on restart it was success. How to debug this issue and prevent from happening again.
Executed as user: xxxxx. Microsoft (R) SQL Server Execute Package Utility Version
10.0.2531.0 for 64-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
Started: 7:15:08 AM Error: 2011-07-07 07:15:08.62 Code: 0xC0010018 Source:
Description: Error loading value "
<DTS:VariableValue xmlns:DTS="www.microsoft.com/SqlServer/Dts"
DTS:DataSubType="ManagedSerializable"
DTS:DataType="13"><SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="htt" from node "DTS:VariableValue".
End Error
Error: 2011-07-07 07:15:08.62 Code: 0xC0010018 Source:
Description: Error loading value
"<DTS:Variable xmlns:DTS="www.microsoft.com/SqlServer/Dts">
<DTS:Property DTS:Name="Expression"></DTS:Property>
<DTS:Property DTS:Name="EvaluateAsExpression">0</DTS:Property>
<DTS:Property DTS:Name="Namespace">User</DTS:Property>
<DTS:Property DTS:Name=" from node "DTS:Variable".
End Error
Could not load package "d:\edw\edw\trunk\src\etlHandler\HDL\DropZoneJobHandler.dtsx"
because of error 0xC0010014.
Description: The package failed to load due to error 0xC0010014 "One or more
error occurred. There should be more specific errors preceding this one that
explains the details of the errors. This message is used as a return value
from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails.
Source: Started: 7:15:08 AM Finished: 7:15:08 AM Elapsed: 0.609 seconds.
The package could not be loaded. The step failed.
I have had this issue on Visual Studio 2015 when creating SSIS Packages.
To resolve it, I changed the TargetServerVersion to SQL Server and that resolved the error.
I was using SSIS package which was upgraded to SSIS 2012, and the SSMS that I was using was 2008. This was the issue that I faced, and I opened the SSMS 2012 and it stopped throwing this error.
I hope this is the case, although with what I have researched, this error could be thrown for various other reasons as well.
For me the error came from a bad password when opening the package. It's strange because usually it just asked me to type in the password again, but since last VS2017 update, the package just fails.
I was getting this 0xC0010014 error when I used a VS 2017 ent build with a dtexec on a server. I set server to SQLServer2014 and the job started to run, but for a while it would throw the 0xC0010014 at the top of the ssis log but still run successfully. I think if you have EncryptSensitiveWithPassword you have to reset the package password after you make the SQLServernnnn change. You have to be aware of what version of dtexec you have on the server, what version the package might have been built in originally (many packages run for years without touching them and may have been built with vs 2015 or vs 2012) and what version of VS you are building with (easier to keep a laptop up to date, maybe you have VS 2017 or VS 2019). You might have a really current Visual Studio to do your builds, but be running in a really old server/dtexec environment.
I have resolved this issue by changing a connection that was referencing to one of my DSN entries that was not created.
After removing the connection, I was able to view the package and then I created a new connection after the new DSN was created.
Please let me know if you need more details and i will provide.
Thanks.
I encountered this error when attempting to schedule an SSIS job to run using SQL Agent. The error came up after I'd selected the package and clicked OK to exit the setup of the step in SQL Agent.
In my environment, I develop SSIS jobs on server A, and schedule jobs in SQL Agent from my local computer. SQL is hosted on server B.
I'm usually able to schedule jobs without error using SSMS on my local computer. However, this particular SSIS package uses the Sharepoint List Adapater, which I'd installed on server A for the SSIS development.
The solution was to install that adapter on my local computer. I also installed it on server B, which hosts our SQL instance.
The solution for this scenario was asking customer change the debug option Run64BitRuntime from True to False. With this Run64BitRuntime=False setting, all works as in 32bit mode. See below link:
https://blogs.msdn.microsoft.com/farukcelik/2010/06/16/why-package-load-error-0xc0010014-in-cpackageloadfromxml-error-appears-while-trying-to-run-an-ssis-package/
I had similar issue when I try to setup Import/Export process on SQL server and save it as SSIS package. I was using excel(.xlxs) as source file.
I resolved it by installing https://www.microsoft.com/en-pk/download/confirmation.aspx?id=4438 (Access 2007 Runtime) on sever).
I created a new project in VS 2019, added a couple tasks and tried to upload and got this error.
Solution: SQL Server was 2012 and the project was set as SQL Server 2017. Changed the project to 2012 saved everything and it worked.
Please take a look at the following link from social.msdn.microsoft.com discussing about a similar error message. Hope that helps.
CPackage::LoadFromXML Failure

SSIS package works with windows account, fails with sqlserver sa account

Having some SSIS permissions issue.
I am calling the SSIS package in my .net console application with:
Package pkg = app.LoadFromSqlServer(packagePath, serverName, serverUsername, serverPassword, dtsEvents);
It is working when manually running it using the windows accout, but fails with the above call in my console application.
Shouldn't it work with the sql server sa account?
There are plenty of reasons for it to fail when run under different account, to avoid trying to fix it blindly, you should get the error information. It looks like you are supplying dtsEvent parameter - so your app should get the error message. Another way to get it to examine package.Error collection after execution, or enable SSIS logging and check the error log.
Once you have the error message, update the post :)
There is also a KB article dedicated to troubleshooting such errors:
http://support.microsoft.com/kb/918760/.
But it just lists lots of possible error causes - to find out your issue, you need to get the error message first.
This generally happens when you have sql queries that use linked server to access a database on a different server.