Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Missing loginaccount: can not recreate

Author  Topic 

Akubra
Starting Member

2 Posts

Posted - 2008-05-15 : 01:30:00
Due to a server move of our SQL databases something 'strange' happend: one of the login accounts disappeared.

When I try to recreate it, SQL gives me back an error stating the account already exists. Read something about loginaccounts becoming orphaned but don't know how to solve it. The login account is a Windows (AD) account and not a SQL account (both requiring different methods of fixing?). How can I recreate just this single account?

Any help would be greatly appreciated!!!

P.

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2008-05-15 : 02:14:45
what happens if you just add the AD account to the security area without assigning any specific database permissions? if that works, check the properties on the newly added user and you should see that the database permissions are in place as well.



-ec
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-05-15 : 08:35:00
If just for Single account, you can delete that login a/c user in database which you moved and recreate it from security-login
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-05-15 : 22:43:52
>> When I try to recreate it, SQL gives me back an error stating the account already exists.

Are you talking about db user or sql login? If sql login is there, you can remap that user with sp_change_users_login. If not, create sql login then remap it.
Go to Top of Page

Akubra
Starting Member

2 Posts

Posted - 2008-05-15 : 22:48:18
That is the whole problem: I can't recreate the account because SQL still thinks the account is there (but I can't find it anywhere).

BTW This is an AD login account and not a SQL account.

Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-05-15 : 22:53:39
Did you see it under sql logins, it's different from db user.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2008-05-16 : 03:53:45
go to all databases where the login exists as a user
drop them there...
then add the windows login

also it might be helpful if you describe exactly what you did...if you used the GUI or ran a query

HTH

--------------------
keeping it simple...
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2008-05-16 : 08:06:45
...or look up sp_change_users_login in BOL

--
Lumbago
Go to Top of Page
   

- Advertisement -