Created
August 26, 2020 14:58
-
-
Save tap52384/9a52fb3d7e73ac9fbeea4a98d8ebf794 to your computer and use it in GitHub Desktop.
Helpful Oracle SQL queries
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
-- See what has access to a particular table (direct and inherited): | |
select Grantee,'Granted Through Role' as Grant_Type, role, table_name | |
from role_tab_privs rtp, dba_role_privs drp | |
where rtp.role = drp.granted_role | |
and table_name = :tablename | |
union | |
select Grantee,'Direct Grant' as Grant_type, null as role, table_name | |
from dba_tab_privs | |
where table_name = :tablename; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment