Show all privileges for given user

This shows all privilegues for a given user, including those inherited from his role(s)

SELECT PRIVILEGE
  FROM sys.dba_sys_privs 
  WHERE grantee = '&username'
UNION
  SELECT PRIVILEGE
    FROM dba_role_privs rp
    JOIN role_sys_privs rsp ON (rp.granted_role = rsp.role)
    WHERE rp.grantee = '&username'
ORDER BY 1;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.