Wednesday, March 09, 2011

Data pump expdp failed with DMSYS related errors ORA-39126 ORA-06512 etc

Today one of our data pump export/import jobs failed with errors attached at the bottom.  The process working fine before our 11g upgrade. 
I did a little research and found metalink doc 304449.1 has perfect solution.

The problem is we removed some unused database options before we upgrade from 10g to 11g.
The reason is because with all these unnecessary options, the upgrade scripts will run almost two hours. Removing them the upgrade will finish in 15 minutes. 

It turns out DMSYS data mining option is among them, but somehow Oracle didn't cleanly remove the option with some left over records in data pump export table.

The solution in this case is delete these records,

SQL> commit;

There are other potential causes for the same error. You can check the metalink doc for more info.

Database Data Pump Export fails with PLS-00201 identifier DMSYS.DBMS_MODEL_EXP must be declared [ID 304449.1]

Connected to: Oracle Database 11g Enterprise Edition Release - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_11":  userid=system/********@TEST parfile=/home/oracle/dba/sql/DWS.par 
Estimate in progress using BLOCKS method...
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS [] 
ORA-31642: the following SQL statement fails: 
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_METADATA", line 1245
ORA-04063: package body "DMSYS.DBMS_DM_MODEL_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called: "DMSYS.DBMS_DM_MODEL_EXP"
ORA-06512: at "SYS.DBMS_METADATA", line 5300
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.KUPW$WORKER", line 8159
----- PL/SQL Call Stack -----
  object      line  object
  handle    number  name
70000007ddbc258     19028  package body SYS.KUPW$WORKER
70000007ddbc258      8191  package body SYS.KUPW$WORKER
70000007ddbc258     12728  package body SYS.KUPW$WORKER
70000007ddbc258      4618  package body SYS.KUPW$WORKER
70000007ddbc258      8902  package body SYS.KUPW$WORKER
70000007ddbc258      1651  package body SYS.KUPW$WORKER
70000007eaf9060         2  anonymous block


thankful_guy said...

Thanks for the post. I received a similar error after "patching" to I use the term "patching" because, apparently, as of all patchsets are full installations.

Anyway, I didn't remove or modify any options. DataMiningwas never installed in the DB prior to the patchset and upgrade. Everything worked peachy in After the upgrade to this exact error started occurring. Removing the DM entries appears to have fixed our issue, too.

Again, thanks. This post saved me some real heartache.

Anonymous said...

Thank you! This was exactly my problem.

G. Ram