question

jhowe avatar image
jhowe asked

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
sql-server-2008sql-server-2008-r2securityalter-user
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Usman Butt avatar image
Usman Butt answered
@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
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jhowe avatar image jhowe commented ·
hey I ended up changing the database owner and then i could do the required changes!
0 Likes 0 ·
Usman Butt avatar image Usman Butt commented ·
@jhowe Hmmm..So can I convert my comment into answer so you can accept ;)
0 Likes 0 ·
jhowe avatar image jhowe commented ·
Yes I would have done that but i am not able to convert your comment.
0 Likes 0 ·
Usman Butt avatar image Usman Butt commented ·
@jhowe I have converted my comment to answer ;)
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.