How to Extract FGA Data From UNIFIED_AUDIT_TRAIL
Last updated on JULY 01, 2018
Applies to:Oracle Database - Enterprise Edition - Version 18.104.22.168 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.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms