Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there ever a reason that a SQL job should be owned by anyone other than sa?

Tags:

sql-server

Put differently, should I always set the job owner to sa for a SQL job, even though it defaults to the user who created it?

like image 679
Aushin Avatar asked Feb 20 '13 14:02

Aushin


People also ask

Should SQL Agent jobs be owned by SA?

The best practices recommend you set all job owners to SA account. Note: You might have a different approach, such as creating an account or login specifically for SQL Agent jobs.

How do I let someone execute a SQL Agent job they don't own?

There are only two ways that someone can have permission to execute a SQL Agent job. You must either own the job, or be a member of the role SQLAgentOperatorRole (found in msdb). Unfortunately SQLAgentOperatorRole grants permissions to run any job (among other things).

What is the owner of a SQL Agent job?

The owner of a job is the context of the account, that the SQL Agent Job runs as. This account by default will be the user that creates this job.

Why did SQL job fail?

Similar to Windows services, SQL Agent Jobs run under a user or service account configured in the job. Job failures can occur when there are permission or authentication issues with the user or service account. Common issues include: Account expired.


1 Answers

Any jobs that are owned by a user will cease to run if that user is disabled or deleted. The jobs may also not run if there is an Active Directory problem at run time. Brent Ozar has an article about this on his website: http://www.brentozar.com/blitz/jobs-owned-by-user-accounts/

like image 72
Brian Bentley Avatar answered Nov 15 '22 05:11

Brian Bentley