Showing posts with label Datapump. Show all posts
Showing posts with label Datapump. Show all posts

Wednesday, December 2, 2015

DataPump Export (EXPDP) Fails With Error ORA-39826

DataPump Export (EXPDP) Fails With Error ORA-39826 
ORA-31693: Table data object failed to load/unload and is being skipped due to error:


ORA-31693: Table data object "HR"."TEST1" failed to load/unload and is being skipped due to error:
ORA-02354: error in exporting/importing data
ORA-39826: Direct path load of view or synonym (HR.TEST1) could not be resolved.

References : Doc ID 1546646.1 


SYMPTOMS

Datapump export log file contains the errors:

ORA-31693: Table data object "HR"."TEST1" failed to load/unload and is being skipped due to error:
ORA-02354: error in exporting/importing data
ORA-39826: Direct path load of view or synonym (HR.TEST1) could not be resolved.

CHANGES AND CAUSE

This is designed behaviour. The fix for unpublished Bug 9847421 introduced a new set of checks for object name resolution which includes the generation of the ORA-39826 error message (outlined in Bug 14006984).


Export backup has completed and backup was validated.  The below error was because of table was dropped during the runtime of EXPDP export that’s why doesn't find the table at the time of exporting that table.


SOLUTION

Please check whether the objects reported in the error message exist or not. The example below is related to the object mentioned in above error message:

vm215:ORCL $> sqlplus  / as sysdba

SELECT OWNER, OBJECT_NAME, OBJECT_TYPE, STAUS, LAST_DDL_TIME
FROM   DBA_OBJECTS
WHERE  OWNER = 'HR' AND OBJECT_NAME IN ('TEST1');

no row selected

If the query returns no rows, then you can expect the ORA-39826 is raised. You should make sure that the object exists when it is exported and it is not removed during the runtime of export. Dropping an object during the master control table of DataPump export is created and filled but before the actual table contents are exported, will result in these type of error.




Saturday, November 28, 2015

ORA-31634: job already exists | Datapump Master Table exists

ORA-31634: job already exists
Datapump Master Table exists


Error

Export Datapump job experience below error during export

Export: Release 11.2.0.1.0 - Production on Fri Nov 21 16:09:37 2015

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
ORA-31634: job already exists
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.KUPV$FT", line 1016
ORA-31637: cannot create job EXPDP_BACKUP for user ORACLE



Check the running jobs

SQL> set lines 200 pages 200 numwidth 10
col program for a40
col username for a14
col spid for a10
select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') "DATE", s.program, s.sid,
s.status, s.username, d.job_name, p.spid, s.serial#, p.pid
from v$session s, v$process p, dba_datapump_sessions d
where p.addr=s.paddr and s.saddr=d.saddr;

no rows selected




SQL> COL OPERATION FOR A14
SQL> COL JOB_MODE FOR A14
SQL> COL OWNER_NAME FOR A14
SQL> COL STATE FOR A15
SQL> SET LIN200 PAGES 200
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
-------------- ------------------------------ -------------- -------------- --------------- -----------------
ORACLE         BIN$JWB+GHK0NnLgUKeTGxwsxA==$0 EXPORT         FULL           NOT RUNNING                     0
ORACLE         BIN$JOCfGMFgf4XgUKeTGxwcEA==$0 EXPORT         FULL           NOT RUNNING                     0
ORACLE         EXPDP_BACKUP                   EXPORT         FULL           NOT RUNNING                     0
ORACLE         BIN$JYNqus85nL3gUKeTGxwpmQ==$0 EXPORT         FULL           NOT RUNNING                     0
ORACLE         BIN$JNMboNajQ6DgUKeTGxxb8g==$0 EXPORT         FULL           NOT RUNNING                     0
ORACLE         BIN$JSAQ5vj9TtngUKeTGxw+jg==$0 EXPORT         FULL           NOT RUNNING                     0

6 rows selected.


Checking Orphaned jobs

SQL> SELECT o.status, o.object_id, o.object_type,
o.owner||'.'||object_name "OWNER.OBJECT",o.created,j.state
FROM dba_objects o, dba_datapump_jobs j
WHERE o.owner=j.owner_name AND o.object_name=j.job_name
and j.state='NOT RUNNING' ORDER BY 4,2;


SQL> COL OWNER.OBJECT FOR A20
SQL> /


STATUS  OBJECT_ID OBJECT_TYPE         OWNER.OBJECT         CREATED            STATE
------- --------- ------------------- -------------------- ------------------ ---------------
VALID     1842419 TABLE               ORACLE.EXPDP_BACKUP  21-NOV-15 10.44.50 NOT RUNNING



Clear the master tables created by orphaned jobs

SQL> DROP TABLE ORACLE.EXPDP_BACKUP ;

Table dropped.


Now you can start the export.