Salı

User Already Exists in the Current Database - after moving databases or deleting users

I have encountered this nasty little error on SQL Server 2005 after moving the database to a new server...
I did not restore the master database, just restored the content db's to the clean installation.

And then of course, I had to create the logins. When I tried to create SQL logins, sql server nagged about
The server principal 'TPG01_reader' already exists.


So here is what i did:

- deleted the user i have created (because even though it give this error , still creates the user)
- removed the user from database permissions: Rigth clicking  database > properties> permissions (screenshot below)


- Remove the user from the related database's security section (screenshot below)
Attention, not the general  security section, this is the database> security.


Voila!
now you can create your user ;)

Hiç yorum yok:

Yorum Gönder