Search code examples
oracle-databasesecurityoracle10guser-accounts

How to find the privileges and roles granted to a user in Oracle?


I am using Linux, Oracle10g. I have created one user called test. and granted create session and select any dictionary permission to the same user.

i also granted sysdba and sysoper roles to the same users.

Now i want to display all the privileges and roles granted to the user. I found following query but it shows only create session and select dictionary privileges.

select privilege 
from dba_sys_privs 
where grantee='SAMPLE' 
order by 1;

please help to resolve the issue.

Thanks


Solution

  • Look at http://docs.oracle.com/cd/B10501_01/server.920/a96521/privs.htm#15665

    Check USER_SYS_PRIVS, USER_TAB_PRIVS, USER_ROLE_PRIVS tables with these select statements

    SELECT * FROM USER_SYS_PRIVS; 
    SELECT * FROM USER_TAB_PRIVS; 
    SELECT * FROM USER_ROLE_PRIVS;