Wednesday, July 17, 2013

Full DB Export Failing With EXP-00008: ORA-01031 and ORA-06512: EXP-00085:

Error while Full DB Export:

. exporting post-schema procedural objects and actions
EXP-00008: ORACLE error 1031 encountered
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 2296
ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 52
ORA-06512: at line 1
EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.grant_exp for object 358534
EXP-00008: ORACLE error 1031 encountered
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 2296
ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 52
ORA-06512: at line 1EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.grant_exp for object 358535
EXP-00008: ORACLE error 1031 encountered
ORA-01031: insufficient privilegesORA-06512: at "SYS.DBMS_SCHED_MAIN_EXPORT", line 2296
ORA-06512: at "SYS.DBMS_SCHED_JOB_EXPORT", line 52
ORA-06512: at line 1EXP-00085: The previous problem occurred when calling SYS.DBMS_SCHED_JOB_EXPORT.grant_exp for object 358533.
. exporting user history table


Cause:
OCM jobs ORACLE_OCM Job MGMT_CONFIG_JOB scheduled to be running at the same time, hence export is failing. The scheduled jobs are interrupting the export completion. Oracle was able to identify this from their internal document(not available to outside users).

Solution:
SQL> select object_name, object_type, status from dba_objects where object_id in (358534,358535,358533);

-- see if this returns any rows or not. For me it did not return any values, this means that the objects with IDs 358534, 358535, 358533 do not exist in DBA_OBJECTS 

Check the owner of the jobs with statement:
connect / as sysdba
select owner, job_name, state, next_run_date, last_start_date, last_run_duration from dba_scheduler_jobs;

Than disable the jobs with following commands:

exec dbms_scheduler.disable ('<owner>.MGMT_STATS_CONFIG_JOB');
exec dbms_scheduler.disable ('<owner>.MGMT_CONFIG_JOB');


Or:

Make sure that export job and OCM jobs are not running at the same time.


OCM Jobs:
OCM jobs are default jobs that were introduced starting in Oracle11i. You can disable them and purpose of OCM is to proactively monitor Oracle environment and sending to My Oracle Support(metalink).

1 comment:

  1. Didn't work for me after disabling both jobs... errors persist.
    Still searching...

    ReplyDelete