How to execute dbms_audit_mgmt.clean_audit_trail via db_link?
Hi
I'm trying to copy all UNIFIED_AUDIT_TRAIL data from all the databases in my env to one central database for storing and followup.
I'd like to do this via a databasejob and db_link for instance that does in short these steps.
I have a user in remote_db granted AUDIT_ADMIN that runs all this.
1) Create DB Link
create database link <dblink> using <remote_db>;
2) Copy all the data to central database:
insert /*+ APPEND */ into my_big_audit_tab select * from unified_audit_trail@<dblink>;
commit;
Up til this point all is well.
3) now I want to purge all the UNIFIED_AUDIT_TAIL data from the "remote" database with following command via the dblink: