| Author |
Error21002 user name already exists
|
|
|
| Hi I am trying to give database access to a second database for a user and am
getting the error (Error 21002 username allready exists). Anyhow seems that
I ran into the problem before and ran a command from query analyzer and it
seemed to fix it. Anyhow can not remember the command I used.
thanks.
--
Paul G
Software engineer.
| |
| ChrisR 2005-08-17, 8:23 pm |
| sp_dropuser?
"Paul" <Paul@discussions.microsoft.com> wrote in message
news:2E83131E-CB3C-4824-882B- 2DE85A6B6975@microso
ft.com...
> Hi I am trying to give database access to a second database for a user and
> am
> getting the error (Error 21002 username allready exists). Anyhow seems
> that
> I ran into the problem before and ran a command from query analyzer and it
> seemed to fix it. Anyhow can not remember the command I used.
> thanks.
> --
> Paul G
> Software engineer.
| |
| Sue Hoegemeier 2005-08-18, 3:23 am |
| Sounds like it may have been sp_change_users_logi
n
See books online for details.
-Sue
On Wed, 17 Aug 2005 16:39:01 -0700, "Paul"
<Paul@discussions.microsoft.com> wrote:
>Hi I am trying to give database access to a second database for a user and am
>getting the error (Error 21002 username allready exists). Anyhow seems that
>I ran into the problem before and ran a command from query analyzer and it
>seemed to fix it. Anyhow can not remember the command I used.
>thanks.
| |
| doller 2005-08-18, 3:23 am |
| Hi,
U are searching for this
exec sp_addrolemember N'db_datareader', N'username
hope this helps u
from]
killer'
| |
| Hari Prasad 2005-08-18, 9:33 am |
| Hi,
Seems that SID for the existing user inside the database is in mismatch with
Login inside syslogins. So goahead and use the
system stored procedure sp_change_users_logi
n (see books online) as Sue
pointed out to fix the mis match.
Thanks
Hari
SQL Server MVP
"Paul" <Paul@discussions.microsoft.com> wrote in message
news:2E83131E-CB3C-4824-882B- 2DE85A6B6975@microso
ft.com...
> Hi I am trying to give database access to a second database for a user and
> am
> getting the error (Error 21002 username allready exists). Anyhow seems
> that
> I ran into the problem before and ran a command from query analyzer and it
> seemed to fix it. Anyhow can not remember the command I used.
> thanks.
> --
> Paul G
> Software engineer.
| |
|
| Hi thanks for the response. the error I am getting now is 15023 user or role
already exists in the current database when I tried to give database access
of a second database to the user. I tried the sp_change_users_logi
n
'AUTO_FIX','username
' command. I am able to give the user access to one
dbase but not the other.
--
Paul G
Software engineer.
"Hari Prasad" wrote:
> Hi,
>
> Seems that SID for the existing user inside the database is in mismatch with
> Login inside syslogins. So goahead and use the
> system stored procedure sp_change_users_logi
n (see books online) as Sue
> pointed out to fix the mis match.
>
> Thanks
> Hari
> SQL Server MVP
>
>
>
>
> "Paul" <Paul@discussions.microsoft.com> wrote in message
> news:2E83131E-CB3C-4824-882B- 2DE85A6B6975@microso
ft.com...
>
>
>
| |
|
| it worked, thanks.
--
Paul G
Software engineer.
"Hari Prasad" wrote:
> Hi,
>
> Seems that SID for the existing user inside the database is in mismatch with
> Login inside syslogins. So goahead and use the
> system stored procedure sp_change_users_logi
n (see books online) as Sue
> pointed out to fix the mis match.
>
> Thanks
> Hari
> SQL Server MVP
>
>
>
>
> "Paul" <Paul@discussions.microsoft.com> wrote in message
> news:2E83131E-CB3C-4824-882B- 2DE85A6B6975@microso
ft.com...
>
>
>
|
|
|
|