1.创建审计策略
SQL> alter session set container=pdb1;
SQL> create or replace directory dumpdir as '/u12/app/dumpdir';
SQL> grant read,write on directory dumpdir to scott;
SQL> create audit policy dp_01 actions component=datapump export;
2.开启审计策略
SQL> audit policy dp_01;
3.执行数据泵导出操作
$ expdp scott/tiger@pdb1 dumpfile=scott_schema directory=dumpdir
4.刷新数据到磁盘
SQL> exec sys.dbms_audit_mgmt.flush_unified_audit_trail;
5.查看unified_audit_trail
SQL> select dp_text_parameters1,dp_boolean_parameters1 from unified_audit_trail where dp_text_parameters1 is not null; DP_TEXT_PARAMETERS1 DP_BOOLEAN_PARAMETERS1
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
MASTER TABLE: "SCOTT"."SYS_EXPORT_SCHEMA_01" , JOB_TYPE: EXPORT, METADATA_JOB_M MASTER_ONLY: FALSE, DATA_ONLY: FALSE, METADATA_ONLY: FALSE, DUMPFILE_PRESENT: TR
ODE: SCHEMA_EXPORT, JOB VERSION: 12.1.0.2.0, ACCESS METHOD: AUTOMATIC, DATA OPTI UE, JOB_RESTARTED: FALSE
ONS: 0, DUMPER DIRECTORY: NULL REMOTE LINK: NULL, TABLE EXISTS: NULL, PARTITION
OPTIONS: NONE
SQL>