Home > Archive > MS SQL Server > October 2006 > Killing a user/login









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Killing a user/login
starritt@gmail.com

2006-10-24, 6:29 pm

I have a user that I need to get rid of in a database. I tried to us
sp_droplogin but got an error regarding the user, I used sp_user and
then was told that the user owns objects and cannot be dropped.

This user has over 300 objects encompassing stored procedures, views,
tables and so on -- and I don't have enterprise manager. Is there a
quick and clean way of just zapping the user and everything it owns?!

Essentially I need to create a script to send to somebody to do this --
their user and objects are all out of wack.

James

Arnie Rowland

2006-10-24, 6:29 pm

It's not really clear what you are attempting to accomplish.

Removing a user is easy, removing all objects owned by that user isn't very
difficult either.

BUT, do you really want the objects to be DELETED from the database?

OR do you really want the user to be removed and the objects kept -but just
assigned to other ownership?

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous


<starritt@gmail.com> wrote in message
news:1158605443.645160.227840@e3g2000cwe.googlegroups.com...
>I have a user that I need to get rid of in a database. I tried to us
> sp_droplogin but got an error regarding the user, I used sp_user and
> then was told that the user owns objects and cannot be dropped.
>
> This user has over 300 objects encompassing stored procedures, views,
> tables and so on -- and I don't have enterprise manager. Is there a
> quick and clean way of just zapping the user and everything it owns?!
>
> Essentially I need to create a script to send to somebody to do this --
> their user and objects are all out of wack.
>
> James
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com