DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: to find privilege for a role

  1. #1
    Join Date
    Apr 2001
    Posts
    21
    how to find what are the privilege given for a role

    Thanks

  2. #2
    Join Date
    Mar 2001
    Posts
    635
    Hi Joe,

    Try this

    Login in as sys and type the following command

    select grantee,granted_role from dba_role_privs;

    offcourse there is another couple of tables called as user_role_privs and role_role_privs

    select username,granted_role from user_role_privs;

    select role,granted_role from role_role_privs;


    Hope this helped

    Regards

    [Edited by santoshym on 05-31-2001 at 05:17 PM]
    Santosh

  3. #3
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by santoshym
    select grantee,granted_role from dba_role_privs;

    offcourse there is another couple of tables called as user_role_privs and role_role_privs

    select username,granted_role from user_role_privs;

    select role,granted_role from role_role_privs;
    The above will only list which roles have been granted to users and to other roles. It does not tell which system and object privileges have been granted to roles.

    I belive what Joe was asking for was to list all the system and object privileges that have been granted to a particular role. For example, to find out which privileges have been granted to DBA role, use the following two statements:

    SELECT table_name, privilege FROM dba_tab_privs WHERE grantee = 'DBA';

    SELECT privilege FROM dba_sys_privs WHERE grantee = 'DBA';
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width