Sr. oracle dba
Alireza Mirbakhtiar, October 03, 2023 - 4:15 pm UTC
Hi Connor,
thank you for you hint, however (just in case our customer prefers to remain by standard auditing) , can the $AUD table get truncated after the data is archived?
the purpose is to TRUNCATE the table and resize the Tablespace (not SYSAUX) ,, thus the tablespaces would be set with optimized segments and the DBMS_AUDIT_MGMT.CLEAN_AUDIT_TRAIL operations run much faster. The reason i am asking is, because support DOES not recommend the TRUNCATE on this table.
October 04, 2023 - 1:21 am UTC
In normal operation we always recommend the use of DBMS_AUDIT_MGMT (as per Support), but for specific issues you should be able to get their blessing for a one-off use of truncate (most probably during an outage)
Sr. oracle dba
Alireza Mirbakhtiar, October 03, 2023 - 4:54 pm UTC
... also need to know if unified auditing requires any advanced license? or it is included feature of EE 19c?
Thank you!
Ali
Oracle DBA
alireza, November 21, 2024 - 7:28 pm UTC
Hi ,
the ONLINE MOVE on the cloned system (from PROD) took forever to do:
SQL> BEGIN
DBMS_AUDIT_MGMT.set_audit_trail_location(
audit_trail_type => DBMS_AUDIT_MGMT.AUDIT_TRAIL_FGA_STD,--this moves table FGA_LOG$
audit_trail_location_value => 'NEW_TBS');
END;
/
As it created high I/O and set an exclusive LOCK on the AUD$ for MOVE - we had to kill the process after 3 days and complains form the customer.
How can i skip EXCL. LOCK on the AUD$ by doing ONLINE MOVE or optimize the MOVE procedure (any DOP option ?), as we are not allowed to disable auditing and need to take the ONLINE option by our compliance policy.
And we NEED to use "STANDARD AUDIT TRAIL" and thsi is our config view:
SELECT * FROM dba_audit_mgmt_config_params where PARAMETER_NAME='DB AUDIT CLEAN BATCH SIZE';
DB AUDIT CLEAN BATCH SIZE 1000000 STANDARD AUDIT TRAIL
DB AUDIT CLEAN BATCH SIZE 10000 FGA AUDIT TRAIL
We the AUD$ table is over 6TB big :(
Thank you!
Alireza
December 04, 2024 - 6:51 am UTC
Well...if you're staying with standard audit, then you have a 6TB table that you need to maintain, which is the same as any other 6TB table - its going to be a challenge.
I'd suspect you'll need to do this manually as outlined below BUT (!!!) log an SR to get Support's blessing first!
You can tackle it in stages
1) Create a table NEW_AUD$ in the new tablespace being the same structure as AUD$. Same for FGA$
2) Copy everything except (say) this month to to NEW_AUD$. This can be done without service interruption and in batches over a few days. Same for FGA$. Add indexes to FGA$
3) Take an outage, and copy the remaining data over.
4) truncate AUD$ / FGA$
5) Use DBMS_AUDIT_MGMT to relocate the now empty AUD$ / FGA$ tables to the new tablespace to ensure all the correct metadata is in place.
6) rename AUD$ / FGA$ to "old", rename NEW_AUD$/FGA$ to the correct names
7) system comes online again
Now you are in a new tablespace without too much downtime.....You still have a 6TB problem to deal with in future
BUT (!!!) log an SR to get Support's blessing first!