Good morning everybody
I need to purge our audit trails(in our production database, configured to store the trails to database) from very old records we have there(like 2 years of auditing that weight about 100GB). I managed to take 20,000 audit records from another database and insert them into a test database, in the AUD$ table. I have read the complete procedure to purge the audit trail(configure the initial cleanup, executing the package, etc...) but whenever i try to execute the initial cleanup i get the following message:
BEGIN
DBMS_AUDIT_MGMT.INIT_CLEANUP(
AUDIT_TRAIL_TYPE => DBMS_AUDIT_MGMT.AUDIT_TRAIL_AUD_STD,
DEFAULT_CLEANUP_INTERVAL => 240 /*hours*/
);
END;
/
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "SYS.DBMS_AUDIT_MGMT", line 718
ORA-06512: at line 2
01422. 00000 - "exact fetch returns more than requested number of rows"
*Cause: The number specified in exact fetch is less than the rows returned.
*Action: Rewrite the query or change number of rows requested
I have tried changing the interval from 240 to 2 or 10, but the result is the same. The audit is not active in the test database 'cause its quite complicate for me to bounce that database at the moment,i don't know if this could be the reason for the error.
Any advice on how to solve this error?? both databases(test and prod) are 11Gr2 in Solaris 10.
Regards.