Re: Cannot Drop Users



"sp_change_users_login" is not used to list your db users, it's for listing your orphaned db users. Check out BOL for more info about this SP.

Use the following query to see your users in that db:
USE <db_name>
SELECT * FROM sysusers

Use the following query to drop a user from a db:
DELETE FROM sysusers WHERE uid = 6

--
Ekrem Önsoy



"Zekske" <Zekske@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:079828A9-2456-484E-AC55-F9B02FBE9F2A@xxxxxxxxxxxxxxxx
can I do this with de sp_dropuser?

"Ekrem Önsoy" wrote:

How about droping those users using their UIDs?

--
Ekrem Önsoy



"Zekske" <Zekske@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5F1C729C-D7CC-4E48-BFB7-B3124DB0A7BB@xxxxxxxxxxxxxxxx
> Strange problem.
> I attached databases from a SQL7.0 server in domain A on a SQL 2000 > server
> in domain B.
> When I try to drop de database users with the sp_dropuser command I get
> the
> message user does not exists.
> Strange thing is that when I execute sp_helpuser I can see the users > but
> when I execute SP_Change_users_login 'report', there not listed.
> Those users are domainusers.
>
> Anyone an idea what's causing this. the only way to delete them is via > the
> EM or via the sysusers.
>
> Regards


.



Relevant Pages

  • Re: Clean up Broken Aliases
    ... > I'm cleaning up excess logins on our SQL Server 2000 server. ... > databases started life as SQL Server 6.5 databases on a different server. ... I have included some sample data from sysusers ... > to update system tables and delete these entries for these broken aliases? ...
    (microsoft.public.sqlserver.security)
  • Re: Sysusers Table
    ... The number of users in the sysusers table is 86. ... type of licensing scheme you are using. ... you want to connect the SQL Server. ... connect to SQL Server, does that still require 2 CALS or just 1? ...
    (microsoft.public.sqlserver.server)
  • Re: Clean up Broken Aliases
    ... > I'm cleaning up excess logins on our SQL Server 2000 server. ... > databases started life as SQL Server 6.5 databases on a different server. ... I have included some sample data from sysusers ... > to update system tables and delete these entries for these broken aliases? ...
    (microsoft.public.sqlserver.security)