中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Oracle重建awr步驟

發布時間:2020-08-09 20:33:47 來源:ITPUB博客 閱讀:252 作者:甲骨文技術支持 欄目:關系型數據庫
1.穩妥起見,建議停機重建

2.如果是rac環境需要修改如下參數:

  1. alter system set cluster_database = false scope = spfile;
3.執行如下腳本開始清除,執行速度很快,因為都是drop,如果遇到某個表不存在的報錯,無須理會

  1. @?/rdbms/admin/catnoawr.sql
4.運行腳本執行重建

  1. @?/rdbms/admin/catawrtb.sql
5.運行腳本編譯無效對象

  1. @?/rdbms/admin/utlrp.sql
6. 11g運行如下腳本

  1. @?/rdbms/admin/execsvrm.sql
運行這個腳本的時候,遇到如下報錯:

  1. BEGIN
  2. *
  3. ERROR at line 1:
  4. ORA-04068: existing state of packages has been discarded
  5. ORA-04061: existing state of package "SYS.DBMS_SWRF_INTERNAL" has been
  6. invalidated
  7. ORA-04065: not executed, altered or dropped package "SYS.DBMS_SWRF_INTERNAL"
  8. ORA-06508: PL/SQL: could not find program unit being called:
  9. "SYS.DBMS_SWRF_INTERNAL"
  10. ORA-06512: at line 3
解決辦法是對包重新編譯:

  1. alter package dbms_swrf_internal compile;
  2. alter package dbms_swrf_internal compile body;
7.重新執行第六步

8.生成一個報告試試

  1. exec dbms_workload_repository.create_snapshot;
遇到如下報錯:

  1. SQL> exec dbms_workload_repository.create_snapshot;
  2. BEGIN dbms_workload_repository.create_snapshot; END;

  3. *
  4. ERROR at line 1:
  5. ORA-13518: Invalid database id (819500514)
  6. ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 99
  7. ORA-06512: at "SYS.DBMS_WORKLOAD_REPOSITORY", line 122
  8. ORA-06512: at line 1
在MOS上找到一篇文章說了這個問題


  1. ORA-13518 : 'Invalid Database Id' On Call to DBMS_WORKLOAD_REPOSITORY Package [ID 984447.1]


    Changes
     Recently AWR was recreated using catnoawr.sql and catawrtb.sql. 
    Cause
     When a function / procedure is called from DBMS_WORKLOAD_REPOSITORY package,  it refers table WRM$_DATABASE_INSTANCE to get dbid information.
     As the AWR repositories has been recreated , the table doesn't not have any data present in it. 
     
    SQL> select * from WRM$_DATABASE_INSTANCE ;
     no rows selected


    Solution
    The WRM$_DATABASE_INSTANCE gets populated with instance information when the instance is rebooted. 
    So, If you have recreated AWR using catnoawr.sql , catawrtb.sql , then you need to bounce the Instance . 
    On restart , the table will be populated with the requisite information. 
    Hence , better option for recreating AWR is to use startup restrict method. 
    After the recreation activity is completed , shutdown the database and open it normally.


9.重啟后問題解決

10.修改rac 相關參數

  1. alter system set cluster_database =truescope= spfile;
11.生成awr報告

  1. @$ORACLE_HOME/rdbms/admin/awrrpt.sql




向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

徐州市| 会泽县| 北碚区| 卫辉市| 东乡族自治县| 龙海市| 丹棱县| 延津县| 龙南县| 临汾市| 额敏县| 崇左市| 界首市| 油尖旺区| 惠水县| 册亨县| 河津市| 尉犁县| 新密市| 开鲁县| 新余市| 西充县| 岳池县| 青海省| 灵武市| 涞水县| 页游| 张北县| 乌海市| 邯郸县| 晋州市| 永宁县| 布拖县| 弋阳县| 连云港市| 铜鼓县| 五常市| 化隆| 上杭县| 长子县| 安西县|