Monday, September 30, 2013

ORA-46267: Insufficient space in 'SYSAUX' tablespace, cannot complete operation , DBMS_AUDIT_MGMT.init_cleanup

I was trying to enable audit trail management in our database

SQL> BEGIN
  2    IF NOT DBMS_AUDIT_MGMT.is_cleanup_initialized(DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD) THEN
  3      DBMS_AUDIT_MGMT.init_cleanup(
  4        audit_trail_type         => DBMS_AUDIT_MGMT.AUDIT_TRAIL_ALL,
  5        default_cleanup_interval => 12 /* hours */);
  6    END IF;
  7  END;
  8  /
BEGIN
*
ERROR at line 1:
ORA-46267: Insufficient space in 'SYSAUX' tablespace, cannot complete operation
ORA-06512: at "SYS.DBMS_AUDIT_MGMT", line 1039
ORA-06512: at line 3


from the manual:

"The INIT_CLEANUP procedure sets up the audit management infrastructure and sets a default cleanup interval for the audit trail records. The procedure also moves the audit trail tables out of the SYSTEM tablespace."

What I could se the SYSAUX tablespace was allowed to grow 2Gb and the AUD$ table was only 230Mb!

Oh, maybe the DBMS_AUDIT_MGMT was looking at the real free space in the datafile (already allocated disk space)!?!

SQL> ALTER DATABASE DATAFILE '/oradata/db1_sysaux01.dbf' RESIZE 4G;

Then all by a sudden the init_cleanup runs fine!


5 comments:

  1. You are right, here is what Oracle Support say about it:
    =========================================================
    DBMS_AUDIT_MGMT calculates the space needed in advance and raises the error ORA-46267 if there is not sufficient space, the room it potentially can grow using autoextend is irrelevant, as it does not use the autoextend feature, it calculates the needed room based on the current size first without actually trying to allocate the space, this means the room must be available beforehand.
    =========================================================

    ReplyDelete
  2. After several fruitless hours I stumbled upon this correct, overlooked detail. Thank you and blessings!

    ReplyDelete
  3. Thanks, your post saved me so much time! I was fighting with his issue and then I found your post! :)

    ReplyDelete
  4. In note Doc ID 1508787.1 of MOS are the solution.

    Regards.

    ReplyDelete
  5. Thanks and I have a keen provide: How Many Houses Has Hometown Renovated split level exterior remodel

    ReplyDelete