Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

non SA owned databases

Are there any issues with databases not being  owned by SA? I have just seen a healthcheck script which flags it as an issue if the database isnt owned by the default SA account? Why so, what are the risks?

For clarity, is there an easy way to identify which account owns which database via SQL?
0
pma111
Asked:
pma111
3 Solutions
 
Tony GiangrecoCommented:
Your backup app may have a problem with it. Have you address that?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
if you deleted the login which is the owner of the database, you would then have to perform a db owner change.

backup software shall use "some" account with sys_adm powers, which is the equivalent in regards to "power" as sa account.
0
 
pma111Author Commented:
So in all if the db owner account has sa permissions and is never disabled/removed in AD, there is no issue?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Scott PletcherSenior DBACommented:
>> For clarity, is there an easy way to identify which account owns which database via SQL? <<

Yes: the sys.databases view provides the owner_sid for every db.  You can use that value to join to sys.database_principals to get the name of the login.


SELECT d.name, sp.name AS owner_name
FROM sys.databases d
LEFT OUTER JOIN sys.server_principals sp ON
    sp.sid = d.owner_sid
0
 
pma111Author Commented:
So in all if the db owner account has sa permissions and is never disabled/removed in AD, there is no issue?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
exactly
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now