ssis package unexpected termination - ssis

I am migrating reporting guff to a new 2016 sql server.
One integration package which I have upgraded, deployed and created a job for runs and then terminates unexpectedly. The only messages are that validation starts then it terminates.
The event viewer just shows a warning saying the job failed.
The package is run by a proxy account that also has access to a file share with excel documents on it. If I run Management studio with that account and manually execute the package I get the exact same messages. So I don't think it has anything to do with the account or permissions etc. If I run the package in visual studio it works fine.
Any suggestions on next trouble shooting steps?? Or how I can view better logs/ error files??
Thanks in advance
Kirsty

Related

ADO NET Source has failed to acquire the connection with the following error message: "Login failed for user '[SQLLogin]'."

Whenever I deploy the package, it seems like the connection details aren't embedded.
I built a package that executes normally on Visual Studio, but once I deploy it onto the SQL Server, it fails to execute, stating the failure to acquire the connection.
My co-workers have created projects with the .ispac file using the same exact steps/package that I have before deploying, and have been deploying with no issues. I can even execute their packages just fine from SQL Server! It's driving me insane why it seems that only MY deployments aren't executing.
I secured the package by setting the ProtectionLevel to 'SecureAllWithPassword' on both the package and project level before deploying.
The package works if I were to embed the password in the configuration's Connection Manager afterwards. It even saves it. However, my co-workers and I have never had to do this in the past and it wasn't standard procedure.
I've checked to see that my steps are no different than the ones my co-workers follow. They were on Visual Studio 2017, and I was on 2019 so I tried swapping to Visual Studio 2017. It still fails to execute with the failure to acquire connection.
Banging my head against a wall scouring for answers across the internet. All seem to describe ProtectionLevel, but I've made sure to set it appropriately.
Instead of deploying from the package file directly (.dstx), deploy the entire project folder with the package inside.

Why do I get the error: "cannot communicate with the debug host process" when attempting to execute an SSIS package?

I create a new package in SSIS and when I try to run the package, SSIS returns the following error (displayed in a Visual Studio Error Dialog):
"Cannot communicate with the debug host process. The IDtsHost interface is not registered. (Microsoft.DataTransformationServices.VsIntegration"
Environment: VS 2019 with newest SSIS Extension Installed. The package appears to be created correctly and the build succeeds.
The error happens even if the package is trivial "hello world" type of package.
I found no solution to this after a fairly extensive search.
Thanks to EmersioN (https://stackoverflow.com/users/707267/emersion) for the solution. The problem in this case was the selected targeted version of SQL Server. My project was configured to target "SQL Server 2017", but was connected to a server running SQL Server 2012.
If you're seeing this error, this may be the reason.
Go to the properties page of the Integration Services project that contains the affected package. In the Property Pages dialog, navigate to Configuration Properties > General. Under the property group, Deployment Target Version, in the TargetServerVersion property drop-down, select the SQL Server version that matches the one you're connected to.
I just came across this as well in VS2019 SSDT. In my case it was a working SSIS package that after going to sleep for the night, the machine woke up and wouldn't execute the same scripts. These were my steps. Hope they help you or someone else who stumbles across this.
Open each connection within the script, Test Connection and Save
Clean the solution
Rebuild the solution
My context
Working through an SSIS tutorial using SQL Server 2019 Developer (v15.0.2080.9) and VS2019 Community (v16.11.9) to create packages using SSDT (SSIS Projects v3.15).
Packages in VS have executed without issue in the past. I then upgraded my machine from Windows 10 Pro to 11. Now, when running the same - possibly any - package I get the following error:
===================================
Failed to start project (Microsoft Visual Studio)
===================================
Cannot create a debug host for the package. (Microsoft.DataTransformationServices.VsIntegration)
------------------------------
Program Location:
at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.LaunchVsDebugger(Boolean isRemoteTest, IVsDebugger iVsDebugger, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItem, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchActivePackage(Int32 launchOptions)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
===================================
Cannot communicate with the debug host process. The IDtsHost interface is not registered. (Microsoft.DataTransformationServices.VsIntegration)
------------------------------
Program Location:
at Microsoft.DataTransformationServices.Project.DebugEngine.DebugEngine.LaunchDtsDebugHost(Process& process, Boolean run64bit)
at Microsoft.DataTransformationServices.Project.DebugEngine.DtsProgramNode.CreateRuntimePackageInternal(IDtsHost& host, Process& process, Package& dtsPackage)
...and the package does not execute.
What was tried
I tried/checked all 3 answers posted here.
Error persists.
This VS Dev Community's post recommended upgrading the VS extension, SSIS Projects. Since I had the most recent version installed an upgrade was not applicable, so I chose the repair option from the installer.
Error persists.
I then ran a repair on the VS2019 install. This, in turn, required another repair on SSIS Projects. (I still had both installers on my machine which made this easy.)
Error persists.
This MSDN post recommended re-registering DtsDebugHost.exe, failing that, re-installing SQL Server.
I ran the DtsDebugHost.exe /regserver command.
Error persists.
My Solution
I then chose to repair my SQL Server installation instead of re-installing. This was accomplished via the SQL Server Installation Center > Maintenance > Repair option. In my case, I chose the default instance, MSSQLSERVER.
VS now runs without the error and successfully executes the package.
I couldn't say whether my solution was solely based on the repaired SQL Server instance or a combination of other things tried and my last action. So I offer the path I took in the case of the latter.
Aside: The other choices during the SQL Server repair on my system were (1) another server instance, SQLSERVER2019, and (2) "shared components". Selecting either of those may have resolved the issue as well, but I couldn't confirm that.
In Project Property, turn off Azure-Enabled as seen in the image below. Your package will execute afterwards.
I encountered this error after upgrading to Windows 11.
I referred to the post by #steveb and went straight to his solution of repairing SQL Server (SQL Server Installation Center > Maintenance > Repair), without doing any of the other steps he tried.
And that solution worked.
I'm posting this because #steveb said he was unsure if any of his previous steps had affected the ultimate solution, and in my experience they were not necessarily needed.

SSIS "The binary code or the script is not found" only on start_execution

When i launch my script from this stored procedure, it fails on the first script task.
EXEC SSISDB.catalog.start_execution #execution_id
I've got the following error:
The binary code for the script is not found. Please open the script in the designer by clicking Edit Script button and make sure it builds successfully.
I've done this multiple times without results, i have a feeling that the problem must be somewhere else because when i launch it from Integration Services Catalogs it works.
I use SQL 2012 on local development computer and SQL 2016 on server.
The error message is misleading.
I was using VS2012 to dev and deploy on SQL2016, when you do that the script component wont work.
I used VS2015 and upgraded package to SQL2016 and it worked.

SSIS package failing from SQLagent

I have a scheduled SQL job, it runs a SSIS package. The package contains a script task. I have faced on issue that SqlAgent is unable to trigger the package. After lot of investigation I could not find a direct solution and did a work around to execute the package through operating systems(cmdexe) step rather than sql server integration services type step. Now its running fine. However sometimes the job is failing and in the logs its throwing some error "Exception has been thrown by the target of an invocation." by script task. This is issue is coming randomly. when I run the same package manually from integration services catalog its running fine. But why is this happening only with SQlAgent that too sometimes??. Did anyone ever faced this issue. Please help.

Package working in visual studio but not in Job agent

I have moved my packages to another server. Now on that server when I am executing my packages on visual studio then it is working fine. But when I am deploying the same package and try to execute it both via integration services engine or SQL Job.. I am getting below error
An error occurred with the following error message: "Cannot bulk load. The file "C:\ABC\PQR\XYZ\myFile.txt" does not exist.".
Edit
Somehow that issue is resolved but now I am into one more issue
Packages installed in MSDB is working fine when I am clicking on Run Package. But when I am creating SQL Agent job for the same packages it is not working.
I have tried setting "rely on server encryption" but no luck :-(
I would suggest to check whether folder C:\ABC\PQR\XYZ\ have read permissions for an account used to run SQL Agent jobs.
If this is **C:\ABC\PQR\XYZ** mapped drive connection then use the UNC path it worked fine through the server agent.