Tuesday, August 4, 2015

How to Generate Automatic Workload Repository (AWR) Report


Lets Assume,

1. Database Version = Oracle Database 11g Release 2
2. Environment = Real Application Cluster
3. Oracle Home = /u01/app/oracle/product/11.2.0.3/db_1

[oracle@dbrac1 ~]$  cd $ORACLE_HOME/rdbms/admin
[oracle@dbrac1 db_1]$ sqlplus / as sysdba
SQL> @awrrpt;

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

   DB Id              DB Name      Inst Num      Instance
-----------            ------------       --------         ------------
 2599862690      ORCL              2                 orcl2


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: [Press Enter]

Type Specified:  html

Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   DB Id              Inst Num DB Name      Instance     Host
------------           --------      ------------     ------------ ------------
  2599862690        1              ORCL       orcl1      prod1.com
* 2599862690       2              ORCL       orcl2      prod2.com

Using 2599862690 for database Id
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.

Enter value for num_days: [Enter Value for Number of Days]

                                                          
Instance     DB Name        Snap Id    Snap Started          Snap Level
------------   ------------        --------- ------------------           -----
orcl2      ORCL              5726       04 Aug 2015 00:00      1
                                       5727       04 Aug 2015 01:00      1
                                       5728       04 Aug 2015 02:00      1
                             

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 5726  [Enter Value for Start Snap ID ]
Begin Snapshot Id specified: 5726

Enter value for end_snap: 5727 [Enter Value for End Snap ID ]
End   Snapshot Id specified: 5727


Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_2_5726_5727.html.  To use this name,
press <return> to continue, otherwise enter an alternative.

Enter value for report_name: [Press Enter]

Using the report name awrrpt_2_5727_5728.html


Report written to awrrpt_2_5726_5727.html
SQL>

At this Stage AWR Report Generated named awrrpt_2_5726_5727.html.



No comments:

Post a Comment