Home > Archive > SQL server exams > May 2003 > find role permissions





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author find role permissions
sjgross

2003-05-02, 11:47 am

Hello all,

Is there any way to list all of the permissions of a role in Query Analyzer?

I know you can use EXEC sp_helprole to list the roles, but I want to see in a list the role's permissions to all the tables in the Database.

In Enterprise Manager you can click on the roles and then choose the role name and then click on the permissions button. However, the window is small and cannot be resized.
2lazybutsmart

2003-05-02, 9:45 pm

sp_helprotect is quite the best answer to your question. there isn't a stored proc that will give u all permissions on a specific user-defined role (as far as my feeble knowledge is concerned). This one is the closest to that requirement and it will give u a list of all permissions in a current database. The list includes roles, users and object info. You can then make your own mechanisim to filter out the role info if you want. That requires a little effort. Give it a try.
Just type

EXEC sp_helprotect (without any paramaters).

Remember, roles that have no permissions assigned to them will not appear in the list.

If, on the other hand, you're looking for a stored procedure that lists permissions for fixed server roles or fixed database roles then use:

sp_dbfixedrolepermission for fixed db roles, or
sp_srvrolepermission for fixed server roles.

Hope that helps
2lbs
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net