Home » RDBMS Server » Server Administration » Roles??
Roles?? [message #51759] Wed, 12 June 2002 13:09 Go to next message
Nita
Messages: 34
Registered: March 2002
Member
How can I find what privileges are included in a role?

I'm running 8i.

Thank you
Re: Roles?? [message #51761 is a reply to message #51759] Wed, 12 June 2002 13:29 Go to previous messageGo to next message
alapps
Messages: 11
Registered: June 2002
Junior Member
How can I find what privileges are included in a role?

Use Oracle Enterprise Manager(OEM) graphical interface under Security - Roles - "Your role" and view the associated privileges

or

Query the following:
ROLE_SYS_PRIVS
- System privileges granted to a role
ROLE_TAB_PRIVS
- Table privileges granted to a role
ROLE_ROLE_PRIVS
- Other roles granted to a role

Good luck
Re: Roles?? [message #51816 is a reply to message #51759] Fri, 14 June 2002 11:59 Go to previous message
Grant
Messages: 578
Registered: January 2002
Senior Member
PROMPT Roles granted to user

SELECT granted_role,admin_option,default_role
FROM dba_role_privs
WHERE grantee=UPPER('&username');

PROMPT Table Privileges granted to a user through roles

SELECT granted_role, owner, table_name, privilege
FROM ( SELECT granted_role
FROM dba_role_privs WHERE grantee=UPPER('&username')
UNION
SELECT granted_role
FROM role_role_privs
WHERE role in (SELECT granted_role
FROM dba_role_privs WHERE grantee=UPPER('&username')
)
) roles, dba_tab_privs
WHERE granted_role=grantee;

PROMPT System Privileges assigned to a user through roles

SELECT granted_role, privilege
FROM ( SELECT granted_role
FROM dba_role_privs WHERE grantee=UPPER('&username')
UNION
SELECT granted_role
FROM role_role_privs
WHERE role in (SELECT granted_role
FROM dba_role_privs WHERE grantee=UPPER('&username')
)
) roles, dba_sys_privs
WHERE granted_role=grantee;

PROMPT Table privileges assigned directly to a user

SELECT owner, table_name, privilege
FROM dba_tab_privs
WHERE grantee=UPPER('&username');

PROMPT System privileges assigned directly to a user

SELECT privilege, admin_option
FROM dba_sys_privs
WHERE grantee=UPPER('&username');

spool off
Previous Topic: How can I modify to default parameter
Next Topic: Verify Oracle
Goto Forum:
  


Current Time: Wed Dec 25 19:33:54 CST 2024