Remove orphaned tables from Data Pump

This post is also available at: Português

Oracle Data Pump

Check for orphan tables in the database.

SQL> select owner_name,job_name,operation,job_mode,state,attached_sessions from dba_datapump_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
SQL

We have two orphan jobs in the database. This is verified by the NOT RUNNING status.
Let’s remove the orphaned tables.

SQL> drop table EXPORT.SYS_IMPORT_TABLE_02;

Table dropped.

SQL> drop table SYS.M_IMP_COPY_1521305009006;

Table dropped.

SQL>
SQL

If the database’s recyclebin is enabled, purge the tables.

SQL> show parameter recycle

NAME                                 TYPE                             VALUE
------------------------------------ -------------------------------- ------------------------------
buffer_pool_recycle                  string
db_recycle_cache_size                big integer                      0
recyclebin                           string                           ON
SQL
SQL> purge table EXPORT.SYS_IMPORT_TABLE_02;

Table purged.

SQL> purge table SYS.M_IMP_COPY_1521305009006;

Table purged.
SQL

Validation, to see if there are any other orphaned jobs.

SQL> select owner_name,job_name,operation,job_mode,state,attached_sessions from dba_datapump_jobs;

no rows selected
SQL

Previous Article

ORA-16905: The member was not enabled yet.

Next Article

Error PRCD-1229 after manual upgrade

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *