Oracle10g使用$ORACLE_HOME/rdbms/admin/awrrpt.sql报错

Enter value for report_name:
Using the report name awrrpt_1_591_593.html
select output from table(dbms_workload_repository.awr_report_html( :dbid,
*
ERROR at line 1:
ORA-04063: package body "SYS.DBMS_WORKLOAD_REPOSITORY" has errors
Report written to awrrpt_1_591_593.html

查看无效对象:
DBMS_SWRF_REPORT_INTERNAL和DBMS_WORKLOAD_REPOSITORY均无效
尝试编译DBMS_WORKLOAD_REPOSITORY,报错:对象DBMS_SWRF_REPORT_INTERNAL无效
尝试编译DBMS_SWRF_REPORT_INTERNAL报错:
PLS-00753:malformed or corrupted wrapped unit
DBMS_SWRF_REPORT_INTERNAL
使用如下命令,查看错误代码
$ sqlplus / as sysdba
SQL>set serveroutput on
SQL> alter package DBMS_SWRF_REPORT_INTERNAL compile;
SQL>show error
SQL> alter package DBMS_SWRF_REPORT_INTERNAL compile body;
SQL>show error
SQL> alter package DBMS_WORKLOAD_REPOSITORY compile;
SQL> alter package DBMS_WORKLOAD_REPOSITORY compile body;
SQL>show error
查找相关资料,使用如下sql修复包
$sqlplus "/as sysdba"
SQL> @?/rdbms/admin/catawrtb.sql
SQL> @?/rdbms/admin/dbmsawr.sql
SQL> @?/rdbms/admin/prvtawr.plb
SQL> @?/rdbms/admin/utlrp.sql
SQL> @?/rdbms/admin/awrrpt.sql
--If error still exists, please restart the database and try again....
SQL> shutdown immediate
SQL> startup
SQL> @?/rdbms/admin/awrrpt.sql

测试环境测试通过
正在正式环境也测试:
Using the report name awrrpt_1_52549_52550.html
select output from table(dbms_workload_repository.awr_report_html( :dbid,
                         *
ERROR at line 1:
ORA-04045: errors during recompilation/revalidation of SYS.DBMS_SWRF_REPORT_INTERNAL
ORA-04030: out of process memory when trying to allocate 4120 bytes (PLS non-lib hp,pdz2M87_Allocate_Permanent)
ORA-06508: PL/SQL: could not find program unit being called: "SYS.DBMS_SWRF_REPORT_INTERNAL"
ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 309
ORA-06512: at line 1
Report written to awrrpt_1_52549_52550.html

排查:
根据文档
Diagnosing and Resolving ORA-4030 Errors (文档 ID 233869.1)排查
Oracle建议重建awr库:
How to Recreate The AWR ( AUTOMATIC WORKLOAD ) Repository ? (文档 ID 782974.1)
但是动作太大,无法在产品环境试验

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

转载于:http://blog.itpub.net/29135257/viewspace-1775377/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值