error 21770: the user cannot be found in the users collection

error 21770: the user cannot be found in the users collection

Post by Ammy » Thu, 20 Jan 2000 04:00:00



Hi,
I have problems with my SQL logins (like security manager finds orphans but
dropping users, orphans or groups does not help. I think it is a mess now
and I am searching for a solution.) Now I get error 21770, but this error is
not in the books on line. I get the error when I dubble click a login in the
enterprise manager.
Any ideas?
Thanks,
Ammy
 
 
 

error 21770: the user cannot be found in the users collection

Post by Jaime McGeath » Thu, 20 Jan 2000 04:00:00


They're pobably* out in your system tables even though they show up
as removed in EM.  You need to use the sp_dropuser, sp_droplogin,
sp_droprole etc procedures to get rid of these.

Jaime


Quote:> Hi,
> I have problems with my SQL logins (like security manager finds orphans
but
> dropping users, orphans or groups does not help. I think it is a mess now
> and I am searching for a solution.) Now I get error 21770, but this error
is
> not in the books on line. I get the error when I dubble click a login in
the
> enterprise manager.
> Any ideas?
> Thanks,
> Ammy


 
 
 

1. Error 21770 Adding Login in SEM and User with SP_ADDUSER

Hi.

When I try to add a new user I'm getting error described below, but the
workaround didn't work for me.
New user can't login and can't be dropped. When trying to make any changes
to a new user I just created I'm getting the same errors(21770, 15175). I
have run DBCC CHECKDB ( 'database_name' ) on al DB's to no avail. I run MS
SQL 6.5 SP5 on WinNT3.51 SP5. I'll appreciate any suggestions.

Thanx,
Mark

http://support.microsoft.com/support/kb/articles/q223/9/99.asp
BUG: Error 21770 Adding Login in SEM and User with SP_ADDUSER
The information in this article applies to:
Microsoft SQL Server version 6.5

SYMPTOMS
After you grant database access through sp_adduser to a login that was
created using Enterprise Manager, the following error message (Error 21770)
occurs when you edit the login in Enterprise Manager:

   The name <username> was not found in the Users collection.

If you delete the user from the database and then try to drop the login, the
following error message might appear (Error 15175):

   <SQL Server> Login 'user' is aliased or mapped to a user in one or more
   database(s). Drop user or alias before dropping login.

WORKAROUND
To work around this problem, do one of the following:

When you add the login in SQL Enterprise Manager, specify a default database
and a permit database.
In Enterprise Manager, expand
Servername/Databases/databasename/Groups/Users. Right-click Public and click
refresh.

STATUS
Microsoft has confirmed this to be a problem in SQL Server version 6.5.

MORE INFORMATION

Steps to Reproduce Behavior
1. In the SQL Enterprise Manager, define a new login (for example, user1).

2. Open a query window, chose pubs as the database, and run the following
code:

   sp_adduser user1, user1

   SQL Server returns the following message: "New user added."

3. Go to Enterprise Manager, and refresh Logins.
4. Double-click user1 login.

RESULT: The following error message appears:

   Error 21770: The name 'user1' was not found in the Users collection.

You might also experience this error when you try to edit permissions for
the user.
This error also occurs when adding a login through sp_addlogin.

--
Mark Nowaczyk

2. CONTRACT PROGRESS/MFG*PRO DEVELOPER SOUGHT - EUROPE

3. Error: 21770, I can't set user's security permissions

4. SQL request-live

5. Error 21770 Adding Login in SEM and User with SP_ADDUSER

6. Btrieve on Token-Ring networks

7. Error 21770 name not in database collection during XFERAGNT

8. getting "incompatible datatypes in expression/assignment error"

9. Error 21770 name not in database collection...

10. error: Cannot set user when user logs in

11. sp_adduser: Name not found in Users collection

12. 21776 - DBO not found in user collection

13. Name not found in users Collection