June 17, 2011 at 12:18 pm
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!
June 17, 2011 at 1:14 pm
It probably means the database was created as that windows user. Check the owner of the database.
K. Brian Kelley
@kbriankelley
June 27, 2011 at 6:26 am
[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]
June 27, 2011 at 6:26 am
[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]
June 27, 2011 at 6:32 am
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