Wednesday, March 21, 2012

Mixed mode user name conflict

I'm adding a domain user and there appears to be massive confusion within
SQL 2000 Enterprise Manager when the the domain user is the same as the
mixed mode SQL authentication name, as in
Mixed Mode username = myUserName
Windows Domain Name = myDomain\MyUserName
attempting to give database access to the domain user thru the
Security->logins screen results in
Err 21002 SQL-DMO user 'myUserName'already exists
but you can add it through the database/users screen.
I haven't tried it with 2005 yet...Enterprise Manager isn't actually confused - it is just
preventing you from adding duplicate user names in the
database. The problem is that Enterprise Manager uses
different default database names for Windows logins
depending on how you add the user to the database
When you add the user myDomain\MyUserName to a database from
the Logins in Enterprise Manager, the default database user
name will be MyUserName.
When you add it to the database from the Database Users node
in Enterprise Manager, the default database user name is
myDomain\MyUserName.
When you go to add the user through either methods in
Enterprise Manager, you can modify the default user name for
the database. If you have or will have SQL logins with the
same names as Windows logins without the domain, add the
Windows logins to databases using the domain prefix.
Or you can avoid it by using Query Analyzer and using
sp_grantdbacess 'LoginName'
By default, the login name (with the prefix for windows
logins) will be used. You can specify your own database user
name but the default will work in your case.
-Sue
On Wed, 9 Aug 2006 12:13:26 -0600, "mark gross"
<mgross@.deq.idaho.gov> wrote:

>I'm adding a domain user and there appears to be massive confusion within
>SQL 2000 Enterprise Manager when the the domain user is the same as the
>mixed mode SQL authentication name, as in
>Mixed Mode username = myUserName
>Windows Domain Name = myDomain\MyUserName
>attempting to give database access to the domain user thru the
>Security->logins screen results in
> Err 21002 SQL-DMO user 'myUserName'already exists
>but you can add it through the database/users screen.
>I haven't tried it with 2005 yet...
>

No comments:

Post a Comment