How to obtain information about user roles and user permissions on tables

How to obtain information about user roles and user permissions on tables

Post by Anatole V. le Pekhi » Sat, 11 Nov 2000 04:00:00



Hello Gurus!

Thank you for your patience...

Tell me please, how to obtain information about user roles and user
permissions on tables.

First question can be solved via exec sp_helpuser 'name' but how to work
with result set of this stored procedure?
Could the answer be an example, please.

Second question unclear at all. For sure I can do bit reversing on
sy*isions and so on, but maybe there is more simple way?..

Thanks in advance.

Anatole V. le Pekhin

 
 
 

How to obtain information about user roles and user permissions on tables

Post by Bradley M. Smal » Fri, 17 Nov 2000 04:00:00


Here is a piece of code I have been playing with that outputs grant and
revoke lines based on the current databases. Hope it helps

-- Bradley

SELECT CASE protecttype WHEN 204 THEN 'GRANT_W_GRANT'
    WHEN 205 THEN 'GRANT'
    WHEN 206 THEN 'REVOKE'
 END
 + ' EXECUTE ON ' + so.name  + char(10)
 + 'TO ' + su.name
FROM  sysprotects sp  JOIN sysobjects so  ON so.id = sp.id
   JOIN sysusers su  ON  su.uid = sp.uid
WHERE category=0
AND  xtype='P'
AND  action = 224



> Hello Gurus!

> Thank you for your patience...

> Tell me please, how to obtain information about user roles and user
> permissions on tables.

> First question can be solved via exec sp_helpuser 'name' but how to work
> with result set of this stored procedure?
> Could the answer be an example, please.

> Second question unclear at all. For sure I can do bit reversing on
> sy*isions and so on, but maybe there is more simple way?..

> Thanks in advance.

> Anatole V. le Pekhin



 
 
 

1. How to obtain information about user roles and user permissions on tables

Hello Gurus!

Thank you for your patience...

Tell me please, how to obtain information about user roles and user
permissions on tables.

First question can be solved via exec sp_helpuser 'name' but how to work
with result set of this stored procedure?
Could the answer be an example, please.

Second question unclear at all. For sure I can do bit reversing on
syspermisions and so on, but maybe there is more simple way?..

Thanks in advance.

Anatole V. le Pekhin

2. SE ├ęS PROGRAMADOR DE VB???

3. security permissions of roles\users on table rows

4. Another Rushmore question

5. How to obtain user's permissions

6. TDataSource.OnUpdataData called twice

7. Error 8198: Could not obtain information on Windows NT grou/user

8. problem: PLSQL and LONG RAW datatypes

9. Error: 8198, Could not obtain information about Windows NT group/user

10. New Roles are not implying permissions for users.

11. New Web Site - Users, Roles Permissions

12. user/role execute permission question

13. Scripting Role Permissions and Users