标题: Dbms_Audit_Mgmt.Set_Audit_Trail_Location Does Not Move Lob And Index Partitions [打印本页] 作者: 郑全 时间: 2021-5-30 19:29 标题: Dbms_Audit_Mgmt.Set_Audit_Trail_Location Does Not Move Lob And Index Partitions Dbms_Audit_Mgmt.Set_Audit_Trail_Location Does Not Move Lob And Index Partitions (Doc ID 2428624.1)
In this Document
Symptoms
Changes
Cause
Solution
References
APPLIES TO:
Oracle Database - Enterprise Edition - Version 12.2.0.1 to 18.3.0.0.0 [Release 12.2 to 18]
Information in this document applies to any platform.
SYMPTOMS
NOTE: In the images and/or the document content below, the user information and data used represents fictitious data from the Oracle sample schema(s) or Public Documentation delivered with an Oracle database product. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.
When DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION is used to change the default tablespace used for storing audit data, only the new table partitions will be created in the new tablespace. LOB and INDEX partitions will still be stored in SYSAUX.
This behaviour can be easily reproduced with the following steps:
SQL> select segment_name,ds.tablespace_name from dba_segments ds where owner = 'AUDSYS';
SEGMENT_NAME TABLESPACE_NAME
------------------- ----------------------------
AUD$UNIFIED SYSAUX
SYS_IL0000017945C00097$$ SYSAUX
SYS_IL0000017945C00031$$ SYSAUX
SYS_IL0000017945C00030$$ SYSAUX
SYS_LOB0000017945C00030$$ SYSAUX
SYS_LOB0000017945C00031$$ SYSAUX
SYS_LOB0000017945C00097$$ SYSAUX
SQL> select table_owner,table_name,tablespace_name,partition_name,partition_position,segment_created,read_only from dba_tab_partitions where table_name like 'AUD%';
SQL> select table_owner,table_name,tablespace_name,partition_name,partition_position,segment_created from dba_tab_partitions where table_name like 'AUD%';
AUDSYS AUD$UNIFIED NUMTODSINTERVAL(1, 'DAY') RANGE 1048575 AUDITTS
AUDSYS CLI_SWP$a423794$1$1 RANGE 1 AUDITTS
SQL> select table_owner,table_name,tablespace_name,lob_partition_name,lob_name,lob_indpart _name,partition_position,segment_created,in_row,lob_indpart_name from dba_lob_partitions where table_owner='AUDSYS';
TABLE_OWNER TABLE_NAME TABLESPACE_NAME LOB_PARTITION_NAME LOB_NAME LOB_INDPART_NAME PARTITION_POSITION SEG IN_ROW LOB_INDPART_NAME
CAUSE
Due to Bug 27576342 when DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION is executed to change the tablespace of unified audit trail, only the new table partitions of AUDSYS.AUD$UNIFIED table will be created in the specified new tablespace while the lob and index partitions are still getting created in the OLD tablespace (SYSAUX)
SOLUTION
With the fix of Bug 27576342 all new table partitions, lob partitions and index partitions of AUDSYS.AUD$UNIFIED table will be created in the specified new tablespace.
The existing partitions will remain in the old tablespace (SYSAUX).
Apply Patch 27576342
What is the PARTITION_INTERVAL set to ?
Default is 1 month. you will need to wait until the end of the month for a new partition to be populated.
Until that time, the audit data would be populated to the same partition.
To change this interval, exec DBMS_AUDIT_MGMT.ALTER_PARTITION_INTERVAL
But please note that the change would take effect only after the current partition time completes/expires.
REFERENCES
BUG:27576342 - DBMS_AUDIT_MGMT.SET_AUDIT_TRAIL_LOCATION DOES NOT MOVE LOB AND INDEX PARTITION