Home » CodeProject » Under which user your SQL Agent Job run : SQL Agent Service Account or SQL Agent Job Owner ?

Under which user your SQL Agent Job run : SQL Agent Service Account or SQL Agent Job Owner ?

Today, I am willing to do demo that under which user my SQL Agent Job run, SQL Agent Service Account or SQL Agent Job Owner ?

Normally, We think its SQL Agent Service account user under which SQL jobs runs. But it’s not true in all cases, It depend on your Job owner permissions.

If the job owner is an account that is in the sysadmin fixed server role, than your step of job will be executed under the SQL Agent Service Account.

Otherwise, It will be executed by the account set as the job owner, no matter who is starting the job.

Exception : The job step is a CmdExec or ActiveXScript job step

If the job owner is an account that is in the sysadmin fixed server role, than your step of job will be executed under the SQL Agent Service Account.

Otherwise the step of job will be executed under the security account of the Proxy Account if enabled and configured.

If that proxy account is not configured the step will fail with Below Error.

Non-SysAdmins have been denied permission to run CmdExec job steps without a proxy account. The step failed.

Test Job run under SQL Agent Service account when Job owner is ‘sa’

Test Job run under Job Owner ‘test’ user when Job owner is ‘test’ (non –sysadmin account)

Reference : Rohit Garg (http://mssqlfun.com/)


4 Comments

  1. private krankenversicherung vergleichen says:

    Hey There. I found your weblog the usage of msn. This is a really smartly written article. I will be sure to bookmark it and come back to learn extra of your useful information. Thank you for the post. I’ll definitely comeback.

  2. mickie says:

    Excellent post. I will be going through some of
    these issues as well..

  3. Johanna says:

    Hello, i think that i saw you visited my weblog thus i came
    to “return the favor”.I am trying to find things to improve my website!I suppose its ok to use a few of
    your ideas!!

  4. […] Under which user your SQL Agent Job run : SQL Agent … – Today, I am willing to do demo that under which user my SQL Agent Job run, SQL Agent Service Account or SQL Agent Job Owner ? Normally, We think its SQL Agent …… […]

Leave a Reply

Join us on Facebook

microsoftcommunitycontributor
%d bloggers like this: