oracle遇到性能問題時,性能分析的一個思路就是導出AWR分析報告,通過報告分析定位問題根源,以下是oracle10g如何生成分析報告的步驟,oracle10g AWR分析報告文件類型分為txt和html兩種,本人習慣使用html。
[root@linux5 /]# su - oracle
[oracle@linux5 ~]$ export ORACLE_SID=orcl
[oracle@linux5 ~]$ cd $ORACLE_HOME/rdbms/admin
[oracle@linux5 admin]$ sqlplus /nolog
SQL> conn /as sysdba
Connected.
SQL> @awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
?? DB Id??? DB Name????? Inst Num Instance
----------- ------------ -------- ------------
?1260101618 ORCL??????????????? 1 orcl
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'
Enter value for report_type: html???????????????????“選擇報告輸出的文件類型”
Type Specified:? html???????????
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
?? DB Id???? Inst Num DB Name????? Instance???? Host
------------ -------- ------------ ------------ ------------
* 1260101618??????? 1 ORCL???????? orcl???????? linux5
Using 1260101618 for database Id
Using????????? 1 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.
Enter value for num_days: 3????????????????????????? “報告輸出的時間范圍選擇”
Listing the last 3 days of Completed Snapshots
??????????????????????????????????????????????????????? Snap
Instance???? DB Name??????? Snap Id??? Snap Started??? Level
------------ ------------ --------- ------------------ -----
orcl???????? ORCL???????????????? 1 13 Oct 2010 23:00????? 1
????????????????????????????????? 2 14 Oct 2010 00:00????? 1
????????????????????????????????? 3 14 Oct 2010 01:00????? 1
????????????????????????????????? 4 14 Oct 2010 02:00????? 1
????????????????????????????????? 5 14 Oct 2010 03:00????? 1
????????????????????????????????? 6 14 Oct 2010 04:00????? 1
????????????????????????????????? 7 14 Oct 2010 05:00????? 1
????????????????????????????????? 8 14 Oct 2010 06:00????? 1
????????????????????????????????? 9 14 Oct 2010 07:00????? 1
?
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
“選擇獲取報告的快照范圍”
Enter value for begin_snap: 2
Begin Snapshot Id specified: 2
Enter value for end_snap: 9
End?? Snapshot Id specified: 9
?
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_2_9.html.? To use this name,
press <return> to continue, otherwise enter an alternative.
“輸出分析報告文件”
Enter value for report_name: /opt/awrrpt.html
posted on 2010-10-20 09:55
cssseek 閱讀(1961)
評論(1) 編輯 收藏 所屬分類:
數據庫