Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Unable to remove user from db_owner role membership...why? Expand / Collapse
Author
Message
Posted Wednesday, September 21, 2011 2:20 PM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, August 19, 2014 2:25 PM
Points: 24, Visits: 95
George, in the original post dbajunior said "I uncheck db_owner, then click OK." Well in my version of SQL Server 2008, the login mapped to dbo is not listed in the users list of the databases except as dbo, you can not map a login that is already in the database as another user as dbo, and the in the user mapping area of the logins properties, trying to remove the check for db_owner generates an exception 'cannot use special principal dbo' so he would never be able to successfully click "OK".

dbajunior; In your original attempt were you looking at the user as listed in the security\users folder of the database, or the user mapping page of the login properties under the server's security\logins folder?

Also just for fun and giggles why don't you run "sp_Changedbowner 'sa' " in that databae. Then try see if your user in listed in the security\users folder of the database. If it is not then it was mapped to the "dbo" user. If you see it there then that was not the issue.
Post #1179000
Posted Thursday, September 22, 2011 3:59 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Saturday, October 18, 2014 5:21 PM
Points: 5,877, Visits: 13,005
ejoell 66477 (9/21/2011)
George, in the original post dbajunior said "I uncheck db_owner, then click OK." Well in my version of SQL Server 2008, the login mapped to dbo is not listed in the users list of the databases except as dbo, you can not map a login that is already in the database as another user as dbo, and the in the user mapping area of the logins properties, trying to remove the check for db_owner generates an exception 'cannot use special principal dbo' so he would never be able to successfully click "OK".


it can happen if the user is defined in the database already and then that user creates the database by attach or restore, user will also become dbo.


---------------------------------------------------------------------

Post #1179256
Posted Wednesday, April 10, 2013 2:43 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, August 15, 2014 4:10 PM
Points: 7, Visits: 86
I think this should work.

sp_change_users_login 'dbo', 'dbo', 'Update_one'

The issue at least to me - was my dbo was mapped to the wrong user. And that is a no-go.

You will get this error:
"Terminating this procedure. 'dbo' is a forbidden value for the login name parameter in this procedure."

In my case, I checked the user properties, and the bad map was gone. I was able to continue after this fix and drop the login.

Post #1441028
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse