March 27, 2024 at 8:25 pm
I have an orphaned user, but when I view the user properties in SSMS the General tab shows a Login name, that does not match the User name.
See below:
This SQL Login name does not exist in the SQL Login in sys.server_principals as the SQL Login was dropped from the SQL Instance.
I have tried to find the t-sql that will list out the above Login name. Can someone point me to which system view contains the Login name?
March 27, 2024 at 9:26 pm
View sys.database_principals will have the sid of the login (but not the login name itself). View sys.server_principals also has a sid.
If the login has been dropped, the sid may still be there but not link back to any active login.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply