Audit Trail
The Audit Trail screen (Audit - Query in its header) lists the changes made in the database of a connected application, as Oracle's archive logs record them: one line per change — INSERT, UPDATE or DELETE — with the schema, the table, the time, the database user, the row and the System Change Number. Open it from Database → Audit Trail.
It complements Activity log (who wrote how many rows each day) with each change itself — the kind of trace SOX-style controls expect.
At a glance
Summary view
The screen opens on Summary (next to Table and Chart): the changes are grouped by Schema, Table Name, Operation and Transaction date (by day), and each group says how many changes it holds, in brackets. The chevron of a group lists its changes; Table shows the flat list instead.
Field-level diff — expandable rows
The chevron of a change opens its before / after diff, field by field: the header line says how many fields the row has and how many changed (92 fields · 2 changed), and Changed only — ticked by default — hides the fields that did not change. The values are read on demand from the stored DML statement (AUDIT_TRAIL_QUERY): the diff is built when you open it, not stored twice. Consequences:
- The values table (
AUDIT_TRAIL_VALUES, the source of Audit Lookup) can be purged to reclaim space; the diff still rebuilds from the statement alone. INSERTshows the values written as After;DELETEshows them as Before;UPDATEshows both, the changed fields highlighted.
Columns
| Column | Source | What it tells you |
|---|---|---|
| Schema | AUD_SEG_OWNER — database schema. | Where the table is. |
| Table Name | AUD_SEG_NAME — table name. | Object changed. |
| Operation | AUD_OPERATION — INSERT / UPDATE / DELETE. | What was done. |
| Transaction date | AUD_DT_TRANSACTION — timestamp. | When the change reached the database. |
| Application ID | AUD_APPS_ID — application identifier. | The connected application. |
| Row ID | AUD_ROW_ID — row identifier. | Which row of the table. |
| Last SCN | AUD_SCN — System Change Number. | Position of the change in the archive logs. |
| Object Type | AUD_SEG_TYPE — TABLE. | Kind of object. |
| User | AUD_USERNAME — database account. | Who made the change at database level. |
Advanced filters narrow the list on the application, the transaction date, the operation, the schema, the table and the user.
Auditing scope — Audit Columns tab
Each connected application decides how much of each audited table is indexed into the values table, on the Audit Columns tab of its settings (Applications). Three cases per table:
| Rules on the table | Effect |
|---|---|
| No row for the table | Default — every column of the row is indexed into AUDIT_TRAIL_VALUES. |
| One or more column rows | Only the listed columns are indexed. The other columns still appear in the on-demand diff, they just cannot be searched in Audit Lookup. |
A single *SQL* row | Journal only — the full DML statement is kept in AUDIT_TRAIL_QUERY and nothing is indexed into AUDIT_TRAIL_VALUES. Use it on the widest tables where per-column search is not needed. |
The full DML statement is always kept, whatever the rules. The tab is the lever to keep the values table's volume in check on wide tables (an F0911 row would otherwise index tens of columns per change).
Collection, purge and rebuild jobs
The changes are collected by Nomaflow jobs, run on the application:
| Job | What it does |
|---|---|
| nomasx1-audit-trail-1 | Reads the archive logs (LogMiner) from the last SCN of the application and adds the new changes. |
| nomasx1-audit-trail-precheck-1 | Read-only check that the audited database has every prerequisite; gives the SQL to fix what is missing. |
| nomasx1-audit-trail-reset-scn-1 | Resets the last SCN of the application — by default the next run starts from the current SCN. |
| nomasx1-audit-trail-purge-values-1 | Purges AUDIT_TRAIL_VALUES to reclaim space — everything for the application (optionally one table), or only the values of statements older than N days. The statements are kept. |
| nomasx1-audit-trail-rebuild-values-1 | Rebuilds AUDIT_TRAIL_VALUES for a table and a period by reading the stored statements again — after a purge, or after widening the Audit Columns rules of a table. |
Tips & best practices
- Filter on Operation = DELETE over the audit period — every deletion has to be justifiable.
- Open the change before Audit Lookup. For one record, the diff already shows every changed field; Audit Lookup searches the indexed values across changes ("every change that wrote this value in this column").
- Filter on a User to read the database activity of one account. Compare with the Activity log to tell a change made through the application from one made directly in the database.
- A group whose count is above the usual range for the same table is worth a question to the DBA team.
- Trim wide tables with Audit Columns. On an
F0911-style table, list only the columns you would search on — the values table stays small and the diff still shows everything from the statement. - Schedule the purge of values in line with your retention policy, and run rebuild values on a period when a value-level search is needed again.