SSIS Error: Failed to decrypt protected XML node - ssis

I am taking over the development of an SSIS package and the original author is no longer around. I need to make some edits to the package, but I get some errors:
Error loading Package.dtsx: Failed to decrypt protected XML node "DTS:Property" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.
Upon some pages in the interwebs, I found that you can change the ProtectionLevel property to 'Don't Save Sensitive'. According to MS documentation, it just doesn't save the sensitive info. From looking at the package code, the error is throwing because of one of the HTTPConnection stores a password.
DTS:ServerURL="https://servicewebaddress/ExportService.asmx">
<DTS:Property
DTS:Name="ServerPassword"
Sensitive="1"
Encrypted="1">sdfsdfsdf</DTS:Property>
<DTS:Property
DTS:Name="ProxyPassword"
Sensitive="1"
Encrypted="1">kldkjlkjlkjl</DTS:Property>
</DTS:HttpConnection>
What are my options? If I change ProtectionLevel property to 'Don't Save Sensitive', what would I need? What is ServerPassword/ProxyPassword? Can someone explain what those properties mean?
UPDATE: I am running Integration Services 11 on the server I am running. I will deploy by package.

You need to refresh the Package Encryption by doing the following:
Change the ProtectionLevel property of the offending package to 'Don't Save Sensitive'.
Save & Close the Package.
Reopen the package and verify that the error has disappeared.
Now restore the package ProtectionLevel property to 'EncryptSensitiveWithUserKey'. (This will restore the encryption of the sensitive data using your User Key).
Repeat Steps 2 and 3.

Related

Unable to cast COM object of type 'System._COMObject' to interface type

I have 3 SSIS packages. Two out of the 3 SSIS packages work perfectly, the third. Which is a copy of the 2nd one, except changing connection strings keeps throwing the problem:
Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSObject100'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D4E5AF42-7999-473C-8082-6EFC676953C4}' failed due to the following error: The application called an interface that was marshalled for a different thread. (Exception from HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)).
It has been doing this ever since I copied the package over. I have followed through online guides and run the regsvr32 dts.dll and this said it was successful but nothing has changed. I still get the error, why is this?
The SSIS package seems to validate my containers, it takes a long time to do this compared to the other two and then fails later on in the validation throwing the above error message.
You can't just copy the package, but you need additionally to change the name and generate new GUID (which identifies the COM object) for this package. Check this MSDN article for more info.
Here is the workaround: Solution Explorer -> right click project ->properties->debugging->Run64bitRuntime->set to false.
I hope it helps others. The solution worked for me:
I registered the assembly using the gacutil.exe. My SSIS project target server version was SQL 2012. So, I was using the DTSPipelineWrap.dll version 11.0. I opened the "Developer Command Prompt for VS2015" in Administrator mode, then typed the following command: C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe /i "C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.DTSPipelineWrap.dll"
Then from my SSIS script task, References--> I removed the existing DTSPipelineWrap which was using the assembly from the location "C:\Program Files (x86)\Microsoft SQL Server\120\SDK\Assemblies\Microsoft.SqlServer.DTSPipelineWrap.dll". Then in the References folder, right click-->Add Reference-->Browse find the assembly from the location "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.SqlServer.DTSPipelineWrap\v4.0_11.0.0.0__89845dcd8080cc91\Microsoft.SQLServer.DTSPipelineWrap.dll"
Click Ok. Rebuild the code and executed the package. It has worked for me.
In my case this is was a validation overload/timeout, the package contained references to hundreds of tables.
Opening the offending data flow forced re-validation and cleared the error.
Project --> Properties --> Configuration Properties --> Debugging
and then change Run64BitRuntime to False under Debug Options
In case this might help someone: I got this error due to timeout issues caused by a poorly optimised query. There was nothing inherently wrong with the SSIS package and it ran fine once i fixed the problem in the DB Source.

DTExec: The package execution returned DTSER_FAILURE (1) in SSIS package execution

I've got this question within a project in ssis. I had to divide the original project into different packages because this was to big and sometimes it could provoke some problems with the memory.
So, in order to link the different packages I'm using the "Execute Package Task" to refer one to each other.
If I execute the package directly from SSIS it works perfect, there's not problem.
But if I use a scheduler to program the time of execution I'm getting this error message:
Error: 2015-09-22 14:54:37.98 Code: 0xC00220E6 Source: Execute Package
Task Description: There is no project to reference. End Error Error:
2015-09-22 14:54:37.99 Code: 0xC0024107 Source: Execute Package Task
Description: There were errors during task validation. End Error
DTExec: The package execution returned DTSER_FAILURE (1).
I wonder what can be happening with the project and its execution.
Regards
I'm not sure what scheduler you are using, or how it's configured, but you can debug your way through this by simulating the scheduler with DTExec. It sounds like you've crossed your Setup and Execution Method (see below for those definitions).
Here's the summary.
Option 1: For the Setup, use Project References and for the Execution Method, use Project/Package.
Option 2: For the Setup, for each child package, use External References and for Execution Method, use File.
(It sounds like you're using a combination of Project References and File, which in turn sends the There is no project to reference error off of the child packages.)
Option 1
Setup
Open your parent package in SSDT, and then double click a child package. It should look like this:
Execution Method
This setting means you need to execute the package via the Project/Package method via DTExec. So build your project - this generates an ispac file. And to execute via dtexec, it would look like:
dtexec /Proj Path\To\MyProject.ispac /Pack Path\To\The\ParentPackage.dtsx
Note: If you specify the dtsproj file instead of the ispac file in the /Proj parameter, you will receive a File contains corrupted data error!
Option 2
Setup
Open your parent package in SSDT, and then double click a child package. Change it to look like this:
This is done by
1. Changing the Reference Type to External Reference
2. Changing the Location to File system (SQL Server is another option)
3. Select <New connection...> to create a new file connection for the child package to run (or a SQL server connection)
Execution Method
This setting means you can now use the File method, which is likely the way you're attempting to execute the package.
dtexec /f Path\To\My\ParentPackage.dtsx

Error thrown by SSIS package : The input Web Services Description Language (WSDL) file is not valid

Im trying to connect to a web service using Web Service task. I have used the WsdlFile property to dynamically set the path of WSDL file.
The package executes fine on my local system. When I try to execute the same package on my TEST server ( via Active Batch scheduler), it fails with the following exception :
-1073548540,0x,An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: The input Web Services Description Language (WSDL) file is not valid.
I have placed the WSDL file in my TEST server location ( which is equal to the path set in WsdlFile property) and also have Delay Validation = True on WebService task in the package.
Kindly help on how can I resolve this issue.
In my experience this will only occur if the WSDL file is invalid (obviously!) or the SSIS package can't find the WSDL file. Ensure that your configuration exposes the WsdlFile property.
To do so, select SSIS > Package Configurations, and create or edit an existing configuration. Tick the WsdlFile property to expose it:
This will add a property to a configuration file. Ensure that the value of that is set to a full file path e.g. "D:\SSIS\WebService.wsdl"
Finally, once deployed, ensure that your SSIS package references the configuration file you've created.

SSIS Log file, dynamic file path and access denied error

I have a parent package where I set a variable pointing to a folder where I want to write the execution log of the package. This parent package executes child packages and set value for child's variables too.
In child packages the package logging is stetted up and the connection string to log file is built with the expression:
[User::LogFolder] + "\\" + [System::PackageName] + ".log"
But my package always fail in the first step with this message:
Error: 0xC001404B at Child Package, Log provider "SSIS log provider for Text files": The SSIS logging provider has failed to open the log. Error code: 0x80070005. Acces denied.
The error happens inside BIDS. If I set the path to the log file statically to the same path, then it runs without problems, so it doesn't seems to be a permissions problem. Any suggestion on how to solve this?
Thanks in advance.
Edit: The problem seems to happen because [User::LogFolder] value is obtained from parent package, and when the package tries to open the log the values have not been passed yet, causing the error. Is there a way to solve this?
I found the answer. For the records, the problem was that [User::LogFolder] value is obtained from parent package. And the child package was trying to write to the log before the variable value were filled, causing the error.
I solved it hardcoding the log value in the package. :-(

SSIS Main Package throwing Error : Package Failed Validation From Execute Package Task

i have a Main Package and 2 child packages(Load and Export). i have both child packages on the server in shared folder. when i execute Main Package its giving me the following Error for one of the Child package.
Error: Error 0xC0012050 while loading package file "\mhfile02\DIRFILEDEV\CHG77253\SSIS Packages\AaeAutoenrollee_Load.dtsx". Package failed validation from the ExecutePackage task. The package cannot run. .
Can anybody tell me what could be wrong?
Thanks
Are you running the package via SQL Server Agent?
Try running the child packages individually, it may be throwing other errors. If the package runs without error, the problem is probably on the Main package settings.
Some questions that may help you?
1. when you loaded the packages to the server, did you set any Protection Level (eg encrypt sensitive data with key, user key, etc?) setting these can make a package fail loading when run via SQL Server Agent
2. Try adding /msdb/ to the path of the child package.
If you are connecting in the child package to an Excel file,
and you set on the child solution property page
Under -
"Configuration Propeties"
"Debugging"
the variable "Run64BitRunTime" = False
You have to do it also on the Parent Package!
This error message means that your child package will not pass the validation. Check your child package to see if there's any task inside that does not pass the validation (a red cross appears beside it).
Maybe you have something being dynamically created that is used in such task (like constructing the connection string at runtime for some connection manager). Try set this task's DelayValidation property to True.
From one day to another, I got this error in Visual Studio / SSDT too (VS 2013, with SSIS 2014). Note: I have project deployment model, not package deployment.
I have ProtectionLevel = EncryptSensitiveWithPassword.
In the master package, on all package execution tasks, I had to retype the password for the sub-packages again. After that, it worked again. I guess the master package had some corruption, no idea why.
Greetings,
Roli
If you are connecting in the child package to an Excel file, then set DelayValidation = False on the child package excel connection manager.