AWR導入分析數據之後,就要對數據庫進行分析,我之前導入的AWR數據是RAC環境,利用awrrpt.sql只能對本地的數據庫生成AWR報告,要生成導入的數據庫的AWR報告,就需要使用awrrpti.sql這個腳本。
QL> @?/rdbms/admin/awrrpti
Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
輸入 report_type 的值: html
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 1520519778 1 STREAM stream STREAM
2400249746 1 CNDERPDB cnderpdb1 p5a1
2400249746 2 CNDERPDB cnderpdb2 p5b1
輸入 dbid 的值: 2400249746 ----可以看到2400249746爲要分析的數據庫的DBID,爲RAC環境
Using 2400249746 for database Id
輸入 inst_num 的值: 2 ----生成cnderpdb2實例的awr報告
Using 2 for instance number
Specify 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> without
specifying a number lists all completed snapshots.
輸入 num_days 的值: 5
Listing the last 5 days of Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
cnderpdb2 CNDERPDB 50104 18 6月 2011 00:59 1
50105 18 6月 2011 01:59 1
50106 18 6月 2011 03:00 1
......
50208 22 6月 2011 09:00 1
50209 22 6月 2011 09:59 1
Specify the Begin and End Snapshot Ids
輸入 begin_snap 的值: 50104
Begin Snapshot Id specified: 50104
輸入 end_snap 的值: 50209
End Snapshot Id specified: 50209
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_2_50104_50209.html. To use this name,
press <return> to continue, otherwise enter an alternative.
輸入 report_name 的值: d:\awr50104_50209
Using the report name d:\awr50104_50209
由於是RAC環境,cnderpdb1 節點的AWR也要生成,和cnderpdb2節點的AWR報告對比分析。