September 8, 2005 at 9:25 am
I restored a development DB from a production backup. I am only interested in creating 1 LOGIN (SQL Server Login) being setup as a USER in this DB.
When I attempt to CREATE this LOGIN (under E/M Security) and specify the default DB as the newly restored DB, I receive the error: "User or Role already exists in the current database"
I know how to do a Transfer Logins but I only need this 1 SQL Server user account setup.
How do I DELETE the User or Role from this DB when I don't see the User under USERS of ROLES in the DB? (I do see the SQL Login under Security/Logins)
September 9, 2005 at 7:17 am
Run "select * from sysusers" in the database and locate the entry for this user. If found delete it from sysusers.
Anurag
September 9, 2005 at 10:59 am
u can do as anurag said but are u deleting sa user if so then u cannot delete that user.
if else then u can delete it from login window.
from
killer
September 9, 2005 at 1:26 pm
It sounds like you have an orphaned user. Look up orpaned user in the BOL and they describe how to solve this issue.
-SQLBill
September 9, 2005 at 2:26 pm
Thanks for the responses. Your replies helped me perform the following:
On Ent Mgr, I select PROPERTIES for the registered server name, then I selected the SERVER Properties tab and Checked the "allow direct system table updates" box
I then queried the Application DB system table SysUser (as you suggested) and deleted the USER. I also deleted the Login to ensure bogus SID's were removed - and finally re-added both the Login then User.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply