How to Extract FGA Data From UNIFIED_AUDIT_TRAIL
(Doc ID 2415958.1)
Last updated on MARCH 06, 2020
Applies to:Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A 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 BBB.PRODUCTO
WHEN 'SYS_CONTEXT(''USERENV'', ''SESSION_USER'') = ''BBB'''
EVALUATE PER SESSION
CONTAINER = CURRENT;
But it can be done using a FGA policy like as follows:
object_schema => 'BBB',
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!
In this Document