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

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.

Related

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 package unexpected termination

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

Process.Start application was unable to start correctly w/ DTExec

I am writing a tool that allows a DBA to remotely run an SSIS package. The application is an XBAP and has been deployed to a SQL Server, with the SSIS package on the same server. I achieve the remote calling of the SSIS package by running DTExec remotely on the server (I open the servers DTExec utility, not a local version) running as another user using Process.Start.
Here is the issue that I'm getting. When running the application (from the server) from my desktop it works absolutely fine. DTExec is started and the SSIS package is executed. However, when I go to a different computer within our same network, I receive the error
The application was unable to start correctly (0xc0000143). Click OK to close the application.
This has happened on multiple computers, but for some reason works from mine.
The only difference between the two computers, is that mine has a version of SQL Server developer on it (meaning I have a local DTExec tool - however I am not calling this tool, the path is to \\server\Microsoft SQL Server...\DTExec.exe).
Does anyone have any idea what's going on here?
Found the answer via this blog post: http://asprosys.blogspot.ca/2009/03/perils-and-pitfalls-of-launching.html
Adding Credentials to the Process.StartInfo requires have permissions on the local machine as well as the server where the application is running and where the application you are attempting to run is found.

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.

SSIS Execute Process Task hanging from SQL Server Job, no errors given

I have a basic SSIS package that has an execute process task which runs a .exe sitting on our NAS/Share drive which produces a csv file and is read by later steps.
I can execute the SSIS package within BIDS and everything works flawlessly. When deploying to the server and running from job the SSIS package just hangs and stays in executing mode.
To verify we could run it from the server, I tried running the .exe from the command line from within the server and came across an error which was stopping the .exe running, turns out we needed a 64bit, windows server 2008 specific .exe which we have put together. Despite updating the .exe and being able to run it from the command line in the server now we are still suffering the same issue.
Any ideas, pointers, even potential research avenues would be greatly appreciated as I am relatively new to SSIS and am patiently trying to hack my way through it.
Cheers
If you are using your executable from a UNC path you will have to add it in the zone setting in Local intranet.
On your Internet Explorer, go to Security and select Local Intranet setting. Click on Sites and add your UNC path and click ok. The file:// protocol is added automatically.
This has nothing to do with SSIS, but everything to do with the zone settings in Internet Explorer.
This should help.