How do I remove or change the schema owner for db_owner?

  • I am trying to remove/change the schema owner for db_owner. It is currently one of our Windows users, but I want to change it to 'sa'.

    When I try to drop the Windows user from the database, I get the message,

    "Msg 15138, Level 16, State 1, Line 2

    The database principal owns a schema in the database, and cannot be dropped."

    When I query INFORMATION_SCHEMA.SCHEMATA, it shows that Windows login as the SCHEMA_OWNER of db_owner.

    When I look at the Database Role Properties, it shows the Owner as 'dbo' and the only Role Members shown is 'dbo'.

    When I look at the Database Properties --> Files, the Owner is 'sa'.

    How can the Database Role Properties shows 'dbo' as the owner, yet it's really the Windows user? And how can I remove this Windows user as the owner?

    I'm so confused! :crazy:

    Thanks!

  • It probably means the database was created as that windows user. Check the owner of the database.

    K. Brian Kelley
    @kbriankelley

  • [font="Arial Narrow"][font="System"][font="Times New Roman"][font="Verdana"][font="Arial Black"][/font][/font][/font][/font][/font][font="Arial Narro[font="Comic Sans MS"][font="Tahoma"][font="Verdana"][/font][/font][/font]w"][/font]

  • [font="Arial Narrow"][font="System"][font="Times New Roman"][font="Verdana"][font="Arial Black"][/font][/font][/font][/font][/font][font="Arial Narro[font="Comic Sans MS"][font="Tahoma"][font="Verdana"][/font][/font][/font]w"][/font]

  • santosh.say (6/27/2011)


    [font="Arial Narrow"][font="System"][font="Times New Roman"][font="Verdana"][font="Arial Black"][/font][/font][/font][/font][/font][font="Arial Narro[font="Comic Sans MS"][font="Tahoma"][font="Verdana"][/font][/font][/font]w"][/font]

    Very well said!

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

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