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)
但是動作太大,無法在產品環境試驗
 
 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM