Close Menu
  • Home
  • Oracle
    • ASM
    • Data Guard
    • OEM
    • RAC
  • MongoDB
  • Performance
  • Python
  • Shell Script
  • Tools
  • Troubleshooting
Search

Rolling Upgrade: Percona Server for MongoDB 8.0.23-10 to 8.0.26-11

2026-06-26 MongoDB By Henrique

Clone a MongoDB User and Preserve the Password Hash

2026-06-26 MongoDB By Henrique

ORA-06553: DBCA Fails on catalog.sql with PLS-213

2026-06-25 Oracle By Henrique
YouTube LinkedIn RSS
  • Home
  • About
  • Contact
  • Legal
    • Cookie Policy
    • Disclaimer
    • Privacy Policy
    • Terms of Use
  • RSS
  • English
    • Portuguese (Brazil)
Execute StepExecute Step
YouTube LinkedIn RSS
  • Home
  • Oracle
    • ASM
    • Data Guard
    • OEM
    • RAC
  • MongoDB
  • Performance
  • Python
  • Shell Script
  • Tools
  • Troubleshooting
Execute StepExecute Step
Home » Oracle Data Pump: How to Remove Orphaned Jobs from the Database
Oracle

Oracle Data Pump: How to Remove Orphaned Jobs from the Database

HenriqueBy Henrique2026-06-233 Mins Read
Share
Facebook Twitter LinkedIn Pinterest Email Telegram WhatsApp

This post is also available in: Português (Portuguese (Brazil))

Orphaned Data Pump jobs are a common occurrence in Oracle environments. They appear when an import or export session is abruptly interrupted, whether by a dropped connection, a killed session, or a server failure. Oracle creates the job’s master table in the user’s schema, but with no active process to finalize it, the job remains stuck with a NOT RUNNING status.

Beyond cluttering DBA_DATAPUMP_JOBS, these jobs can conflict with future runs if Oracle attempts to reuse the same job name.

Diagnosis

Query active and orphaned jobs from DBA_DATAPUMP_JOBS:

SELECT owner_name, job_name, operation, job_mode, state, attached_sessions
FROM dba_datapump_jobs;

Expected output with orphaned jobs:

OWNER_NAME      JOB_NAME                       OPERATION  JOB_MODE  STATE        ATTACHED_SESSIONS
--------------- ------------------------------ ---------- --------- ------------ -----------------
EXPORT          SYS_IMPORT_TABLE_02            IMPORT     TABLE     NOT RUNNING                  0
SYS             M_IMP_COPY_1521305009006       IMPORT     TABLE     NOT RUNNING                  0

Jobs with STATE = NOT RUNNING and ATTACHED_SESSIONS = 0 are orphaned and safe to remove.

💡 On RAC environments, the query is identical. Run it from any node.

Removal

⚠️ Confirm both JOB_NAME and OWNER_NAME before running the DROP. The master table is a real table in the user’s schema.

Drop the master tables for each orphaned job:

DROP TABLE EXPORT.SYS_IMPORT_TABLE_02;
DROP TABLE SYS.M_IMP_COPY_1521305009006;

Recyclebin

If the recyclebin parameter is enabled, dropped tables go to the recycle bin instead of being permanently deleted. Check the current setting:

SHOW PARAMETER recyclebin;

If the value is ON, explicitly purge each table:

PURGE TABLE EXPORT.SYS_IMPORT_TABLE_02;
PURGE TABLE SYS.M_IMP_COPY_1521305009006;

⚠️ Without the purge, the jobs continue showing up in DBA_DATAPUMP_JOBS even after the DROP.

Validation

Confirm there are no remaining orphaned jobs:

SELECT owner_name, job_name, operation, job_mode, state, attached_sessions
FROM dba_datapump_jobs;

Expected output:

no rows selected

Generating the Commands Automatically

Instead of building the commands manually, use the query below. It generates DROP and PURGE statements only for jobs with STATE = NOT RUNNING and ATTACHED_SESSIONS = 0:

SELECT
    'DROP TABLE ' || owner_name || '.' || job_name || ';' AS cmd_drop,
    'PURGE TABLE ' || owner_name || '.' || job_name || ';' AS cmd_purge
FROM dba_datapump_jobs
WHERE state             = 'NOT RUNNING'
  AND attached_sessions = 0;

Copy the output, review the names, and run them in sequence: all DROP statements first, then all PURGE statements.

⚠️ Do not pipe this output directly into EXECUTE IMMEDIATE without reviewing it first. Confirm that no legitimate job appears in the list before proceeding.

Quick Reference

-- 1. Identify orphaned jobs
SELECT owner_name, job_name, state, attached_sessions
FROM dba_datapump_jobs
WHERE state = 'NOT RUNNING';

-- 2. Drop master tables
DROP TABLE <owner>.<job_name>;

-- 3. Purge if recyclebin is ON
PURGE TABLE <owner>.<job_name>;

-- 4. Validate
SELECT * FROM dba_datapump_jobs;
data pump oracle
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
Previous ArticleOracle SQL Patch: Inject Optimizer Hints Without Changing Code
Next Article ORA-06553: DBCA Fails on catalog.sql with PLS-213

Related Posts

Oracle

ORA-06553: DBCA Fails on catalog.sql with PLS-213

2026-06-25
Read More
Oracle

Oracle ACCOUNT_STATUS: What Each Value Means

2026-06-04
Read More
Oracle

Oracle RAC 12.2 on VMware Workstation- Post 5: Final Validation and Quick Reference

2026-05-11
Read More
0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Demo
Follow Me
  • Email
  • GitHub
  • LinkedIn
  • RSS
  • YouTube

ORA-29548- How to Fix “Java System Class Reported” in Oracle Database

2026-03-0541 Views

INS-06006 – Passwordless SSH Connectivity Not Set Up

2026-02-2626 Views

PRVG-2002- How to Fix “Encountered Error in Copying File” in Oracle RAC

2026-03-0725 Views
Demo
Blogroll
  • oravirt
Execute Step
YouTube LinkedIn RSS
  • Home
  • About
  • Contact
  • RSS
  • English
    • Português (Portuguese (Brazil))
© 2026 ExecuteStep. Designed by ThemeSphere.

Type above and press Enter to search. Press Esc to cancel.

wpDiscuz
Ad Blocker Enabled!
Ad Blocker Enabled!
Our website is made possible by displaying online advertisements to our visitors. Please support us by disabling your Ad Blocker.