3

I know a role name and want to find all users in this role. How do I acheive this in SQL Server 2000 (in the SQL script, not in Management Studio or other tool)?

2 Answers 2

4

You can use the following stored procedures:

For fixed server roles, the stored procedure is sp_helpsrvrolemember:

exec sp_helpsrvrolemember 'role'

For general roles, the stored procedure is sp_helprolemember:

exec sp_helprolemember 'role'
0

Just use SQL-DMO: Replace rolename with your role

exec sp_helprolemember rolename

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.