SSIS Error Code Dts_e_oledberror an OLE DB error has occurred error code 0x80040e4d

sql dev 6 Reputation points
2022-04-07T10:33:52.84+00:00

When trying to execute ssis package through sql server agent job, I get the error message 'SSIS Error Code Dts_e_oledberror an OLE DB error has occurred error code 0x80040e4d' Description: Login failed for user 'username'

The user which is used to run the agent job has system administration access and the package executes successfully when its is executed as ssis package, what would the issue be?

Thank you in advance!

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,702 questions
SQL Server Other
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2022-04-07T11:39:21.053+00:00

    Login failed for user 'username'

    A clear error message, that SQL login don't exists in SQL Server or logon is denied for the SQL login or don't have access permission for the requested database.


  2. ZoeHui-MSFT 41,491 Reputation points
    2022-04-08T04:10:21.783+00:00

    Hi @sql dev ,

    To resolve the issue, use following methods:

    Method 1: Use a SQL Server Agent proxy account. Create a SQL Server Agent proxy account. This proxy account must use a credential that lets SQL Server Agent run the job as the account that created the package or as an account that has the required permissions.

    This method works to decrypt secrets and satisfies the key requirements by user. However, this method may have limited success because the SSIS package user keys involve the current user and the current computer. Therefore, if you move the package to another computer, this method may still fail, even if the job step uses the correct proxy account.

    Method 2: Set the SSIS Package ProtectionLevel property to ServerStorage. Change the SSIS Package ProtectionLevel property to ServerStorage. This setting stores the package in a SQL Server database and allows for access control through SQL Server database roles.

    Method 3: Set the SSIS Package ProtectionLevel property to EncryptSensitiveWithPassword. Change the SSIS Package ProtectionLevel property to EncryptSensitiveWithPassword. This setting uses a password for encryption. You can then modify the SQL Server Agent job step command line to include this password.

    Details please refer to ssis-package-doesnt-run-when-called-job-step

    Regards,

    Zoe


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. sql dev 6 Reputation points
    2022-04-14T10:35:56.847+00:00

    @ZoeHui-MSFT I have tried all of the stated option and the job fails with the same error message - e.g. when trying to use a proxy account to run the job it looks as though its still using the sql server agent service account to execute the job (the service account which the sql agent service is under - in Services)

    Is there anything that I may be missing?

    0 comments No comments

  4. Fernanda Araujo 1 Reputation point
    2022-09-14T19:59:17.723+00:00

    Same problem here. Did you manage to figure out how to solve the problem?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.