✍ Kashif M ™
☎ +91 9994883085
✉ kashif7222@gmail.com

Trends

Thursday, 21 September 2017


How to find User / Schema privileges of user in Oracle


By on September 21, 2017


select * from dba_role_privs where grantee = 'USERNAME';


SELECT * FROM USER_ROLE_PRIVS WHERE GRANTED_ROLE != 'CONNECT'; -- Roles of the actual Oracle Schema



select * from USER_ROLE_PRIVS where USERNAME='USERNAME';

select * from USER_TAB_PRIVS where Grantee = ' USERNAME ';

select * from USER_SYS_PRIVS where USERNAME = ' USERNAME ';



This query will show grant privileges for your schema



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;






Kashif
mkashu: How to find User / Schema privileges of user in Oracle
Review : Kashif | Kashif
Update: September 21, 2017 | Rating: 4.5

Comment for "How to find User / Schema privileges of user in Oracle"

0 comments

Post a Comment

Blog Archive

Labels