ORA-04063: package body "EXFSYS.DBMS_EXPFIL_EXP" has errors

今天同事遇到一个exp的问题,让我帮忙解决,初步可以判定原因。
 
一、问题描述:
exp in  10.2.0.4

. exporting dimensions
. exporting post-schema procedural objects and actions
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "EXFSYS.DBMS_EXPFIL_EXP" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"EXFSYS.DBMS_EXPFIL_EXP"
ORA-06512: at "EXFSYS.DBMS_EXPFIL_DEPASEXP", line 61
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling
EXFSYS.DBMS_EXPFIL_DEPASEXP.schema_info_exp
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "DMSYS.DBMS_DM_IMP_INTERNAL" has errors
ORA-06508: PL/SQL: could not find program unit being called:
"DMSYS.DBMS_DM_IMP_INTERNAL"
ORA-06512: at "DMSYS.DBMS_DM_MODEL_EXP", line 303
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling
DMSYS.DBMS_DM_MODEL_EXP.schema_info_exp
. exporting statistics
Export terminated successfully with warnings.
 
       上metalink 查询错误ORA-04063 找到相关解释,虽然很像,但是报错的 package body 不是同一个,我在自己的测试环境模拟了一下错误。
       首先,把package body "EXFSYS.DBMS_EXPFIL_DEPASEXP" 进行edit, 然后compile出现错误,
select * from dba_objects w
where w.status <> 'VALID'
and w.owner = 'EXFSYS'
发现无效对象为:
DBMS_EXPFIL_EXP ,PACKAGE
DBMS_EXPFIL_EXP ,PACKAGE BODY
DBMS_EXPFIL_DEPASEXP ,PACKAGE BODY
DBMS_RLMGR_EXP ,PACKAGE BODY
此时,exp会出现上述错误,解决办法为:
alter PACKAGE EXFSYS.DBMS_EXPFIL_EXP compile;
alter PACKAGE EXFSYS.DBMS_EXPFIL_EXP compile BODY;
alter PACKAGE EXFSYS.DBMS_EXPFIL_DEPASEXP compile BODY;
alter PACKAGE EXFSYS.DBMS_RLMGR_EXP compile BODY;
exp问题解决。但是这是在我的测试环境模拟出来的错误,在那个生产环境上invalid的对象有80多个,是EXFSYS下的,我觉得很奇怪,初步判断可能是打patch或者当时安装时导致的EXFSYS下的大部分对象无效,由于一些procedures是加密的所以暂时没有查看,怀疑是这个地方导致错误的产生。不过经核实,除了这个warning,基于schema的对象已经被正确导出。
 
参考连接:
1. http://www.lazydba.com/oracle/0__163047.html
2. metalink
EXP-00008 ORA-04063 ORA-06508 EXP-00083 DMSYS.DBMS_DM_UTIL [ID 457011.1]  
--------------------------------------------------------------------------------
 
  修改时间 04-SEP-2007     类型 PROBLEM     状态 MODERATED  
In this Document
  Symptoms
  Cause
  Solution
 
--------------------------------------------------------------------------------
 
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process, and therefore has not been subject to an independent technical review.

Applies to:
Oracle Server - Enterprise Edition - Version: 10.1 to 10.2
This problem can occur on any platform.
Symptoms
The export jobs fails with the following errors:
EXP-00008: ORACLE error 4063 encountered
ORA-04063: package body "DMSYS.DBMS_DM_UTIL" has errors
ORA-06508: PL/SQL: could not find program unit being called
ORA-06512: at "DMSYS.DBMS_DM_MODEL_EXP", line 89
ORA-06512: at "DMSYS.DBMS_DM_MODEL_EXP", line 763
ORA-06512: at line 1
EXP-00083: The previous problem occurred when calling DMSYS.DBMS_DM_MODEL_EXP.schema_info_exp

Cause
Check for invalid objects in the database:
SQL> connect system/manager
SQL> set lines 200
SQL> select status, object_id, object_type, owner||'.'||object_name "OWNER.OBJECT"
from dba_objects where status != 'VALID' order by 4,2;
The output shows that package DMSYS.DBMS_DM_UTIL is invalid.
Package DMSYS.DBMS_DM_UTIL is used by the Oracle Data Mining option.
Solution
Please do the following:
SQL> CONNECT / as sysdba
Connected.
1) SQL>grant execute on utl_file to public;
2)Login as DMSYS user. If you are not using Oracle Data Mining then it would
fail during login because the account is locked.
Do the following to unlock the account and then login as DMSYS
SQL> ALTER USER dmsys IDENTIFIED BY dmsys ACCOUNT UNLOCK;
SQL> CONNECT dmsys/dmsys
Connected.
SQL> @$ORACLE_HOME/dm/admin/dmutil.plb
Package created.
Package created.
3)Now recompile the invalid dmsys packages if any,
SQL>alter package compile body;

After the package body is successfully recompiled try the export again.
 
3. Invalid Component After Upgrade From 10.2.0.2 To 10.2.0.3 [ID 471149.1]
 
 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9252210/viewspace-671446/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9252210/viewspace-671446/

你可能感兴趣的:(ORA-04063: package body "EXFSYS.DBMS_EXPFIL_EXP" has errors)