-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsec_roles.sql
executable file
·47 lines (41 loc) · 1.19 KB
/
sec_roles.sql
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
SET TERMOUT OFF;
COLUMN current_instance NEW_VALUE current_instance NOPRINT;
SELECT rpad(instance_name, 17) current_instance FROM v$instance;
SET TERMOUT ON;
PROMPT
PROMPT +------------------------------------------------------------------------+
PROMPT | Report : Security - All Roles |
PROMPT | Instance : ¤t_instance |
PROMPT +------------------------------------------------------------------------+
SET ECHO OFF
SET FEEDBACK 6
SET HEADING ON
SET LINESIZE 180
SET PAGESIZE 50000
SET TERMOUT ON
SET TIMING OFF
SET TRIMOUT ON
SET TRIMSPOOL ON
SET VERIFY OFF
CLEAR COLUMNS
CLEAR BREAKS
CLEAR COMPUTES
COLUMN role FORMAT a30 HEAD 'Role Name'
COLUMN grantee FORMAT a30 HEAD 'Grantee'
COLUMN admin_option FORMAT a15 HEAD 'Admin Option?'
COLUMN default_role FORMAT a15 HEAD 'Default Role?'
BREAK ON role SKIP 2
SELECT
b.role
, a.grantee
, a.admin_option
, a.default_role
FROM
dba_role_privs a
, dba_roles b
WHERE
granted_role(+) = b.role
ORDER BY
b.role
, a.grantee
/