DBA Hub

📋Steps in this guide1/1

Cleanup orphaned datapump jobs

-- Find the orphaned Data Pump jobs:

oracle configurationintermediate
by OracleDba
14 views
1

Cleanup orphaned datapump jobs

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
-- Find the orphaned Data Pump jobs:
SELECT owner_name, job_name, rtrim(operation) "OPERATION",
rtrim(job_mode) "JOB_MODE", state, attached_sessions
FROM dba_datapump_jobs
WHERE job_name NOT LIKE 'BIN$%' and state='NOT RUNNING'
ORDER BY 1,2;
-- Drop the tables
SELECT 'drop table ' || owner_name || '.' || job_name || ';'
FROM dba_datapump_jobs WHERE state='NOT RUNNING' and job_name NOT LIKE 'BIN$%'

Comments (0)

Please to add comments

No comments yet. Be the first to comment!