ITPub博客

首页 > 数据库 > Oracle > Oracle10g使用$ORACLE_HOME/rdbms/admin/awrrpt.sql报错

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

原创 Oracle 作者:kisslfcr 时间:2015-08-18 17:06:52 0 删除 编辑
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博客 ” ,链接:https://blog.itpub.net/29135257/viewspace-1775377/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-01-12

  • 博文量
    246
  • 访问量
    426086