PL/SQL (MOSC)

MOSC Banner

How to execute dbms_audit_mgmt.clean_audit_trail via db_link?

edited Oct 17, 2019 7:11AM in PL/SQL (MOSC) 12 commentsAnswered ✓

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:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center