4

What is the best practice for the database owner in SQL Server 2005?

I have already searched this page...

http://technet.microsoft.com/en-us/sqlserver/bb331794.aspx

and didn't find what I was looking for.

This is the principals that is displayed in the owner column when you execute sp_helpdb and/or if you right click on the database in SSMS and select properties and go to "Files" it is the second drop down list box from the top labeled owner.

Currently it is set to a domain user who is no longer with the company. In the past I've always left it with the default which is the user that created it. I know I cannot set it to the domain user that the services run as. I could set it to SA but this feels wrong. Perhaps I should create a new special SQL Login that has limited permissions and just serves this purpose?

3 Answers 3

5

sa is the best owner of a db. You want to set the owner to something that you know will persist because db_owner role information is stored in the database itself. If something happens to the database and it becomes inaccessible and SQL Server can't figure out who's in the db_owner role then only the db owner or someone in the sysadmin server role will be able to perform certain operations to get the database back. If you have nobody else in the sysadmin role other than sa then you're in for some problems.

Of course, if sa's the only sysadmin and you're regularly logging as sa to do admin things then you probably already have other problems to address...

3

We set to SA, guaranteed to not vanish. Perhaps it feels wrong, but what are the risks? If SA is compromised, they have server level control.

-1

Never ever éver use sa for this! In fact, if you have to use mixed authentication mode for sql server, always disable your sa first. It's the most compromised user!

1
  • Having the database owner set to sa has nothing to do with the sa being a common attack target or the authentication mode.
    – longneck
    Jun 10, 2013 at 16:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .