SELECT LPAD(‘ ‘, 2*level) || granted_role “USER PRIVS”
FROM (
SELECT NULL grantee, username granted_role
FROM dba_users
WHERE username LIKE UPPER(‘%I_TLAROCQUE%’)
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
p.grantee,
p.privilege,
o.object_type,
p.owner||’.'||p.table_name obj_name,
p.grantor,
p.grantable
from
dba_tab_privs p,
dba_objects o
where
grantee not in (‘SYS’,'SYSTEM’)
and
grantee in
(select username from dba_users where username=’I_TLAROCQUE’)
and
o.owner = p.owner
and
o.object_name = p.table_name
and
p.privilege <> ‘SELECT’
order by
p.grantee,
p.owner,
p.table_name,
p.privilege;
FROM (
SELECT NULL grantee, username granted_role
FROM dba_users
WHERE username LIKE UPPER(‘%I_TLAROCQUE%’)
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
p.grantee,
p.privilege,
o.object_type,
p.owner||’.'||p.table_name obj_name,
p.grantor,
p.grantable
from
dba_tab_privs p,
dba_objects o
where
grantee not in (‘SYS’,'SYSTEM’)
and
grantee in
(select username from dba_users where username=’I_TLAROCQUE’)
and
o.owner = p.owner
and
o.object_name = p.table_name
and
p.privilege <> ‘SELECT’
order by
p.grantee,
p.owner,
p.table_name,
p.privilege;
No comments:
Post a Comment