导出报错:ORA-04063: package body “DMSYS.DBMS_DM_MODEL_EXP

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了

相关推荐