Blitz Result: Jobs Owned by User Accounts
SQL Server Agent jobs are like hot potatoes: they’re owned by whoever touched ‘em last. The job owner doesn’t really mean much – jobs can be owned by anyone and they’ll still work the same way.
Right up until the job owner’s account is dropped.
If the SQL Server was managed by someone who’s no longer with the company, all their jobs will suddenly stop working when SQL Server can’t verify the job owner’s account. (This can also pop up if there’s an Active Directory problem when the job needs to run.) The fix is to have the built-in SA account own all the jobs.
This part of our SQL Server sp_Blitz script lists jobs owned by accounts other than SA. If you’ve changed the name of the SA account, the jobs will show up here, but don’t pat yourself on the back just yet. Changing the name of the SA account can break some SQL Server service packs, so make sure you understand the risks there.
To Fix the Problem
If the jobs have been failing because they’re owned by a user whose account has since been disabled, you probably don’t want to fix this problem right away. The jobs may have been failing for months, and when you enable ‘em again, you may run into serious side effects. For example, we’ve seen cases where developers didn’t know why the job was failing, and they built a separate process to do the same work. When the jobs were enabled again, the business processes broke.
You also want to understand the contents of any job before you enable it again.
However, if the job’s still running on a regular basis, then it makes sense to change that job owner to SA to make sure it continues to run if/when the job owner’s account is disabled.
When you’re ready to fix the problem, you can simply right-click on each job in SSMS and click Properties. Change the owner to SA and click OK.