Blog Post

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/)

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating