Using sa as owner for jobs and databases

This blog is not about avoiding logging in using the sa login. Hopefully we all know about this, and work towards avoidning this practice.

Instead I want to talk about using sa, but not to login (authenticate), but as owner for jobs and databases. I want keep these thing de-individualized – so we avoid things like person A leaving the company and we don’t dare to remove that login/Windows account. We can of course create some SQL login or Windows login especially for this purpose and use that. But sa is already there. Another advantage is that sa always has the same sid number (makes moving databases across instances a bit easier).

The way Agent work is that if the owner is member of sysadmin server role, then it won’t attempt any imersonation for the job steps. I.e., Agent won’t use SETUSER (2000 and earlier) or EXECUTE AS USER = (2005 or later). This means that Agent will never actually authenticate using sa (Agent will always authenticate using a Windoes authentication – and then verify that it is sysadmin). I.e., we can change password for sa, disable sa, or even run in Windows Only mode.

And, just to be obvious: If the job should be owned by some individual, in order for operating in a proper security context, then we should use that individual as owner and not sa!

How do you handle job and database ownership? Do you have situations where the owner does matter, details?

12 Replies to “Using sa as owner for jobs and databases”

  1. Alright y’all, gk88slot is where it’s at for slots. Seriously, some great games and jackpots on offer. Stumbled upon it, and very happy with my find. See if you like it at gk88slot.

  2. Downloaded the f66app the other day. Pretty smooth performance, no annoying crashes so far. If you like playing on your phone, this might be for you. Grab it here: f66app

  3. Yo, heard about h555gamedownload. The download process was quick and easy. The games they offer are pretty cool. I’ve been spending a bit of time there. If you need a new game to download might want to check it out. Go here: h555gamedownload.

Leave a Reply

Your email address will not be published. Required fields are marked *