Created
November 19, 2008 08:28
-
-
Save tothda/26458 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
lpad(' ', 2*level) || c "Privilege, Roles and Users" | |
from | |
( | |
/* THE PRIVILEGES */ | |
select | |
null p, | |
name c | |
from | |
system_privilege_map | |
where | |
name like upper('%&enter_privliege%') | |
/* THE ROLES TO ROLES RELATIONS */ | |
union | |
select | |
granted_role p, | |
grantee c | |
from | |
dba_role_privs | |
/* THE ROLES TO PRIVILEGE RELATIONS */ | |
union | |
select | |
privilege p, | |
grantee c | |
from | |
dba_sys_privs | |
) | |
start with p is null | |
connect by p = prior c; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment