-- #############################################################################################
--
-- %Purpose: Anzeigen der SYSTEM Privilegien an Oracle-Roles und DB-User
--
-- #############################################################################################
--
ttitle  left    'Output generated by: ' sql.user ' at: ' format a8 datum -
skip -
skip -
left  'System Privileges on Users and Roles' -
skip -
left  'Oracle Version ' format a15 sql.release -
skip 2
set feed off
set pagesize 10000
break on grantee skip 1
column datum new_value datum noprint
column grantee format A27 heading 'User or Role|receiving the Grant'
column privilege format A40 heading 'System|Privilege'
column admin_option format A10 heading 'Admin|Option'

select  to_char(sysdate, 'MM/DD/YY') datum,
  substr(grantee,1,27) grantee,
  substr(privilege,1,40) privilege,
  substr(admin_option,1,10) admin_option
from dba_sys_privs
order by 1,2,3;
