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

Viewed 81266

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. 
10 Answers

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 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.

Related