Today my first time using Oracle Fine-Grained Auditing. Why do I need to use Oracle Fine-Grained Auditing?
This is because there is a table that is accessed by many procedures, triggers and packages. So that in case of deletion, I can not track from which the “DELETE” order came from.
I’ve tried using a trigger on a table to track it down. But this action, I think is still not enough. So I tried to use Oracle FGA.
Here’s an example that I use Oracle FGA :
— truncate the audit trail log
CONN sys/password AS SYSDBA
TRUNCATE TABLE fga_log$;
— add the policy TST_AUDIT to the MIS schema all column of the TRD_STATEMENTS table
DBMS_FGA.add_policy (object_schema => ‘MIS’,
object_name => ‘TRD_STATEMENTS’,
policy_name => ‘TST_AUDIT’,
audit_condition => NULL,
audit_column => NULL,
statement_types => ‘DELETE’);
— check the audit trail result
SELECT * FROM dba_fga_audit_trail;