User Tools

Site Tools


user_his_roles_and_privileges

This is an old revision of the document!


–# Privs :

select
lpad(' ', 2*level) || granted_role "User, his roles and privileges"
from
(
/* THE USERS */
  select
    null     grantee,
    username granted_role
  from
    dba_users
  where
    username like upper('%&enter_username%')
/* THE ROLES TO ROLES RELATIONS */
union
  select
    grantee,
    granted_role
  from
    dba_role_privs
/* THE ROLES TO PRIVILEGE RELATIONS */
union
  select
    grantee,
    privilege
  from
    dba_sys_privs
)
start with grantee is null
connect by grantee = prior granted_role;
user_his_roles_and_privileges.1522241585.txt.gz · Last modified: 2018/03/28 15:53 by admin