How to Extract FGA Data From UNIFIED_AUDIT_TRAIL

(Doc ID 2415958.1)

Last updated on JULY 01, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.2 and later
Information in this document applies to any platform.

Symptoms

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:

BEGIN
DBMS_FGA.ADD_POLICY(
object_schema => 'PRUEBAS',
object_name => 'PRODUCTO',
policy_name => 'DML_EN_PRODUCTO',
audit_column => 'ID_PROD',
enable => TRUE,
statement_types => 'SELECT, INSERT, UPDATE');
END;
/

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).


Changes

 Tracking column usage with unified auditing is not possible. Alternative to this is to have FGA feature available to track the column usage.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms