none
Property Owner is not available for Database

    Question

  • I am getting this error while selecting the properties of one database.

    Property Owner is not available for Database '[TEST]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Smo)

     

    Suddently this error started coming ? why ?

    Sunday, July 29, 2007 5:56 AM

Answers

  • I had Same Problem and Solved with this

    USE SampleDB
    EXEC sp_changedbowner 'sa'
    

    note:

    Login that you specify must be a User (sql user or windows user) not a group

    Saturday, December 31, 2011 9:07 AM
  • That means that a macthing sid is not found int he server principals table, these database seem owner orphaned. Use a left join to find out which ones are not in there.

    Databases can work without a principals owner but this should not be a normal state.

    The default owner of newly created database is the server principal who created the database.


    The are no code changes unless you use something like database ownership chaining.

    2) The first path are the server principals (logins who have access to the server), the second path are the database principals (Server principals mapped to database principals) whoc have certain permissions on the database either through individual rights or group memebership.

    Jens K. Suessmeyer

    ---
    http://www.sqlserver2005.de
    ---

    Monday, July 30, 2007 7:04 AM

All replies

  • Make sure that the database owner is/was not a user / principal which has been deleted in the meantime. Orphaned database owner can be fixed using the sp_changedbowner and assigning a new owner to the database.

    Jens K. Suessmeyer

    ---
    http://www.sqlserver2005.de
    ---

    Sunday, July 29, 2007 2:28 PM
  • Thanks..

    I am getting this error while executing this.Do you know how to see the current/previous owner in studio ?

     

    USE [TEST]

    GO

    EXEC sp_changedbowner 'dbo'

    GO

     

    Error

     

    Msg 15151, Level 16, State 1, Line 1

    Cannot find the principal 'dbo', because it does not exist or you do not have permission.

    Sunday, July 29, 2007 2:58 PM
  •  

    You will have to provide a server prinicpal like 'sa'

    To get the current owners, you will have to use something like the following:

    SELECT databases.NAME,server_Principals.NAME

    FROM sys.[databases]

    INNER JOIN sys.[server_principals]

    ON

    [databases].owner_sid = [server_principals].sid


    Jens K. Suessmeyer

    ---
    http://www.sqlserver2005.de
    ---

    Sunday, July 29, 2007 5:30 PM
  • 1) In this database all the tables/views  owner is dbo.does that mean dbo  should set as database owner ?

     

    Your query is seleted only 7 databases Out of 15 databases . What is that mean ?

     Can one database work with out principal login ? What is the default owner of non-system databases ?

    Is there any code changes required if any database owner change ?

     

    2) In studio , what is the difference between root--> security-->logins          vs root>databases>TEST-->security--> users

     

     

     

    Thanks

    Julius

    Sunday, July 29, 2007 10:09 PM
  • That means that a macthing sid is not found int he server principals table, these database seem owner orphaned. Use a left join to find out which ones are not in there.

    Databases can work without a principals owner but this should not be a normal state.

    The default owner of newly created database is the server principal who created the database.


    The are no code changes unless you use something like database ownership chaining.

    2) The first path are the server principals (logins who have access to the server), the second path are the database principals (Server principals mapped to database principals) whoc have certain permissions on the database either through individual rights or group memebership.

    Jens K. Suessmeyer

    ---
    http://www.sqlserver2005.de
    ---

    Monday, July 30, 2007 7:04 AM
  • I had Same Problem and Solved with this

    USE SampleDB
    EXEC sp_changedbowner 'sa'
    

    note:

    Login that you specify must be a User (sql user or windows user) not a group

    Saturday, December 31, 2011 9:07 AM
  • 'dbo' is a schema not a user principal !

    Saturday, December 31, 2011 9:08 AM
  • This worked perfectly for me!  not sure how the SUSDB didn't have an owner, but I was able to assign sa to it, and it worked.

    thanks

    Thursday, February 16, 2012 6:58 PM