BUG: Error 15023, 15024 or 21002 Occurs When You Try to Add a Domain User or a Domain Group to the Database (819261)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
BUG #: 363065 (SQL Server 8.0) SYMPTOMSWhen you try to provide access to a domain user or a domain
group to a database by using SQL Server Enterprise Manager, you might receive
one of the following error messages: Error 15023:
User or role '<name>' already exists in the current database.
Error 15024: The group '<name>'
already exists in the current database.
Error 21002: [SQL-DMO]User
'<name>' already exists.
CAUSEThis problem can occur when an existing database role or
user name is the same as the domain user or group name that you are trying to
add to the database.STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are
listed at the beginning of this article.
WORKAROUNDTo work around this problem, use either of the following
methods:
- Add the domain user or the domain group at the database
level. To do so, follow these steps:
- Start Enterprise Manager.
- Expand Microsoft SQL Servers, and then
expand the SQL Server group that contains your
server.
- Expand SQL Server, and then
expand Databases.
- Expand the Database that you
want to provide access to the domain user or domain group.
- Select, right-click Users, and then
click New Database User.
- In the Database User Properties - New
User dialog box, type the complete domain group or domain user in the
Login name text box. For example, domainName\userName or
domainName\groupName.
- Click OK.
Specify the User or Group Name with the Domain Name
- Start Enterprise Manager.
- Expand Microsoft SQL Servers and then
expand the SQL Server group that contains your
server.
- Expand Security.
- Select and right-click Logins, and
then click New Login.
- In the SQL Server Login Properties - New
Login dialog box, type the complete domain group or domain user name
in the Name text box. For example, domainName\userName or
domainName\groupName.
- Click theDatabase Access
tab.
- Under Specify what databases can be accessed by
this login, click to select the database that you want to provide
access to.
- For all the selected database, replace the user or
group name under User with domainName\userName or
domainName\groupName.
- Click OK.
REFERENCESFor more information about SQL Server database logins, visit
the following Microsoft Web site: Creating
SQL Server LoginsFor more information about the sp_grantdbaccess stored procedure, visit the following Microsoft Web
site: sp_grantdbaccess
Modification Type: | Minor | Last Reviewed: | 11/30/2005 |
---|
Keywords: | kberrmsg kbDatabase kbbug KB819261 kbAudDeveloper |
---|
|