[BEGIN] 2013/4/12 10:02:51
1、AWR 报告的生成方法:
====================
[oracle@test210 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Apr 12 10:03:11 2013
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> var awr_report_id number
SQL> exec :awr_report_id:=dbms_workload_repository.create_snapshot
PL/SQL procedure successfully completed.
SQL> print awr_report_id
AWR_REPORT_ID
-------------
2546
SQL> @?/rdbms/admin/awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
4121301058 ORA10G 1 ora10g
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:
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 4121301058 1 ORA10G ora10g test210
Using 4121301058 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
specifying a number lists all completed snapshots.
Enter value for num_days: 1
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
ora10g ORA10G 2535 12 Apr 2013 00:00 1
2536 12 Apr 2013 01:00 1
2537 12 Apr 2013 02:00 1
2538 12 Apr 2013 03:00 1
2539 12 Apr 2013 04:00 1
2540 12 Apr 2013 05:00 1
2541 12 Apr 2013 06:00 1
2542 12 Apr 2013 07:00 1
2543 12 Apr 2013 08:00 1
2544 12 Apr 2013 09:00 1
2545 12 Apr 2013 10:00 1
2546 12 Apr 2013 10:04 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 2545
Begin Snapshot Id specified: 2545
Enter value for end_snap: 2546
End Snapshot Id specified: 2546
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_2545_2546.html. To use this name,
press
Enter value for report_name:
Using the report name awrrpt_1_2545_2546.html
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
2、在当前路径下即可找到生成的awr报告
=================================
[oracle@test210 ~]$ ls
awrrpt_1_2545_2546.html