SQL 2005. and SQL Management studio I have a user 'myuser' in a SQL DB
'mydatabase' under security users. When I try to delete him, I get error
says DB principal owns schema and cant be dropped. I try to remove his role
as DBOwner and it says login name must be specified. (The window above has
his username shown but the loginname field is blank and greyed out/
disabled. I added him to the overall sql DB users / security and it allowed
me to. When I tried to map him to the 'mydatabase' it says 'myuser' already
exists. How can I get rid of this user in the 'mydatabase' DB. I have other
users in the DB that I can delete.
Thanks
bucThe key seems to be that the user owns a schema. See what schema the user ow
ns (schema folder) and
either drop the schema (if empty) or change the owner of the schema to someb
ody else.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<Buc> wrote in message news:OpjsV6ceGHA.1456@.TK2MSFTNGP04.phx.gbl...
> SQL 2005. and SQL Management studio I have a user 'myuser' in a SQL DB 'my
database' under security
> users. When I try to delete him, I get error says DB principal owns schema
and cant be dropped. I
> try to remove his role as DBOwner and it says login name must be specified
. (The window above has
> his username shown but the loginname field is blank and greyed out/ disabl
ed. I added him to the
> overall sql DB users / security and it allowed me to. When I tried to map
him to the 'mydatabase'
> it says 'myuser' already exists. How can I get rid of this user in the 'my
database' DB. I have
> other users in the DB that I can delete.
> Thanks
> buc
>|||Make sure there are no objects owned by this user. If there are any, you
should change the owner and then you should be able to delete this user from
the database.
Anith|||That worked, he had a entry under the schema folder which had zero objects.
I deleted his entry and it worked. Thanks
"Anith Sen" <anith@.bizdatasolutions.com> wrote in message
news:e52E89ceGHA.1276@.TK2MSFTNGP03.phx.gbl...
> Make sure there are no objects owned by this user. If there are any, you
> should change the owner and then you should be able to delete this user
> from the database.
> --
> Anith
>
No comments:
Post a Comment