What is the role of job owner in SQL Server? How does it affect job?

role of job owner account


When SQL Server Agent run the schedule job it will check for the permission of the job owner, if job owner is non-sysadmin account, SQL Server logs into job using its own credential and switches the context of the job to non-sysadmin job owner account.

You can see the job history below message for the security context switch

Executed as user: Jugal

If the job owner is sysAdmin account SQL Agent will run the job under its own security context, for example job owner is SA which is SQL Server Sysadmin account. You can see in the job history, SQL Server service account.

Executed as user: SQL Server Service account

It is recommended that individual user accounts should not be set as the owner of the agent jobs because of the security issue and to avoid the important job failures, in case individual account deleted or required permission revoked due to role change or account disable in active directory.

Instead of using individual user accounts as job owner dedicated account with the least privileges should be created to run SQL Server agent jobs.

Thanks for the comment, will get back to you soon... Jugal Shah

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s