Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2002
    Posts
    229

    Unanswered: No dbo for a database - but there are db_owner users

    I have a number of user databases who have lost their owner. That is, displaying properties for the database says the owner is unknown.

    I assume that any user for such a database that's assigned to the db_owner role can admin everything in this database? Which means that the lack of a dbo doesn't cause any other problem than making it impossible to run a sp_helpdb for the database, or...?

    Of course I'd like to make someone the owner, but it seems difficult to make an already existing database user the owner, without dropping the user and re-creating it.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Methinks you need sp_changedbowner, which makes the fix trivial anywhere you can execute a stored procedure (such as in Query Analyzer).

    -PatP

  3. #3
    Join Date
    Jul 2002
    Posts
    229
    Yes, but it doesn't work if the user to be the new owner is already a user in that database. Seems like I need to drop the user and re-create it?

  4. #4
    Join Date
    Jan 2003
    Location
    Massachusetts
    Posts
    5,800
    Provided Answers: 11
    Yep. Otherwise, SQL Server would have to make a choice about what permissions to grant that user. Especially if that user were dropped from db_owners. The user should see no difference, unless they have created objects under their own username.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •