Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Droping and adding new user
Hi All,

I am having a serious problem of removing and adding again an user in a
database.

Microsoft SQL Server  2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack

Somehow, the user was created earlier but was not able to run query
assigned to him. As a result I wanted to drop and recreate the user.

I have done many possible things to create the users again with the
same user id but failed.

1. I tried to delete this user from the enterprsie manager security-->
logins-->user1
It deletes but when I try to add again, it gives me error message
(Error 15023: user or role u'user1' already exist).

2. Then I tried in the db:
delete sysusers where name='user1'
it deletes the user1.

3. Again tried adding, got the message in 1.

4. Then I tried

use db1
EXEC  sp_change_users_logi
n 'Update_One', 'user1', 'user1'

Server: Msg 15291, Level 16, State 1, Procedure  sp_change_users_logi
n,
Line 88
Terminating this procedure. The User name 'user1' is absent or invalid.

I also tried master database and ran the following.

EXEC sp_droplogin 'user1'
The login 'user1' does not exist.

But If I try to add the login user1, get the error message.
Error 15023: user or role u'user1' already exist

I also ran the following when I got Ad hoc error message
execute sp_configure "allow updates",1
go
reconfigure with override
go


Could you please tell me how I can solve this problem.

I do highly appreciate your help.

Thanks a million in advance.

best regards,
mamun


Report this thread to moderator Post Follow-up to this message
Old Post
microsoft.public.dotnet.languages.vb
08-23-05 06:23 PM


Re: Droping and adding new user
microsoft.public.dotnet.languages.vb (mamun_ah@hotmail.com)  writes:
> 2. Then I tried in the db:
> delete sysusers where name='user1'
> it deletes the user1.

You did what? You should only perform operations on system tables if
instructed so by a Microsoft Support Professional, or if you know
exactly what you are doing.

I would recommend that you open a case with Microsoft to sort this out.
Most likely, this will require more manual repairs, and I certainly
does not want to try to give directions from a distance.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp


Report this thread to moderator Post Follow-up to this message
Old Post
Erland Sommarskog
08-24-05 01:24 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:55 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006