Oracle Object Privileges Viewer

Displays object-level privileges granted on a specific Oracle object. Useful for checking who has access to a table or object and what permissions were granted.

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

Code

(28 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/object_privs.sql
-- Author       : Tim Hall
-- Description  : Displays object privileges on a specified object.
-- Requirements : Access to the DBA views.
-- Call Syntax  : @object_privs (owner) (object-name)
-- Last Modified: 27/07/2005
-- -----------------------------------------------------------------------------------
SET LINESIZE 200 VERIFY OFF

COLUMN owner FORMAT A30
COLUMN object_name FORMAT A30
COLUMN grantor FORMAT A30
COLUMN grantee FORMAT A30

SELECT owner,
       table_name AS object_name,
       grantor,
       grantee,
       privilege,
       grantable,
       hierarchy
FROM   dba_tab_privs
WHERE  owner      = UPPER('&1')
AND    table_name = UPPER('&2')
ORDER BY 1,2,3,4;

SET VERIFY ON

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!