PRB: Problem Creating New LoginID: Q73559
|
When trying to create a new login and user name, the following
message is received:
User already has a login under a different name.
This problem occurs only if the numerically last login [that is,
the login in the syslogins table with max(suid)] has been deleted
from the syslogins table and the username(s) associated with it
has not been deleted. Any login/user name combination created
thereafter may receive the above message.
In the sp_addlogin procedure, a unique identifier (suid) for a new
login is generated by using max(suid+1) in the query. If the
numerically last login in the syslogins table is deleted, its suid
will be reused by whatever login is created next. In addition, if
the user names previously associated with this suid were not
deleted, the mappings still exist from the syslogins table in
the master database to the sysusers table(s) in the other
database(s). Note that this is also the case if the last (n)
logins are deleted without deleting the associated user names,
since all the suid's will be reused.
The following are two examples of duplicate logins:
Under most circumstances, neither SAF nor the stored procedures notify the user to drop a login that has associated user names. Thus, whenever a login is to be deleted, ALL the user names associated with it (in one or several databases) must be deleted. This is mentioned on page 114 of the "Microsoft SQL Server System Administrator's Guide." This problem becomes immediately noticeable only if the numerically last login is dropped.
Keywords : kbother SSrvAdmin
Version : 4.2
Platform : OS/2
Issue type :
Last Reviewed: March 11, 1999