ASCII Database backup job is failing

Document ID : KB000015978
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

ASCII backup is failing but able to take binary backup.

Question:

Getting below error while taking ASCII backup

 

Begin processing 04/23/2017 01:07:44 PM.
04/23/2017 01:07:44 PM - Save DB path: /data2/DB_Backup_23042017/daily.tdb
04/23/2017 01:07:44 PM - Performing initial checks ...
04/23/2017 01:07:44 PM - Cleaning out export directory: /data2/DB_Backup_23042017/daily.tdb/oracle_datapump
04/23/2017 01:07:44 PM - Performing space check. This will take 1 to 3 minutes ...
04/23/2017 01:08:04 PM - Start estimation for EXPORT mode - FULL type
04/23/2017 01:08:14 PM - Error: SQLCODE=-31626 SQLTEXT=ORA-31626: job does not exist
ORA-06512: at "SYS.DBMS_DATAPUMP", line 
04/23/2017 01:08:14 PM - Error: Start estimation for EXPORT mode - FULL type
04/23/2017 01:08:14 PM - Initial checks completed. Starting save ...
04/23/2017 01:08:35 PM - Starting EXPORT with type FULL...
04/23/2017 01:08:35 PM - Error: SQLCODE=-31634 SQLTEXT=ORA-31634: job already exists
ORA-06512: at "SYS.DBMS_SYS_ERROR", line
04/23/2017 01:08:35 PM - Error: ORA-31626: job does not exist
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.KUPV$FT", line 435
ORA-31638: cannot attach to job EXPDP for user EHADMIN
ORA-31632: master table "EHADMIN.EXPDP" not found, invalid, or inaccessible
ORA-00942: table or view does not exist

04/23/2017 01:08:35 PM - Error: Ascii save failed.
Refer to log /data2/DB_Backup_23042017/daily.tdb/oracle_datapump/exp.log for more details..
Error: The program nhiSaveDb failed.

Environment:
eHealth 6.3.2 on Linux
Answer:

Possible cause of the error (ORA-31626: job does not exist)


This error normally occurs when we do not specify a unique JOB_NAME for the Data Pump job  and for some reason that JOB_NAME already exists in the database, or else if we are running many jobs at the same time (more than 99 jobs) and Data Pump cannot create a new job.

To fix this issue we have to cleanup the orphaned data pump jobs.

If we have left over jobs due to failures, simply issue a drop table statement.  From the data pump jobs view, we can get the schema and the owner of the table.  Then just issue a drop of that table
 
drop table "schema"."table_name";
 

Determine the data pump jobs which exists in the database and the status as NOT RUNNING:

SELECT owner_name, job_name, operation, job_mode,state, attached_sessions FROM dba_datapump_jobs where state='NOT RUNNING';

Additional Information:

ORA-31634: job already exists