1 Reply Latest reply: Nov 26, 2012 10:27 AM by Zoran Pavlovic RSS

    Audit_condition and audit column of DBMS_FGA.ADD_POLICY in Oracle 11g2

    975599
      I added a fine-grained auditing in Oracle 11g2 as follow:
      BEGIN
      DBMS_FGA.ADD_POLICY(
      object_schema      => 'HR',
      object_name      => 'Countries',
      policy_name      => 'CHK_HR_COUNTRIES',
      audit_condition => 'COUNTRY_ID = ''CA''',
      audit_column      => 'Region_ID',
      statement_types     => 'INSERT,UPDATE,DELETE,SELECT',
      audit_trail      => DBMS_FGA.DB+DBMS_FGA.EXTENDED);
      END;
      /

      The row having country_id = 'CA' was:
      Country_ID Country_name Region_ID
      CA     Canada     2

      I did queries:
      SELECT country_name FROM hr.countries WHERE region_id < 2;
      SELECT country_name FROM hr.countries WHERE region_id = 0;
      SELECT country_name FROM hr.countries WHERE region_id = 1;

      I don't understand why the above queries were recorded in DBA_FGA_AUDIT_TRAIL, because they didn't contain the audit_condition and their results had no rows satisfying the audit_condition. Please explain to me.