I created a SQL Server job, in which:
- My user is set as the
owner
of the job - No user is specified for
run as
at any step.
The job failed with the error:
'EXECUTE AS LOGIN' failed for the requested login <my_username_here>
When I changed the owner
of the job to another user with more privileges, the job worked.
So, it seems like the job runs under the user set as the owner
- but I've read several questions here (1, 2) or in SO discussing "who is the user running the job", and none mentioned that.
So I wonder what happened in my case?