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

About these ads

1 Comment

  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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 130 other followers

%d bloggers like this: