SELECT LPAD (' ', 2 * LEVEL) || granted_role "USER PRIVS"
FROM (SELECT NULL grantee, username granted_role
FROM dba_users
WHERE username LIKE UPPER ('%&uname%')
UNION
SELECT grantee, granted_role
FROM dba_role_privs
UNION
SELECT grantee, PRIVILEGE
FROM dba_sys_privs)
START WITH grantee IS NULL
CONNECT BY grantee = PRIOR granted_role;
SELECT PATH
FROM (SELECT grantee,
SYS_CONNECT_BY_PATH (PRIVILEGE, ':') || ':'
|| grantee PATH
FROM (SELECT grantee, PRIVILEGE, 0 ROLE
FROM dba_sys_privs
UNION ALL
SELECT grantee, granted_role, 1 ROLE
FROM dba_role_privs)
CONNECT BY PRIVILEGE = PRIOR grantee
START WITH ROLE = 0)
WHERE grantee IN (
SELECT username
FROM dba_users
WHERE lock_date IS NULL
AND PASSWORD != 'EXTERNAL'
AND username != 'SYS')
OR grantee = 'PUBLIC'
Halim, a Georgia Tech graduate Senior Database Engineer/Data Architect based in Atlanta, USA, is an Oracle OCP DBA and Developer, Certified Cloud Architect Professional, and OCI Autonomous Database Specialist. With extensive expertise in database design, configuration, tuning, capacity planning, RAC, DG, scripting, Python, APEX, and PL/SQL, he combines technical mastery with a passion for innovation. Notably, Halim secured 16th place worldwide in PL/SQL Challenge Cup Playoff on the year 2010.
Saturday, September 12, 2009
Subscribe to:
Post Comments (Atom)
My Blog List
-
-
-
ASSM states3 weeks ago
-
UKOUG Discover 20241 month ago
-
-
-
-
-
-
-
-
Moving Sideways8 years ago
-
-
Upcoming Events...11 years ago
-
No comments:
Post a Comment