Help with sp_changedbowner

  • I have a database with a "null" owner. When I attempt to execute "sp_changedbowner 'sa'" to set the owner as sa, I get the message 'The proposed new database owner is already a user in the database.' I'm attempting to do this as sa. What is causing this and how do I correct it?

    Thanks for any assistance,

    Don Davis

  • Sounds like an orphaned user. Try running sp_change_users_login in report mode.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Try removing sa as a user from the database and then run this command....

    Prakash

    Prakash Heda
    Lead DBA Team - www.sqlfeatures.com
    Video sessions on Performance Tuning and SQL 2012 HA

  • I did not find an orphaned user and I could not remove sa from the database as dbo owned the objects. I did try setting the db owner to a user not in the database. That worked. Then I was able to set the owner to sa. Thanks for your suggestions.

    Don

Viewing 4 posts - 1 through 4 (of 4 total)

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