Check if objects have / don’t have grants for public

Shows not only tables:


select distinct t.TABLE_NAME
from all_tab_privs t
where t.TABLE_SCHEMA = '...your_schema...' and t.table_name like '...your_mask...'
and not exists --or just exists -depends on what you want to check
(select * from all_tab_privs x where x.GRANTEE='PUBLIC' and x.TABLE_SCHEMA= t.TABLE_SCHEMA and x.TABLE_NAME=t.table_name)

Leave a Reply

Your email address will not be published. Required fields are marked *