BEGIN DBMS_AUDIT_MGMT.init_cleanup( audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD, default_cleanup_interval => 12 /* hours */); END; / ERROR at line 1: ORA-46267: Insufficient space in 'SYSAUX' tablespace, cannot complete operation ORA-06512: at "SYS.DBMS_AUDIT_MGMT", line 1035
The init_cleanup will try to move the aud$ to SYSAUX tablespace.The SYSAUX tablespace need to have the space required to hold AUD$ table .This check will be performed even if we are moving aud$ to diffferent tablespace.
Solution:
1.Find the tablespace of the Audit table
select table_name, tablespace_name from dba_tables where table_name IN (‘AUD$’, ‘FGA_LOG$’) order by table_name;
TABLE_NAME TABLESPACE_NAME
————— ——————–
AUD$ SYSTEM
FGA_LOG$ SYSTEM
2.Update dam_config_param$ with current tablespace name
update dam_config_param$ set string_value=‘SYSTEM‘ where audit_trail_type#=1 and param_id=22;
3.Intialize cleanup
BEGIN
DBMS_AUDIT_MGMT.init_cleanup(
audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,
default_cleanup_interval => 12 /* hours */);
END;
/
4.Update dam_config_param$ with old value
update dam_config_param$ set string_value=‘SYSAUX‘ where audit_trail_type#=1 and param_id=22;
commit;