匯出報錯:ORA-04063: package body "DMSYS.DBMS_DM_MODEL_EXP" has errors

tolywang發表於2015-06-08
Oracle 11.2.0.2 , EBS R12.1.3   

因為是升級的資料庫系統, 保留了 DMSYS   data mining 元件, 但是在庫中處於INVALID 狀態, 查詢 dba_registry 可以看到。 

匯出metadata 時報錯:   
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_METADATA", line 1282
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_SYS_ERROR", line 86
ORA-06512: at "SYS.KUPW$WORKER", line 8398

處理方法: 
SQL> drop user DMSYS;
SQL> DELETE FROM SYS.EXPPKGACT$ WHERE SCHEMA = 'DMSYS';
SQL> SELECT COUNT(*) FROM DBA_SYNONYMS WHERE TABLE_OWNER = 'DMSYS';
 
SQL> SET HEAD OFF
SQL> SPOOL /DROP_DMSYS_SYNONYMS.SQL
SQL> SELECT 'Drop public synonym ' || SYNONYM_NAME || ' ;'
     FROM DBA_SYNONYMS WHERE TABLE_OWNER = 'DMSYS'; 
SQL> SPOOL OFF
SQL> @/DROP_DMSYS_SYNONYMS.SQL
SQL> EXIT;

已經不用dmsys了

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-1691639/,如需轉載,請註明出處,否則將追究法律責任。

相關文章