Database has no owner

  • I have gone into the properties of a couple of databases and noticed that under the database name the owner field is empty.(right click on database, select properties, select Files)
    What would be the repercussions of leaving this field blank?  Can this create a security issue, or cause any underlying problems with the database?
    Although I would probably end up changing the owner to 'sa', I would really like to understand the relevance of this field since the database will still run with this field blank.
    Thanks,
    Andrew

  • Andrew_Robertson - Tuesday, January 29, 2019 8:25 PM

    I have gone into the properties of a couple of databases and noticed that under the database name the owner field is empty.(right click on database, select properties, select Files)
    What would be the repercussions of leaving this field blank?  Can this create a security issue, or cause any underlying problems with the database?
    Although I would probably end up changing the owner to 'sa', I would really like to understand the relevance of this field since the database will still run with this field blank.
    Thanks,
    Andrew

    It could be created be someone and he/she may left the job. You can change this to SA.

    ALTER AUTHORIZATION ON DATABASE::YourDatabaseName TO sa

    Muthukkumaran Kaliyamoorthy
    https://www.sqlserverblogforum.com/

  • Andrew_Robertson - Tuesday, January 29, 2019 8:25 PM

    I have gone into the properties of a couple of databases and noticed that under the database name the owner field is empty.(right click on database, select properties, select Files)
    What would be the repercussions of leaving this field blank?  Can this create a security issue, or cause any underlying problems with the database?
    Although I would probably end up changing the owner to 'sa', I would really like to understand the relevance of this field since the database will still run with this field blank.
    Thanks,
    Andrew

    I've not run into such a problem, so this is a guess.  If you have a stored proc that uses "Execute as Owner", it might cause a problem but, again, just a guess.  My recommendation would be to fix it as you have described but if and only if the "SA" user has been disabled, which should always be the case.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I don't think this is an issue. I had an AD user create a db and then removed the AD user. I don't see the user removed, so not sure what happened. I also can't drop the login with there being an owner. It could be that a group was removed and the person that created the database was in there? Not sure what happened.

    In any case, I don't know that the database owner does more than allow that user/login the ability to access the database. Without an owner, I don't think guest or any other user/role has the right to do things, so my assumption is this isn't a security risk.

    However, I also know I don't have all the answers.I'd write an alert and scan for this regularly and reset authorization to sa.

  • Steve Jones - SSC Editor - Wednesday, January 30, 2019 11:14 AM

    I don't think this is an issue. I had an AD user create a db and then removed the AD user. I don't see the user removed, so not sure what happened. I also can't drop the login with there being an owner. It could be that a group was removed and the person that created the database was in there? Not sure what happened.

    In any case, I don't know that the database owner does more than allow that user/login the ability to access the database. Without an owner, I don't think guest or any other user/role has the right to do things, so my assumption is this isn't a security risk.

    However, I also know I don't have all the answers.I'd write an alert and scan for this regularly and reset authorization to sa.

    The database owner can be a key to what can be run without giving the world access when you use EXECUTE AS OWNER.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Basically the ID that was the database owner has been dropped from SQL Server.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply