June 27, 2007 at 6:08 am
Hello2all, maybe someone can help a sql novice. In our SQL Server Logins we have users that have no user mapping anymore.
When opening the props of those users, they have no checkmarks anymore next to the database names under "users mapped to this login". Since they then have no db access anymore I can consider these as 'ophans' and it should be safe to delete them.
What I am looking for is some tsql code I can run to check all sql logins for this situation. Is this possible? Thanks in advance & sorry if question not that clearly formulated.
June 27, 2007 at 6:22 am
you can use sp_change_users_login 'report' for each database to check if the user is a orphaned user in SQL Server.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
June 28, 2007 at 3:46 am
Thanks Sugesh I learned about the SP.
Apart from this there is a good KB :
http://support.microsoft.com/kb/314546/en-us
http://support.microsoft.com/kb/246133/en-us
http://support.microsoft.com/kb/137983/en-us
"More Green More Oxygen !! Plant a tree today"
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply