Click here to Skip to main content
12,698,686 members (26,725 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

10K views
1 bookmarked
Posted

Under Which User Does Your SQL Agent Job Run: SQL Agent Service Account or SQL Agent Job Owner?

, 19 Feb 2013 CPOL
Rate this:
Please Sign up or sign in to vote.
Under which user does your SQL Agent job run: SQL Agent service account or SQL Agent job owner?

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

Normally, we think it's SQL Agent Service account user under which SQL jobs runs. But it’s not true in all cases. It depends 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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

No Biography provided

You may also be interested in...

Pro
Pro

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170118.1 | Last Updated 19 Feb 2013
Article Copyright 2013 by Rohitmssqlfun
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid