How to Trace Oracle Data Pump

If you ever encounter problems with Oracle Data Pump, you can use this recipe to get valuable tracing.

Over the years, I’ve helped many customers with Data Pump issues. The more information you have about a problem, the sooner you can come up with a solution. Here’s my list of things to collect when tracing a Data Pump issue.

Daniel’s Tracing Recipe

1. AWR

  • Be sure you have a proper license to use AWR.

  • Set the snapshot interval to 15 minutes and create a new snapshot:

    exec dbms_workload_repository.modify_snapshot_settings(null, 15);
    exec dbms_workload_repository.create_snapshot;
    
  • If you are on Multitenant, do so in the root container and in the PDB.

2. SQL Trace

  • Depending on the nature of the problem, you can enable SQL trace of the Data Pump processes:

    alter system set events 'sql_trace {process: pname = dw | process: pname = dm} level=8';
    
    • You can change the trace level as required.
    • dm is the Data Pump control process, dw are worker processes.
  • If you already know the SQL ID causing problems, you can enable tracing for just that SQL:

    alter system set events 'sql_trace[SQL: <sql-id>]';
    
    • Replace <sql-id> with the offending SQL ID.

3. Start Data Pump

  • Start the Data Pump job that you want to trace:
    expdp ... metrics=yes logtime=all trace=<trace-setting>
    impdp ... metrics=yes logtime=all trace=<trace-setting>
    

4. AWR

  • Be sure you have a proper license to use AWR.

  • When the Data Pump job completes or after you stopped it, reset the snapshot interval to the original value and create a new AWR snapshot:

    exec dbms_workload_repository.modify_snapshot_settings(null, <original-value>);
    exec dbms_workload_repository.create_snapshot;
    
  • Create an AWR report spanning the entire period:

    @?/rdbms/admin/awrrpt
    
    • If needed, you can later on create AWR reports for a shorter period.
  • If you are on Multitenant, do so in the root container and in the PDB.

Get the Information

Collect the following information:

  1. The Data Pump log file.
  2. AWR reports – on CDB and PDB level
  3. Data Pump trace files
    • Stored in the database trace directory
    • Control process file name: *dm*
    • Worker process file names: *dw*

This should be a great starting point for diagnosing your Data Pump problem.

What Else

  • Remember, you can use the Data Pump Log Analyzer to quickly generate an overview and to dig into the details.

  • Regarding Data Pump parameters metrics=yes and logtime=all. You should always have those in your Data Pump jobs. They add very useful information at no extra cost. In Oracle, we are discussing whether these should be default in a coming version of Data Pump.

Leave a comment and let me know your favorite way of tracing Oracle Data Pump.

4 thoughts on “How to Trace Oracle Data Pump

  1. Hi Daniel, thanks for a great compilation about tracing. Just one question. How can I access the Data Pump Logfile in a Database in the always free cloud. The file is created but I can only access the log file using a PL/SQL Procedure which copies the file to a database table or spools it to a client using sqlplus.

    Like

    1. Hi Ernst,
      The always free cloud runs in Autonomous Database. You don’t have access to the operating system to get the log file directly. You need to use a solution with PL/SQL to read and get the file.
      It could be a good blog post. I’ll put that on my list of interesting things.
      Daniel

      Like

  2. Daniel, Thank you for your notes about troubleshoot, hopefully I can find out what is happening in case. We have are Oracle 19.24 on Windows 2022 server. We run an hourly export; in the last few months this job will intermittently trigger an error in my db alert log that looks like this, it will trigger 3 or 4 times and then go on with the export. The export log for that time frame shows successful.

    2024-08-14T00:01:50.767640-07:00
    —– PL/SQL Call Stack —–
    object line object
    handle number name
    00007FFD6EA89E28 9126 package body SYS.KUPW$WORKER.CHECK_FOR_ROW
    00007FFD6EA89E28 4177 package body SYS.KUPW$WORKER.UNLOAD_DATA
    00007FFD6EA89E28 13777 package body SYS.KUPW$WORKER.DISPATCH_WORK_ITEMS
    00007FFD6EA89E28 2439 package body SYS.KUPW$WORKER.MAIN
    00007FFD6EAA3AF8 2 anonymous block

    If you have any insights, please let me know.

    Thank you, Angela Gard

    Like

Leave a reply to Daniel Overby Hansen Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.