How to Extract FGA Data From UNIFIED_AUDIT_TRAIL
(Doc ID 2415958.1)
Last updated on AUGUST 04, 2018
Applies to:Oracle Database - Enterprise Edition - Version 184.108.40.206 and later
Information in this document applies to any platform.
Requirement is to audit the column usage of a table (SELECT, INSERT, UPDATE and DELETE) in 12c database. This is not possible using a unified audit policy like this:
CREATE AUDIT POLICY DML_PRODUCTO
ACTIONS SELECT, DELETE, UPDATE, INSERT ON PRUEBAS.PRODUCTO
WHEN 'SYS_CONTEXT(''USERENV'', ''SESSION_USER'') = ''PRUEBAS'''
EVALUATE PER SESSION
CONTAINER = CURRENT;
But it can be done using a FGA policy like as follows:
object_schema => 'PRUEBAS',
object_name => 'PRODUCTO',
policy_name => 'DML_EN_PRODUCTO',
audit_column => 'ID_PROD',
enable => TRUE,
statement_types => 'SELECT, INSERT, UPDATE');
The problem is that, having Unified audit, the DBA_FGA_AUDIT_TRAIL return no rows and UNIFIED_AUDIT_TRAIL don't have a column to see an affected column of the table (like ID_PROD on the example).
Tracking column usage with unified auditing is not possible. Alternative to this is to have FGA feature available to track the column usage.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!