Oracle AWR報告提取方法

來源:互聯網
上載者:User

標籤:style   blog   color   os   ar   for   sp   檔案   資料   

本文旨在用來指導項目人員自行提取Oracle資料庫的AWR報告.

1.當前串連執行個體的AWR報告提取:@?/rdbms/admin/awrrpt

SQL> @?/rdbms/admin/awrrptCurrent Instance~~~~~~~~~~~~~~~~   DB Id    DB Name      Inst Num Instance----------- ------------ -------- ------------  857123342 JY                  1 jy1Specify the Report Type~~~~~~~~~~~~~~~~~~~~~~~Would you like an HTML report, or a plain text report?Enter ‘html‘ for an HTML report, or ‘text‘ for plain textDefaults to ‘html‘Enter value for report_type: Type Specified:  htmlInstances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   DB Id     Inst Num DB Name      Instance     Host------------ -------- ------------ ------------ ------------  857123342         2 JY           jy2          rac2-server* 857123342         1 JY           jy1          rac1-serverUsing  857123342 for database IdUsing          1 for instance numberSpecify the number of days of snapshots to choose from~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Entering the number of days (n) will result in the most recent(n) days of snapshots being listed.  Pressing <return> withoutspecifying a number lists all completed snapshots.Enter value for num_days: 1Listing the last day‘s Completed Snapshots                                                        SnapInstance     DB Name        Snap Id    Snap Started    Level------------ ------------ --------- ------------------ -----jy1          JY                  92 16 Oct 2014 07:32      1                                 93 16 Oct 2014 09:00      1                                 94 16 Oct 2014 10:00      1                                 95 16 Oct 2014 11:00      1Specify the Begin and End Snapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Enter value for begin_snap: 94Begin Snapshot Id specified: 94Enter value for end_snap: 95End   Snapshot Id specified: 95Specify the Report Name~~~~~~~~~~~~~~~~~~~~~~~The default report file name is awrrpt_1_94_95.html.  To use this name,press <return> to continue, otherwise enter an alternative.Enter value for report_name: Using the report name awrrpt_1_94_95.html
此處省略大量螢幕輸出..
End of Report</BODY></HTML>Report written to awrrpt_1_94_95.htmlSQL> !pwd/home/oracle

註:產生的報告檔案發送給我即可,例如此處就是指awrrpt_1_94_95.html檔案,代表的是2014年10月16日10點~11點這一小時的資料庫執行個體jy1的工作負載報告。

 

2.RAC的其他執行個體AWR報告提取:@?/rdbms/admin/awrrpti

SQL> @?/rdbms/admin/awrrptiSpecify the Report Type~~~~~~~~~~~~~~~~~~~~~~~Would you like an HTML report, or a plain text report?Enter ‘html‘ for an HTML report, or ‘text‘ for plain textDefaults to ‘html‘Enter value for report_type: Type Specified:  htmlInstances in this Workload Repository schema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   DB Id     Inst Num DB Name      Instance     Host------------ -------- ------------ ------------ ------------  857123342         2 JY           jy2          rac2-server* 857123342         1 JY           jy1          rac1-serverEnter value for dbid: 857123342Using 857123342 for database IdEnter value for inst_num: 2Using 2 for instance numberSpecify the number of days of snapshots to choose from~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Entering the number of days (n) will result in the most recent(n) days of snapshots being listed.  Pressing <return> withoutspecifying a number lists all completed snapshots.Enter value for num_days: Listing all Completed Snapshots                                                        SnapInstance     DB Name        Snap Id    Snap Started    Level------------ ------------ --------- ------------------ -----jy2          JY                  91 14 Oct 2014 10:10      1                                 92 16 Oct 2014 07:32      1                                 93 16 Oct 2014 09:00      1                                 94 16 Oct 2014 10:00      1                                 95 16 Oct 2014 11:00      1 Specify the Begin and End Snapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Enter value for begin_snap: 94Begin Snapshot Id specified: 94Enter value for end_snap: 95  End   Snapshot Id specified: 95 Specify the Report Name~~~~~~~~~~~~~~~~~~~~~~~The default report file name is awrrpt_2_94_95.html.  To use this name,press <return> to continue, otherwise enter an alternative.Enter value for report_name: Using the report name awrrpt_2_94_95.html此處省略大量螢幕輸出..End of Report</BODY></HTML>Report written to awrrpt_2_94_95.html

 

3.手工產生一個快照:

exec dbms_workload_repository.create_snapshot();
SQL> exec dbms_workload_repository.create_snapshot();PL/SQL procedure successfully completed.

 

Oracle AWR報告提取方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.