-1

My user was deleted from the Active Directory and recreated. When running the select suser_sid, I notice that it shows the old SID.

Is there a way to update it to my new SID? I am DBA Admin on SQL Server

Rick
  • 2,146
  • 18
  • 62
  • 92

1 Answers1

0

You can't ALTER the SID of a LOGIN, no (notice there is no SID option in ALTER LOGIN (Transact-SQL)). You'll need to recreate the LOGIN by dropping the old one and recreating it and giving it the old permissions.

This will orphan any associated USERs, so you will then need to remap them to the new LOGIN using ALTER USER in the databases it has a login in:

ALTER USER [Domain\User] WITH LOGIN = [Domain\User];
Larnu
  • 61,056
  • 10
  • 27
  • 50
  • My access was via an AD group to SQL Server. I had an old login with my user that I wasn't really using, so I deleted it. I also played around with [this](https://serverfault.com/questions/767094/change-sql-server-user-sid) registry setting as well. After deleting my login, I rerun the select suser_sid and got my new SID. – Rick Apr 14 '20 at 18:24