DOAG2021 DataPumpDeepDive
DOAG2021 DataPumpDeepDive
DOAG2021 DataPumpDeepDive
Vice President
Database Upgrade,
Utilities & Patching
@RoyFSwonger
royfswonger
William Beauregard
william-beauregard-3053791
• How Data Pump works
• Parallel Operations
Data Pump • Data Pump Data Movement Methods
Internals
• Oracle Data Pump CONTROL Table
• Marker Objects and Excluding Statistics
• The clients use the Data Pump API to execute export and import commands
• The user can specify a Degree of Parallelism (DOP) for the Data Pump job
• DOP = maximum number of ACTIVE parallel processes (Active workers + PQ processes)
• DOP does not include the CP or shadow process
• Any additional workers are idle and wait for work
• Data Pump will only start the number of threads needed to complete the task
• Control Process: Verifies parameters & job description, controls & assigns work items to
workers
• Metadata
• Each object path is a metadata work unit
• Workers begin collecting metadata for export
• Metadata unloaded in any order with parallel worker processes
• Data
• Metadata for TABLE_DATA items contain a size estimate that drives order of export
• Data work items are scheduled as worker processes become available.
Pro Tip: current dictionary and object statistics
are crucial to data pump export performance!
12.1.0.2 12.2.0.1
• No estimate phase
• First loads the metadata, mostly in parallel
• Builds multiple indexes simultaneously w/ data pump workers
• Individual indexes are built serially.
• Can be a performance issue for indexes on very large tables
• Loads package bodies in parallel using multiple workers
• Loads data in parallel using multiple workers and multiple PQ processes.
Documentation:Pre-12.2
Database Utilities Guide Since 12.2
• One worker per partition/subpartition • Added parallel import of most other metadata
• PQ used if partitions are large enough objects
•
• Package bodies loaded in parallel
• Some exceptions
• •
With patch for bug 22273229 • Types (due to inheritance)
• •
• Indexes built in parallel • Schemas
• •
• Constraints created in parallel • Procedural actions
•
• Backport to 12.1.0.2, 11.2.0.4
• 12.2.0.1
• With METRICS=Y:
DATABASE_EXPORT/FINAL_POST_INSTANCE_IMPCALLOUT/MARKER
02-NOV-21 19:43:56.064: W-1 Completed 1 MARKER objects in 0 seconds
02-NOV-21 19:43:59.171: W-1 Processing object type DATABASE_EXPORT/AUDIT_UNIFIED/AUDIT_POLICY_ENABLE
02-NOV-21 19:43:59.195: W-1 Completed 2 AUDIT_POLICY_ENABLE objects in 0 seconds
02-NOV-21 19:43:59.380: W-1 Processing object type DATABASE_EXPORT/POST_SYSTEM_IMPCALLOUT/MARKER
02-NOV-21 19:43:59.387: W-1 Completed 1 MARKER objects in 0 seconds
02-NOV-21 19:43:59.830: W-1 . . exported "SYS"."KU$_USER_MAPPING_VIEW" 5.890 KB 25 rows in 0 seconds using external_table
02-NOV-21 19:43:59.923: W-1 . . exported "SYSTEM"."REDO_DB" 25.59 KB 1 rows in 0 seconds using direct_path
• MOS Note:
Export/Import DataPump Parameter TRACE How to Diagnose Oracle Data Pump [ID
286496.1]
Files are written to the directories specified by the init.ora/spfile initialization parameters
BACKGROUND_DUMP_DEST and USER_DUMP_DEST or in <ADR_HOME>/trace
ALTER SYSTEM SET EVENTS = '39089 trace name context forever, level 0x300' ;
ALTER SYSTEM SET EVENTS = '39089 trace name context off' ;
https://MikeDietrichDE.com/videos/
https://dohdatabase.com/webinars/
https://MikeDietrichDE.com
https://DOHdatabase.com
YouTube Channel