Auditing Tables Are Not Getting Updated

Hello All,

Hope you all are Well !!!

I have added auditing area’s and enabled auditing for sports database. I added policy form Audit policy maintenance (Appbuilder) and policy is active as well. I have exported policy XML file and attached here for reference.

Customer table and it's fields custnum and Name are part of this policy. I have updated customer's name but not getting any records in _aud-audit-data and _aud-audit-data-value tables.

Please suggest what could be the issue here.

Regards.
 

Attachments

  • _audit-policies.zip
    699 bytes · Views: 2

Rob Fitzpatrick

ProgressTalk.com Sponsor
Try running a report ("Report Effective Settings" from the Policy menu) in the Audit Policy Maintenance tool. Here is what I got when running the report in a sports database after loading your policies:

Code:
              OpenEdge Audit Policies: Effective Settings Report
                        Date/Time: 08/06/2020 07:34:03
================================================================================

  NOTE: For any given table-level setting, fields that were not explicitly defined
        will not be listed in this report. Each field not listed will inherit the
        audit create, delete and update levels defined of the table.

<snip>

          ********************Summary Information********************

  Settings for table "Customer" (owner "PUB") found in
  policy "OE_AE_Customer"

          ********************Table Settings Details********************

  Effective create event id      : 5100
  Effective create level         : <audit event is off>
  Effective update event id      : 5101
  Effective update level         : <audit event is off>
  Effective delete event id      : 5102
  Effective delete level         : <audit event is off>
  Effective data security  level : No additional security


          **********************Field Settings**********************

  Settings for field "CustNum" in table "Customer" (owner "PUB")
  found in policy "OE_AE_Customer"

  Effective create level         : <ignored - event is off at table level>
  Effective update level         : <ignored - event is off at table level>
  Effective delete level         : <ignored - event is off at table level>
  Identifying ordinal position   : 1

<snip>
          **********************Field Settings**********************

  Settings for field "Name" in table "Customer" (owner "PUB")
  found in policy "OE_AE_Customer"

  Effective create level         : <ignored - event is off at table level>
  Effective update level         : <ignored - event is off at table level>
  Effective delete level         : <ignored - event is off at table level>
  Identifying ordinal position   : 2

<snip>

Note that under Table Settings Details it says that the CUD audit events are off.

So the issue is that you have the audit policies you need, but not the audit events. Here is how to fix that:

  • In the Audit Policy Maintenance tool, select your audit policy ("OE_AE_Customer").
  • Select the Audit Tables tab, select a table, and note the event IDs for the CUD events (5100, 5101, and 5102 respectively).
  • Select the Audit Events tab and ensure the Display System Events checkbox is selected.
  • Add an audit event for record creates:
    • Click the Add Record button from the toolbar above the tabs.
    • Enter the event ID for creates (5100); alternatively, you can click the Find Event ID button and select it from the resulting browse.
    • Ensure the Event Level dropdown is set to On.
    • Click the Save Record button.
  • Repeat the steps above to create audit events for record updates (ID 5101) and record deletes (ID 5102).
  • Run the Report Effective Settings report again and note how it has changed. It should look like this:
Code:
              OpenEdge Audit Policies: Effective Settings Report
                        Date/Time: 08/06/2020 07:59:50
================================================================================

  NOTE: For any given table-level setting, fields that were not explicitly defined
        will not be listed in this report. Each field not listed will inherit the
        audit create, delete and update levels defined of the table.

<snip>

          ********************Summary Information********************

  Settings for event id 5100, name "_sys.db.rec.create", type "Data" 
  found in policy "OE_AE_Customer"

          ********************Event Details********************

  Description                    : Database record create
  Effective event level          : On
  Effective data security  level : No additional security

--------------------------------------------------------------------------------

          ********************Summary Information********************

  Settings for event id 5101, name "_sys.db.rec.update", type "Data" 
  found in policy "OE_AE_Customer"

          ********************Event Details********************

  Description                    : Database record update
  Effective event level          : On
  Effective data security  level : No additional security

--------------------------------------------------------------------------------

          ********************Summary Information********************

  Settings for event id 5102, name "_sys.db.rec.delete", type "Data" 
  found in policy "OE_AE_Customer"

          ********************Event Details********************

  Description                    : Database record delete
  Effective event level          : On
  Effective data security  level : No additional security

--------------------------------------------------------------------------------

          ********************Summary Information********************

  Settings for table "Customer" (owner "PUB") found in
  policy "OE_AE_Customer"

          ********************Table Settings Details********************

  Effective create event id      : 5100
  Effective create level         : Standard (1 rec/fld)
  Effective update event id      : 5101
  Effective update level         : Full (1 rec/fld)
  Effective delete event id      : 5102
  Effective delete level         : Standard (1 rec/fld)
  Effective data security  level : No additional security


          **********************Field Settings**********************

  Settings for field "CustNum" in table "Customer" (owner "PUB")
  found in policy "OE_AE_Customer"

  Effective create level         : Standard (1 rec/fld)
  Effective update level         : Full (1 rec/fld)
  Effective delete level         : Standard (1 rec/fld)
  Identifying ordinal position   : 1


          **********************Field Settings**********************

  Settings for field "Name" in table "Customer" (owner "PUB")
  found in policy "OE_AE_Customer"

  Effective create level         : Standard
  Effective update level         : Full
  Effective delete level         : Standard
  Identifying ordinal position   : 2

<snip>

Remember to select Commit Changes from the File menu when you are done.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
I don't know if it matters to you but note that your policies for Customer and Order were created differently: one record per field for Customer but not for Order.
 
Thanks a lot @Rob Fitzpatrick for this valuable information.

I have update events accordingly and got information like above.

I have updated name of first customer and record gets created in _aud-audit-data table but no record is created in _aud-audit-data-value table but as per policy configuration it is : Effective update level : Full . I though i should be able to get the previous value of customer's name.

**********************Field Settings**********************

Settings for field "Name" in table "Customer" (owner "PUB")
found in policy "OE_AE_Customer"

Effective create level : Standard
Effective update level : Full
Effective delete level : Standard
Identifying ordinal position : 2

Could you please suggest what else needs to be updated.

Regards.
 

Rob Fitzpatrick

ProgressTalk.com Sponsor
Your Customer.Name field policy isn't what you want it to be. Compare the CustNum and Name policies:

Code:
  Settings for field "CustNum" in table "Customer" (owner "PUB")
  found in policy "OE_AE_Customer"

  Effective create level         : Standard (1 rec/fld)
  Effective update level         : Full (1 rec/fld)
  Effective delete level         : Standard (1 rec/fld)
  Identifying ordinal position   : 1

  Settings for field "Name" in table "Customer" (owner "PUB")
  found in policy "OE_AE_Customer"

  Effective create level         : Standard
  Effective update level         : Full
  Effective delete level         : Standard
  Identifying ordinal position   : 2

With this configuration you will create _aud-audit-data-value records for updates to CustNum but not for Name.
 
Top