Example,
I have a create a windows login DOMAIN\GROUP01
, and mapped that login to a database DATABASE01
with lets say DB_OWNER
permissions
I want to change the login name, I went into Active Directory, changed the name to DOMAIN\GROUP01_OLD
, and ran the following query in SQL, on the master
db :
alter login [DOMAIN\GROUP01] with name = [DOMAIN\GROUP01_OLD]
So far so good, the login is renamed.
Now comes the actual problem. When I look into the security->users
settings of DATABASE01
, the login still has the old value; DOMAIN\GROUP01
How can I change this at one level, instead of doing it at multiple databases?
Reason I am asking this, i need to rename +/- 500 groups, I am doing this with scripts. This will take a hell of time if I need to change it manually for all databases at DOMAIN\GROUP01
level
PS: I am a SQL newbie, so please bear with me.