Tuesday, March 27, 2012

Cannot remove dbo rights from a user

In the login properties on the Database Access tab, a user's name says
dbo instead of his name. I do not want him to have dbo permissions. I
cannot drop the db_owner permissions that he has on the database
because I get the error "Error 15405: Cannot use the reserved user or
role name 'dbo'."

How do I remove these permissions from this user?MK (mhedblom@.libertysite.com) writes:
> In the login properties on the Database Access tab, a user's name says
> dbo instead of his name. I do not want him to have dbo permissions. I
> cannot drop the db_owner permissions that he has on the database
> because I get the error "Error 15405: Cannot use the reserved user or
> role name 'dbo'."
> How do I remove these permissions from this user?

Obviously this person is the owner of the database. If you don't want
this, use sp_changedbowner to make someone else the DB owner.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||Unfortunately it was not that obvious. The properties of the database
did NOT have him as the owner. It showed the owner as our system
account. However, I ran sp_changedbowner anyway just as a test and it
removed his alias'. Strange but thank you so much!

Erland Sommarskog wrote:
> MK (mhedblom@.libertysite.com) writes:
> > In the login properties on the Database Access tab, a user's name says
> > dbo instead of his name. I do not want him to have dbo permissions. I
> > cannot drop the db_owner permissions that he has on the database
> > because I get the error "Error 15405: Cannot use the reserved user or
> > role name 'dbo'."
> > How do I remove these permissions from this user?
> Obviously this person is the owner of the database. If you don't want
> this, use sp_changedbowner to make someone else the DB owner.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||MK (mhedblom@.libertysite.com) writes:
> Unfortunately it was not that obvious. The properties of the database
> did NOT have him as the owner. It showed the owner as our system
> account. However, I ran sp_changedbowner anyway just as a test and it
> removed his alias'. Strange but thank you so much!

Have the database been restored/attached from a different server
instance?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspxsql

No comments:

Post a Comment