database owner

  • Hi,

    How to change database owner from current one to 'dbo'???

    Thnx

  • sp_changedbowner

    Changes the owner of the current database.

  • i tried exec sp_changedbowner 'dbo'

    but i get: Server: Msg 15007, Level 16, State 1, Procedure sp_changedbowner, Line 33

    The login 'dbo' does not exist.

    How to change it - such that database owner is dbo.

     

  • Can't do it to dbo... dbo maps to the login name of the owner.

    If you do:

    sp_changedbowner 'aaron'

    It will make the login aaron the owner (represented as dbo) in the current database.

    That make sense?

  • hi,

    thnx - makes sense.

     

  • I'd opt to make the owner 'sa' - this login always exists on every SQL Server. Whereas 'aaron' or another arbitrary name might not, then causing you potentially many issues. If a user really needs 'full' control of a database just add them to the db_owner role.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

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

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