There was a requirement to exclude the AUD$ table of the SYS schema from the export dump.
The AUD$ table is already being collected daily in a separate database and retained for three years for reporting purposes. Excluding it from the export avoids redundant data transfer and ensures consistency with the existing retention and reporting processes.
Initially, I assumed excluding the table would be straightforward. My parameter file consisted of the following lines:
directory=DATAPUMP_BACKUP
full=Y
dumpfile=full_datapump_<dbname>_%L.dmp
logfile=full_datapump_<dbname>_18-08-2025.log
metrics=Y
logtime=ALL
parallel=8
encryption=ALL
encryption_algorithm=AES256
encryption_password=xxxxxxxxxxxxxx
compression=ALL
compression_algorithm=medium
flashback_time=systimestamp
EXCLUDE=STATISTICS
EXCLUDE=SCHEMA:"IN ('MAPLE')"
EXCLUDE=TABLE:"IN ('AUD$', 'EXT_BIWKNZIEKTE', 'EXT_BIWKNZIEKTEP')"
The datapump backup was initiated and the resulting logfile was reviewed. Unexpectedly, the AUD$ table was included in the backup despite being excluded in the parameter file. Excerpts from the logfile:
;;;
Export: Release 19.0.0.0.0 - Production on Mon Aug 18 08:42:40 2025
Version 19.27.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
;;;
Connected to: Oracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production
18-AUG-25 08:42:53.841: ;;; **************************************************************************
18-AUG-25 08:42:53.866: ;;; Parfile values:
18-AUG-25 08:42:53.885: ;;; parfile: exclude=STATISTICS,SCHEMA:"IN ('MAPLE')",
18-AUG-25 08:42:53.905: ;;; _parfile: TABLE:"IN ('AUD$', 'EXT_BIWKNZIEKTE', 'EXT_BIWKNZIEKTEP')"
18-AUG-25 08:42:53.937: ;;; parfile: flashback_time=systimestamp
18-AUG-25 08:42:53.954: ;;; parfile: compression_algorithm=medium
18-AUG-25 08:42:53.978: ;;; parfile: compression=ALL
18-AUG-25 08:42:53.992: ;;; parfile: encryption_password=********
18-AUG-25 08:42:54.023: ;;; parfile: encryption_algorithm=AES256
18-AUG-25 08:42:54.041: ;;; parfile: encryption=ALL
18-AUG-25 08:42:54.069: ;;; parfile: parallel=8
18-AUG-25 08:42:54.097: ;;; parfile: logtime=ALL
18-AUG-25 08:42:54.117: ;;; parfile: metrics=Y
18-AUG-25 08:42:54.147: ;;; parfile: logfile=full_datapump_<dbname>_18-08-2025.log
18-AUG-25 08:42:54.181: ;;; parfile: dumpfile=full_datapump_<dbname>_%L.dmp
18-AUG-25 08:42:54.204: ;;; parfile: full=Y
18-AUG-25 08:42:54.222: ;;; parfile: directory=DATAPUMP_BACKUP
18-AUG-25 08:42:54.244: ;;; **************************************************************************
18-AUG-25 08:42:55.630: FLASHBACK automatically enabled to preserve database integrity.
18-AUG-25 08:43:05.376: Starting "SYSTEM"."SYS_EXPORT_FULL_01": system/******** parfile=exp_<dbname>.par
18-AUG-25 08:43:07.026: W-1 Startup took 1 seconds
18-AUG-25 08:43:10.201: W-3 Startup took 1 seconds
.
.
.
.
18-AUG-25 08:45:40.207: W-5 Completed 1654 TABLE objects in 110 seconds
18-AUG-25 08:45:53.451: W-4 . . exported "SYS"."AUD$" 110.2 MB 197763 rows in 46 seconds using direct_path
.
.
.
During the investigation, I began to doubt whether I had correctly updated the parameter file. Further review of the Oracle documentation led me to Doc ID 2383356.1, which recommends that the preferred method to exclude SYS.AUD$ objects during export or import is to use EXCLUDE=AUDIT_TRAILS. I then modified my parameter file to include this parameter.
directory=DATAPUMP_BACKUP
full=Y
dumpfile=full_datapump_<dbname>_%L.dmp
logfile=full_datapump_<dbname>_18-08-2025.log
metrics=Y
logtime=ALL
parallel=8
encryption=ALL
encryption_algorithm=AES256
encryption_password=xxxxxxxxxxxxx
compression=ALL
compression_algorithm=medium
flashback_time=systimestamp
EXCLUDE=AUDIT_TRAILS
EXCLUDE=STATISTICS
EXCLUDE=SCHEMA:"IN ('MAPLE')"
EXCLUDE=TABLE:"IN ('EXT_BIWKNZIEKTE', 'EXT_BIWKNZIEKTEP')"
It worked like a charm !
In conclusion, excluding the AUD$ table from the export dump using the EXCLUDE=AUDIT_TRAILS parameter in the Oracle datapump utility proved to be an effective solution. This experience highlights the importance of consulting official documentation.
Further Links and Information
Oracle Doc ID 2383356.1 - DataPump - EXCLUDE AUD$ does not work in 12c
Top comments (0)