This feature was just backported from Oracle 23ai. The new ORA$MANDATORY audit policy was added with the Oracle 19.26 RU. This policy is not visible at UNIFIED_AUDIT_POLICIES or AUDIT_UNIFIED_ENABLED_POLICIES.
After patching the database to 19.26, then you see entries on UNIFIED_AUDIT_TRAIL:
SYS@CDB2.CDB$ROOT> select EVENT_TIMESTMAP, SYSTEM_PRIVILEGE_USED, ACTION_NAME
from UNIFIED_AUDIT_TRAIL
where UNIFIED_AUDIT_POLICIES='ORA$MANDATORY'
order by EVENT_TIMESTMAP;
EVENT_TIMESTAMP SYSTEM_PRIVILEGE_USED ACTION_NAME
_________________________________ _________________________ _________________
02-FEB-2025 21:54:56.192982000 SYSDBA LOGON
02-FEB-2025 21:54:56.216549000 SYSDBA SELECT
02-FEB-2025 21:55:00.381577000 SYSDBA, ALTER DATABASE ALTER DATABASE
02-FEB-2025 21:55:00.393882000 SYSDBA LOGOFF
...
The actions that are audited by ORA$MANDATORY policy are described on Oracle 23ai documentation.
What I find interesting, is that the “ALTER DATABASE MOUNT” during startup is audited, so we can have a good history of database startups.
A bit of annoying is that few seconds before the “mount”, there is the internal query to show the amount of SGA at startup which is also audited:
SELECT DECODE(null,'','Total System Global Area','') NAME_COL_PLUS_SHOW_SGA, SUM(VALUE), DECODE (null,'', 'bytes','') units_col_plus_show_sga FROM V$SGA
UNION ALL
SELECT NAME NAME_COL_PLUS_SHOW_SGA , VALUE, DECODE (null,'', 'bytes','') units_col_plus_show_sga FROM V$SGA
These are below summarized:
- Activities of administrative users such as
SYSDBA,SYSBACKUP, andSYSKMwhen the database is down is always audited. - Any DDL or DML attempts on
UNIFIED_AUDIT_TRAILor the underlying dictionary tables inAUDSYSschema is always audited.
A bit more fine-grained it means:
- SQL Firewall administrative actions
ORADEBUGutility- Audit-Related Activities
CREATE AUDIT POLICYALTER AUDIT POLICYDROP AUDIT POLICYAUDITNOAUDITEXECUTEof theDBMS_FGAPL/SQL packageEXECUTEof theDBMS_AUDIT_MGMTPL/SQL packageALTER TABLEattempts on theAUDSYSaudit trail table
- Top level statements by the administrative users
SYS,SYSDBA,SYSOPER,SYSASM,SYSBACKUP,SYSDG, andSYSKM, until the database opens. - All user-issued DML statements on the
SYS.AUD$andSYS.FGA_LOG$dictionary tables - Any attempts to modify the data or metadata of the unified audit internal table.
- All configuration changes that are made to Oracle Database Vault
- Operations on Blockchain and Immutable Tables
CREATE TABLEDROP TABLE- Failed
ALTER TABLEoperations - Failed
DELETEoperations - Failed
FLASHBACK TABLEoperations - Failed
RENAMEoperations - Failed
TRUNCATE TABLEoperations - Failed
UPDATEoperations
- Access to Sensitive Columns in the Oracle Optimizer Dictionary Tables
SYS.HIST_HEAD$–minimum,maximum,lowval,hivalSYS.HISTGRM$–endpoint,epvalue_rawSYS.WRI$_OPSTAT_HISTGRM_HISTORY–endpoint,epvalue_rawSYS.WRI$_OPTSTAT_HISTHEAD_HISTORY–minimum,maximum,lowval,hival
