DBAsql-1046554
Ten Centuries
Points: 1088
More actions
August 13, 2009 at 3:22 am
#208566
Please let me know the table name where i can get information about the user like user name, login name, roles, privileges of a particular SQL server 2005 database
Thanks
luckysql.kinda
SSCertifiable
Points: 7816
August 13, 2009 at 3:44 am
#1038567
oK
SELECT SU.name AS username, SL.dbname, SL.name AS loginname
FROM sys.syslogins SL
RIGHT OUTER JOIN sysusers SU
ON SL.sid = SU.sid
Add some other columns from syslogins table as per your requirement
-LK
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply