Info
Content

What is Audited?


When there's an issue, a frequent question that comes up is: what is being audited? This is closely followed by, "can we tell what was changed, and by whom?"

The following SQL will help you determine which records and fields have field and record auditing enabled.

NOTE: this article is specific to PeopleSoft auditing, and does not include trigger based auditing or other database level auditing.

Record Auditing

The following SQL identifies all records that have an audit record associated with them:

The RECUSE field is a bit field with the following combinations:

  • bit 0 add = 1
  • bit 1 change = 2
  • bit 2 delete = 4
  • bit 3 selective = 8

So if you have a RECUSE value of 7, that is a combination Add (1) + Change (2) + Delete (4) which gives you a total of 7.

In Oracle, you can use the bitand operator to work this out for you like this:

In SQL Server, use the & operator like so:

One problem you may run into is that not every field is audited in the audit record. The following SQL gives the fields that match between the record and the audit record (which means they are actually audited):

Field Auditing

The following SQL identifies fields on records that have field level auditing to PSAUDIT enabled. Note that it uses the USEEDIT field, specifically the following:

  • bit 3 add = 8
  • bit 7 change = 128
  • bit 10 delete = 1024

This is the script to use for an Oracle database:

This is the equivalent script for a SQL Server database:

No Comments
Back to top