SSIS Package Does Not Execute In SQL Server 2014 ProtectionLevel: EncryptSensitiveWIthUserKey - sql-server

My boss wants me to figure out a problem we are facing. The problem is that we have a SSIS Project we built using Microsoft SQL Server data tools and are trying to execute that package on SQL Server 2014 Management studio.
It is listed under the SQL Server Agent as a Job and when we execute the job, we get an error: Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E4D Description: "Login failed for user '********'."
In our SSIS properties under security, our protection level is "EncryptSensitiveWithUserKey". I've done a ton of research and it shows to either change that property to "Don'tSaveSensitive", which we need to save the password, or creating a user proxy to serve as a median across the platforms.
We are able to execute the project on the SQL Server Data Tools interface, but not when uploading the Job onto SQL Server 2014 Management Studio. We believe it's because the login is failing as stated in the error above.
How would I go about connecting the two platforms together? Would a user proxy work for this case?
I am still new to this, so please correct any errors I have above kindly.

When you use encrypt with user key that means that when the developer on the current machine, using the current login info, SSIS will decrypt everything when the package is opened by the developer on the same machine. To use the package on another machine you should use another setting such as EncryptSensitiveWithPassword.

Related

Login failed while trying to save SSIS package

While running the import/export wizard in SQL Server Management Studio, I am running into a problem when trying to save the SSIS package. I am using SQL Server authentication. I used the username/password to both log in to SSMS, as well as in the "destination" step of the import/export wizard. However, I can't get past the "Save SSIS Package" step, because of the following error:
The ExistsOnSQLServer method has encountered OLE DB error code 0x80004005 (Login failed for user 'crsdnonprodadmin'.). The SQL statement issued has failed.
I'm using the same username/password as I did in previous steps, and it has admin privileges. I can run the job immediately, without saving it, so I know the task works and I have permissions to do it. Hoping for some insight, please and thank you!
(Using SSMS version 18.11.1)

SSIS error: Login failed for user "NT AUTHORITY\ANONYMOUS LOGON"

We converted our 2012 SSIS package to 2016 SSIS (TargetServerVersion = SQL Server 2016).
One of the database the SSIS package reads from is a SQL Server 2012 database.
Either connecting using Native OLE DB\SQL Server Native Client 11.0 or connecting using OLE DB provider for SQL Server give the same error.
Data Source=my2012SQLDBServer;Initial Catalog=my2012SQLDB;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;
Data Source=my2012SQLDBServer;Initial Catalog=my2012SQLDB;Provider=SQLOLEDB.1;Integrated Security=SSPI;Application Name=myApplicationName-{....}my2012SQLDBServer.my2012SQLDB;Auto Translate=False;
When running the SSIS package from SSMS (SSMS is run using a user that has a dbOwner permission to the 2012 database, ie myDomain\myUser) , I am getting the error in the step reading a table from the 2012 database
Execute SQL Task: Error: Failed to acquire connection "my2012SQLDBServer.my2012SQLDB".
Connection may not be configured correctly or you may not have the right permissions on this connection.
DTS_E_OLEDBERROR. An OLE DB error has occurred. Error Code:0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" HResult:0x80040E4D
Description: "Login failed for user "NT AUTHORITY\ANONYMOUS LOGON".
On Visual Studio (run using myDomain\myUser), I am able to succesfully run the SSIS package.
myDomain\myUser also has an ssis_admin, ssis_logreader, db_owner, app_dbowner role in the SSISDB database.
How can I fix this error ?
Thank you.
It is typical error for double-hop problem.
Simplest solution is to login using remote desktop to SSIS server and then run it using SSMS there.
Other option is to define SQL Agent job on the SSIS server and then run the package using this job.
Ultimate solution will be to configure Kerberos and allow double-hop connections on the SSIS box.
You can check following post how to configure Kerberos:
SSIS job fails when run remotely thru ssms, but runs fine on SQL Server
solution for me was like just changing windows authentication in the destination settings to SQL server authentication with apropriate
Account that have rights to reach the server, i dont understand how it works but it does.

Why does my SSIS package run in Visual Studio but fails validation on the server?

I have an SSIS Package that reads from two tables (on different instances), performs a Merge Join and the uses a Conditional Split to update one of the source tables. I have a single connection manger set up and use an linked server to access one of the tables on another instance. In the connection manager I use a login and a saved password with permissions to the databases and tables. It runs like a champ in Visual Studio. When I deploy it to my SQL Server 2016, it fails validation with the error "Update Customers:Error: Customer Data failed validation and returned error code 0xC020801B."
I have tried to move the linked server to it's own connection manager with a saved password. I also tried using Windows Authentication in the connection manager. These didn't work either. Also, when I search for the error code 0xC020801B nothing seems to come up.
EDIT:
The Package ProtectionLevel is EncryptSensitiveWithUserKey.
EDIT II:
I changed the connection manager from a Project connection manager to a Package connection manager. I now get the error:
Source: "Microsoft SQL Server Native Client 11.0" HResult: 0x80040E4D Description: "Login failed for user 'integration'."
The user integration has access to the databases and the tables in question. I also tried to remove the login and use Windows Authentication. I added the server as a login with db_datareader and db_datawriter permissions on both databases. When I deploy and execute the package I get the error on the linked server connection:
Source: "Microsoft SQL Server Native Client 11.0" HResult: 0x80040E4D Description: "Login failed for user 'DOMAIN\INSTANCE_NAME$'."
You are using ProtectionLevel "EncryptSensitiveWithUserKey", which means that all sensitive data including passwords are encrypted using windows encryption based on your login.
When you deploy the package to the server, it is not able to decrypt these passwords.
Please use "DontSaveSensitive" and provide all passwords using package parameters.
Or better option is to use windows authentication and grant required privileges to your service account.
I found this ...
https://imgalib.wordpress.com/2013/01/24/how-to-solve-ssis-error-code-0xc020801c0xc004700c0xc0047017/
It could be worth checking for drivers etc on the server

SSIS package - wont run from SqlAgent but ok when run Manually

I have a SSIS package that references a remote database through an OLE DB connection to remote database. The connection is using a SqlServer account on the remote database and this all works fine.
When I enter the password in Visual Studio Package editor I have the "save password box" ticked, and it seems to write the encrypted password to the connection files. The test connection option works, and when I run the SSIS package it works.
When I build and deploy to SqlServer and run through a job, it fails. The job was initially running as a SqlServer Agent Account, but i also tried running this as my own account by setting up a credential and then a proxy. As I understand the encrypted password will only work for the user who encrypts it.
The job is owned by my own account, but have tried changing this a handful of times to. I don't think this affects the problem in regards to the error.
My error is as follows
RemoteConnectionTester:Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80040E4D Description: "Login failed for user 'xxxx'.".
The project protectionLevel is EncryptSensativeWithUserKey
Any tips or advice would be appreciated

SSIS error while running package using SQL job

I have SSIS package that import data from excel to SQL database 2012. the package runs fine and deliver what it supposed to do when I run it on visual studio. However when I try SQL job to run the package it keep giving me error massage below.
SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error
code: 0x80004005. An OLE DB record is available. Source: "Microsoft
Access Database Engine" Hresult: 0x80004005 Description:
"'Q:\Ledger\MajorGL.xlsx' is not a valid path. Make sure that the path
name is spelled correctly and that you are connected to the server on
which the file resides.".
and the path is a valid path.
Make sure:
Machine were SQL Server is installed has access to path: Q:\Ledger\
User on which SSIS is running has access rights to the file MajorGL.xlsx
#zazzu-I think ,this is a password error with connection.Can u check with connections once again??
Just save the package and close the solution.Again open the solution and the package .Test the connections now.
Drive Q sounds like a network drive, you will need to change your SQL job to run with a user that has permissions to that location.
Go to the section called USING PROXIES in this article and set up your package to use execute using this proxy.

Resources