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

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.

Related

SSIS Log Provider not working with SQL Server User

I have created a SIS Log Provider to write a log entry from a Script Task in a SSIS package. The connection is working a long as I use Windows Authentication, but if I switch to SQL Server Authentication and provide a username and a password no log entry is written. I use the same connection in the package to execute a SQL Task to read from the SSIS Log with no problem. The SQL Server User has read and write access to the SSIS Log.
I have to use SQL Server Authentication because the Windows User Running the SSIS Job and the package doesn't have access to SSIS Log and this could not be changed.
I'm using VS SSDT 2017 and deploy the package to SQL Server 2016.
I tried to store the username and password in the package and to provide the connectionstring and password via package parameters and environment.
No effect as soon as I switch from Windows Authentication to SQL Server Authentication.
Dts.Log(logMessage, 0, emptyBytes);
The above code should write an entry in the SSIS Log, but works only for Windows Authentication.
Edit:
The SSIS Log Provider Type is SSIS log provider for SQL Server.
The connection manager type is OLEDB, the provider type is Native OLE DB/SQL Server Native Client 11.0.
The connection is parameterized for the connection string and the password.

SSIS package with ODBC SSL target connection fails, while no SSL execution is successful

I have an issue with an SSL ODBC connection from SSIS Package, while the package is executed by SQL Agent.
I am using a technical user (ActiveDirectory account) used to execute (run as) a step in a SQL Agent job that calls the package.
The user has a proxy credential and all required privileges on SQL server to execute the job and all dependent resources from SQL server, as while the DSN, used by SSIS ODBC connection is configured without SSL it works as flawless.
When the "Connect using SSL" property is set, I am getting a generic error message:
:Error: Failed to acquire connection "". Connection may not be configured correctly or you may not have the right permissions on this connection.
I have noticed, by accident while debugging, that if I have any application running or a session established for the technical user to the server, the load with SSL configuration ends successfully. When the session is terminated/closed the error comes back.
Please advise, what has to be reconfigured to make it work with SSL!
Environment:
SQL Server 2016 (v: 13.0.4001.0)
SQL Agent runs as: NT Service\SQLSERVERAGENT
SAP Hana is a target DB
SQL Server runs on Windows Server 2016

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 Package Does Not Execute In SQL Server 2014 ProtectionLevel: EncryptSensitiveWIthUserKey

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.

SQL Server 2005 - SSIS validation error server-side only

I am deploying some integration services into a SQL Server 2005. On my computer, I don't have any validation error but I do on the server.
It comes from an OLE DB connection manager: "Login failed for user 'rw_user'". Whereas I can fully run it on a client, the connection works perfectly.
This is a connection to the server itself.
Thoughts:
If you can run it locally, is it under your credentials?
That is, have you fully permissioned rw_user on the target SQL Server?
User/password stored OK in the package?

Resources