x

cannot alter the user dbo ARGH...

Hello i have a login [DOMAIN\\SQLService] which somehow has been associated with db_owner and dbo instead of SQLService and db_datareader... How do you remap a login from dbo??? i've tried reassociating the login with it's own user etc. but it won't let me remap... i've run into issues like this before why is it such a pain when it comes to users and logins???

 LoginName            DBName    UserName    UserOrAlias
 DOMAIN\SQLService    DB        db_owner    MemberOf
 DOMAIN\SQLService    DB        dbo            User    

I want to be

 LoginName            DBName    UserName           UserOrAlias
 DOMAIN\SQLService   DB        db_datareader       MemberOf
 DOMAIN\SQLService    DB        DOMAIN\SQLService  User    
more ▼

asked Jun 11, 2012 at 09:59 AM in Default

avatar image

jhowe
1.1k 56 60 66

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

@jhowe Who is the actual owner of the database? What have you tried so far? What error you have got? Have you tried

 sp_droprolemember 'db_owner', 'DOMAIN\SQLService'
 GO
 sp_addrolemember 'db_datareader', 'DOMAIN\SQLService'
 GO
more ▼

answered Jun 11, 2012 at 10:39 AM

avatar image

Usman Butt
14.9k 6 13 21

hey I ended up changing the database owner and then i could do the required changes!

Jun 12, 2012 at 12:07 PM jhowe

@jhowe Hmmm..So can I convert my comment into answer so you can accept ;)

Jun 12, 2012 at 12:15 PM Usman Butt

Yes I would have done that but i am not able to convert your comment.

Jun 14, 2012 at 10:37 AM jhowe

@jhowe I have converted my comment to answer ;)

Jun 14, 2012 at 11:51 AM Usman Butt
(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x2221
x788
x218
x1

asked: Jun 11, 2012 at 09:59 AM

Seen: 2015 times

Last Updated: Jun 14, 2012 at 11:54 AM

Copyright 2018 Redgate Software. Privacy Policy