Monitor SYS.AUD$ table size


Job details

Name: Monitor SYS.AUD$ table size
Platform: Oracle
Category: Capacity
Description: Checks size of the AUD$ trail table.
Long description: Checks size of the AUD$ trail table.
Version: 1.5
Default schedule: 15 * * *
Requires engine install: Yes
Compatibility tag: .[type=‘instance’ & databasetype=‘oracle’]/.[hasengine=‘YES’ & _priv_read_dba_segments = ‘1′ & _priv_read_sys_aud = ‘1′ & _priv_read_v_parameter = ‘1′]

Parameters

Name Default value Description
warning threshold 100 Warning threshold in MB.
alarm threshold 500 Alarm Threshold in MB
history threshold 24 Defines how often statistics (aud$ table size and record count) are collected into the history table (in hours).

Job Summary

select round(bytes/1048576,1) as "Table Size in MB" from dba_segments where segment_name='AUD$' and owner='SYS';

Essential Details

Implementation

The following SQL procedures and tables are created to support this monitoring job:


CREATE table dbw_aud$_size_tab(histr_date date, tab_size number, rec_count number)
CREATE table dbw_aud$_size_histr_tab(histr_date date, tab_size number, rec_count number)
CREATE or replace PROCEDURE dbw_aud$_table_size_proc (taskid in number) ...

This procedure checks the table size and inserts records into history tables to track size changes over time. It conditionally updates a monitoring table based on the current size relative to the threshold settings and records audit trail information.

Dependencies

Job Parameters

Name Description Default Value
warning threshold The size in MB at which a warning is triggered 100
alarm threshold The size in MB at which an alarm is triggered 500
history threshold How often (in hours) statistics are collected 24

Reporting

This monitoring job generates reports containing the following details:

Particularly, there are tables and charts generated as part of the report showing audit-related statistics and history. This comprehensive reporting helps in the analytical review of how the audit table grows over time, enabling DBAs to make informed decisions on capacity management and performance tuning tailored to audit storage.

Privileges and Security Checks

Cleanup and Error Handling

This monitoring job is vital for maintaining optimal database performance and ensuring compliance with data governance standards through effective audit log management.