Home > Archive > MS SQL Server > July 2005 > trying to add user to dbase with EM says already exists.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author trying to add user to dbase with EM says already exists.
Paul

2005-06-30, 8:23 pm

Hi I copied a dbase over to another machine and am trying set up a user.
Anyhow in users for the database there is nothing and in roles there is just
public
and the default roles db_accessadmin ect..
Anyhow I need to add a user and a role, when I try to add the user it says
that is is already there (error 15023) but there is nothing when selecting
users. I did notice in the sysusers
table (a system table used by the database) the user I am trying to add is
there. Is it necessary to delete the user from this table first?
Thanks.

--
Paul G
Software engineer.
Ravi

2005-06-30, 8:23 pm

Two ways to resolve this.
1. You can delete the user and add the user again
2. if you have customized permission to the user and you don't want to redo
all of them, use this system procedure

EXEC sp_change_user_login
'auto_fix','username
'
or
EXEC sp_change_user_login
'update_one','userna
me','loginname'



Refer sp_change_user_login
in BOL
--
Thanks & Rate the Postings.
-Ravi-


"Paul" wrote:

> Hi I copied a dbase over to another machine and am trying set up a user.
> Anyhow in users for the database there is nothing and in roles there is just
> public
> and the default roles db_accessadmin ect..
> Anyhow I need to add a user and a role, when I try to add the user it says
> that is is already there (error 15023) but there is nothing when selecting
> users. I did notice in the sysusers
> table (a system table used by the database) the user I am trying to add is
> there. Is it necessary to delete the user from this table first?
> Thanks.
>
> --
> Paul G
> Software engineer.

Paul

2005-06-30, 8:23 pm

Hi thanks for the response. Do I delete the user or record from the sysusers
table?

--
Paul G
Software engineer.


"Ravi" wrote:
[color=darkred]
> Two ways to resolve this.
> 1. You can delete the user and add the user again
> 2. if you have customized permission to the user and you don't want to redo
> all of them, use this system procedure
>
> EXEC sp_change_user_login
'auto_fix','username
'
> or
> EXEC sp_change_user_login
'update_one','userna
me','loginname'
>
>
>
> Refer sp_change_user_login
in BOL
> --
> Thanks & Rate the Postings.
> -Ravi-
>
>
> "Paul" wrote:
>
Hari Prasad

2005-06-30, 8:23 pm

Hi Paul,

Just execute command suggested by Ravi. It qutomatically syncronize the
sysusers with syslogins table.

Thanks
Hari
SQL Server MVP


"Paul" <Paul@discussions.microsoft.com> wrote in message
news:DD5957E4-5A11-4FD4-BAAB- 1FADBDB2CCB1@microso
ft.com...[color=darkred]
> Hi thanks for the response. Do I delete the user or record from the
> sysusers
> table?
>
> --
> Paul G
> Software engineer.
>
>
> "Ravi" wrote:
>


Paul

2005-06-30, 8:23 pm

Hi thanks for the reply, I tried runing it but get the runtime error
Server: Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'sp_change_user_logi
n'.
Here is what I tried to run
sp_change_user_login
'update_one','userna
me','Paul'


--
Paul G
Software engineer.


"Hari Prasad" wrote:

> Hi Paul,
>
> Just execute command suggested by Ravi. It qutomatically syncronize the
> sysusers with syslogins table.
>
> Thanks
> Hari
> SQL Server MVP
>
>
> "Paul" <Paul@discussions.microsoft.com> wrote in message
> news:DD5957E4-5A11-4FD4-BAAB- 1FADBDB2CCB1@microso
ft.com...
>
>
>

Ravi

2005-07-01, 3:23 am

Paul It is sp_change_users_Logi
n. Sorry my mistake.

--
Thanks & Rate the Postings.
-Ravi-


"Paul" wrote:
[color=darkred]
> Hi thanks for the reply, I tried runing it but get the runtime error
> Server: Msg 2812, Level 16, State 62, Line 1
> Could not find stored procedure 'sp_change_user_logi
n'.
> Here is what I tried to run
> sp_change_user_login
'update_one','userna
me','Paul'
>
>
> --
> Paul G
> Software engineer.
>
>
> "Hari Prasad" wrote:
>
Paul

2005-07-05, 1:23 pm

Thanks for the information, looks like it worked. Just had another question,
I have a field defined as varchar(1500) to hold up to 1500 characters.
Anyhow I noticed that when I view some text from sql analyzer, characters
that look like a small box are sometimes visible but I think this character
was not entered as I just copied and pasted some vb.net code into a textbox
and then used a procedure to write the characters to the database.

--
Paul G
Software engineer.


"Ravi" wrote:
[color=darkred]
> Paul It is sp_change_users_Logi
n. Sorry my mistake.
>
> --
> Thanks & Rate the Postings.
> -Ravi-
>
>
> "Paul" wrote:
>
Ravi

2005-07-05, 8:23 pm

Change the output mode from Grid to Text and see what happens

--
Thanks & Rate the Postings.
-Ravi-


"Paul" wrote:
[color=darkred]
> Thanks for the information, looks like it worked. Just had another question,
> I have a field defined as varchar(1500) to hold up to 1500 characters.
> Anyhow I noticed that when I view some text from sql analyzer, characters
> that look like a small box are sometimes visible but I think this character
> was not entered as I just copied and pasted some vb.net code into a textbox
> and then used a procedure to write the characters to the database.
>
> --
> Paul G
> Software engineer.
>
>
> "Ravi" wrote:
>
Paul

2005-07-05, 8:23 pm

ok thanks that seemed to work.
--
Paul G
Software engineer.


"Ravi" wrote:
[color=darkred]
> Change the output mode from Grid to Text and see what happens
>
> --
> Thanks & Rate the Postings.
> -Ravi-
>
>
> "Paul" wrote:
>
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com