共计 1815 个字符,预计需要花费 5 分钟才能阅读完成。
测试环境数据泵备份突然报这莫名其妙的错误,怎么引发的原因不详,只能见招拆招先解决问题了。
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 – 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
Starting “SYS”.”SYS_EXPORT_SCHEMA_04″: “/******** AS SYSDBA” ESTIMATE_ONLY=y schemas=GAMEX1125 ESTIMATE=statistics
Estimate in progress using STATISTICS method…
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.CONFIGURE_METADATA_UNLOAD [ESTIMATE_PHASE]
ORA-04063: package body “SYS.DBMS_METADATA” has errors
ORA-06508: PL/SQL: could not find program unit being called: “SYS.DBMS_METADATA”
ORA-06512: at “SYS.DBMS_SYS_ERROR”, line 95
ORA-06512: at “SYS.KUPW$WORKER”, line 9001
—– PL/SQL Call Stack —–
object line object
handle number name
0x44865a0a8 20462 package body SYS.KUPW$WORKER
0x44865a0a8 9028 package body SYS.KUPW$WORKER
0x44865a0a8 6814 package body SYS.KUPW$WORKER
0x44865a0a8 13688 package body SYS.KUPW$WORKER
0x44865a0a8 4633 package body SYS.KUPW$WORKER
0x44865a0a8 9753 package body SYS.KUPW$WORKER
0x44865a0a8 1775 package body SYS.KUPW$WORKER
0x41dc261f0 2 anonymous block
Job “SYS”.”SYS_EXPORT_SCHEMA_04″ stopped due to fatal error at 13:23:12
alter package body DBMS_METADATA compile;
看到 ORA-04063 的错误,尝试去手动编译,看有没有报错
SQL> alter package SYS.DBMS_METADATA compile body;
If there are errors,
SQL> show errors;
发现确实有错误,有 PLS-00905 这样的错误,错误日志漏发了。
解决方法:
1、首先尝试去编译这个包:
SQL> alter package SYS.DBMS_METADATA compile package;
SQL> alter package SYS.DBMS_METADATA compile body;
2、如果上述报错,尝试下面的方法:
SQL> shutdown immediate;
SQL> startup upgrade;
SQL> @$ORACLE_HOME/rdbms/admin/catalog.sql;// 执行这个脚本后,创建数据库的统计视图,审计视图
SQL> @$ORACLE_HOME/rdbms/admin/catproc.sql;// 数据库具有 pl/sql 的使用功能
SQL> @$ORACLE_HOME/rdbms/admin/utlrp.sql;// 编译数据库中的失效对象 utlrp.sql
SQL> shutdown immediate;
SQL> startup;
再执行导出语句。
更多 Oracle 相关信息见 Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
本文永久更新链接地址 :http://www.linuxidc.com/Linux/2016-09/135244.htm