(New to SSIS. None of the similar questions mention this particular impersonation error.)

I'm trying to run an SSIS package as an Agent job via a proxy, and I'm getting a non-helpful error message. The credential object is for an AD account. I'm able to log in with the password to other services, but attempting to run the Agent job errors out in the Execute job step. Running the job as SQL Agent service account worked, but it doesn't have access to the filesystem that the SSIS job is supposed to pull data from.

I checked the agent log file and it's this:

[298] SQLServer Error: 22046, Impersonation error. [SQLSTATE 42000]

I checked the Windows security log in Event Viewer:

Failure Information:
Failure Reason:     Unknown user name or bad password.
Status:         0xC000006D
Sub Status:     0xC000006A

I tried it with my (sysadmin) user ID and password in a different credential / proxy and got the same error. I know that account works.

We granted both SQL Agent and this account user rights to logon as batch job, and the agent account permission to impersonate. We also tried making the various accounts Windows admins and sysadmins, but nothing has helped.

This worked right out of the box in our QA domain.

Any suggestions how to get this to work? What domain/local/SQL Server security settings would enable or prevent the agent impersonating a user?

Windows 2016 + SQL Server 2016

  • Sad to see that no one has responded to your question yet. We are in the same situation right now. Did you find a solution? – bernhof Apr 24 '20 at 9:30
  • @bernhof it's been a while, but we simply run the job as the sql server agent, no impersonation. – that it guy Apr 27 '20 at 12:28
  • Ok, that won't fly here. We're considering avoiding SQL Server Agent and simply running packages using dtexec and Windows Task Scheduler. While not ideal, it seems to circumvent the problem and impersonation works. At best, this is a temporary solution until we find the right way to go with SQL Server Agent. – bernhof Apr 28 '20 at 10:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.