使用awrrpt.sql 生成AWR报告

sqlplus / as sysdba 

@$ORACLE_HOME/rdbms/admin/awrrpt.sql 

html 

要生成报告的天数 

开始快照的id 

结束快照的id 

生成报告的名称

oracle:/oradata> sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Fri Aug 25 09:17:46 2017

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Data Mining and Real Application Testing options

SQL> @$ORACLE_HOME/rdbms/admin/awrrpt.sql

Current Instance
~~~~~~~~~~~~~~~~

   DB Id    DB Name      Inst Num Instance
----------- ------------ -------- ------------
 4190452903 GZSCM               1 gzscm


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
------------ -------- ------------ ------------ ------------
* 4190452903        1 GZSCM        gzscm        gzscmapp
* 4190452903        1 GZSCM        gzscm        gzscmdb

Using 4190452903 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: 2

Listing the last 2 days of Completed Snapshots

                                                        Snap
Instance     DB Name        Snap Id    Snap Started    Level
------------ ------------ --------- ------------------ -----
gzscm        GZSCM            66487 24 Aug 2017 00:00      1
                              66488 24 Aug 2017 01:00      1
                              66489 24 Aug 2017 02:00      1
                              66490 24 Aug 2017 03:00      1
                              66491 24 Aug 2017 04:00      1
                              66492 24 Aug 2017 05:00      1
                              66493 24 Aug 2017 06:00      1
                              66494 24 Aug 2017 07:00      1
                              66495 24 Aug 2017 08:00      1
                              66496 24 Aug 2017 09:00      1
                              66497 24 Aug 2017 10:00      1
                              66498 24 Aug 2017 11:00      1
                              66499 24 Aug 2017 12:00      1
                              66500 24 Aug 2017 13:01      1
                              66501 24 Aug 2017 14:00      1
                              66502 24 Aug 2017 15:00      1
                              66503 24 Aug 2017 16:00      1
                              66504 24 Aug 2017 17:00      1
                              66505 24 Aug 2017 18:00      1
                              66506 24 Aug 2017 19:00      1
                              66507 24 Aug 2017 20:00      1
                              66508 24 Aug 2017 21:00      1
                              66509 24 Aug 2017 22:00      1
                              66510 24 Aug 2017 23:00      1
                              66511 25 Aug 2017 00:00      1
                              66512 25 Aug 2017 01:00      1
                              66513 25 Aug 2017 02:00      1
                              66514 25 Aug 2017 03:00      1
                              66515 25 Aug 2017 04:00      1
                              66516 25 Aug 2017 05:00      1
                              66517 25 Aug 2017 06:00      1
                              66518 25 Aug 2017 07:00      1
                              66519 25 Aug 2017 08:00      1
                              66520 25 Aug 2017 09:00      1



Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 66501
Begin Snapshot Id specified: 66501

Enter value for end_snap: 66504
原文地址:https://www.cnblogs.com/yeyerl/p/7416596.html