Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Logins Similarity Comparison

Author  Topic 

dbalearner
Constraint Violating Yak Guru

272 Posts

Posted - 2014-02-03 : 17:08:30
Patrons

Could you please let me know how to compare 2 logins on the Security on SSMS as they are identical or different?

OR
if the 2 logins were identical how to LIST them also.


I have tried with this query but not getting required output

SELECT * FROM [master].[sys].[server_principals]
WHERE name NOT IN (SELECT name FROM [master].[sys].[server_principals])

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2014-02-03 : 17:30:10
what do you mean by "identical or different"? You mean for two different logins on the same server do they net out to all the same server roles, database mappings, db object permissions, etc? Or perhaps you mean do two different database users map to the exact same server login? Obviously two logins on the same server cannot have the same name because they must be unique - so not sure what you're asking.





Be One with the Optimizer
TG
Go to Top of Page

dbalearner
Constraint Violating Yak Guru

272 Posts

Posted - 2014-02-03 : 19:00:01
I have 2 logins with different names. All I need to do is like a comparison table to get the logins whether they were different to each other or the same to their properties.

I have used the query but could not identify the 'IDENTICAL' nature between the 2 logins.

Can you let me know. Thanks
Go to Top of Page
   

- Advertisement -