Oracle All Directory Permissions Report

This script displays permissions granted on all Oracle directory objects. It queries DBA_TAB_PRIVS and aggregates privileges per directory and grantee using LISTAGG, providing a consolidated view of directory access permissions for auditing and security review.

oraclesqlsecurity-auditingv1.0.0
0 stars0 downloads13 views0 comments
By OracleDba • Created

Code

(19 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/directory_permissions_all.sql
-- Author       : Tim Hall
-- Description  : Displays permissions on all directories.
-- Requirements : Access to the DBA views.
-- Call Syntax  : @directory_permissions_all
-- Last Modified: 27/03/2024
-- -----------------------------------------------------------------------------------
column directory_name format a30
column grantee format a30
column privileges format a20

select table_name as directory_name,
       grantee,
       listagg(privilege,',') as privileges
from   dba_tab_privs 
where  table_name in (select directory_name from dba_directories)
group by table_name, grantee
order by 1, 2;

General Comments(0)

Tip: Click on a line number in the code to add a line-specific comment

No general comments yet. Be the first to comment!