Oracle System Privileges Lookup

Displays users and roles granted a specific system privilege. The script allows filtering by privilege name and shows whether the privilege was granted with admin option, helping with security auditing and privilege review.

oraclesqlsecurity-auditingv1.0.1
0 stars0 downloads17 views0 comments
By OracleDba • Created

Code

(18 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/system_privs.sql
-- Author       : Tim Hall
-- Description  : Displays users granted the specified system privilege.
-- Requirements : Access to the DBA views.
-- Call Syntax  : @system_privs ("sys-priv")
-- Last Modified: 27/07/2005
-- -----------------------------------------------------------------------------------
SET LINESIZE 200 VERIFY OFF

SELECT privilege,
       grantee,
       admin_option
FROM   dba_sys_privs
WHERE  privilege LIKE UPPER('%&1%')
ORDER BY privilege, grantee;

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!