|
Steps to generate the AWR report
An AWR report is very similar to the STATSPACK report from Oracle9i, and it
contains vital elapsed-time information on what happened during particular
snapshot range.
Step 1: Go to the following location
| $ cd $ORACLE_HOME/rdbms/admin |
Step 2: Run this command
$ ls -al awr*
-rwxrwxr-x 1 oracle oinstall 20892 May 23 2005 awrddinp.sql
-rwxrwxr-x 1 oracle oinstall 7252 May 27 2005 awrddrpi.sql
-rwxrwxr-x 1 oracle oinstall 2005 May 27 2005 awrddrpt.sql
-rwxrwxr-x 1 oracle oinstall 11286 Apr 18 2005 awrextr.sql
-rwxrwxr-x 1 oracle oinstall 49166 Sep 1 2004 awrinfo.sql
-rwxrwxr-x 1 oracle oinstall 2462 Jan 5 2005 awrinpnm.sql
-rwxrwxr-x 1 oracle oinstall 8495 May 23 2005 awrinput.sql
-rwxrwxr-x 1 oracle oinstall 10324 Apr 18 2005 awrload.sql
-rwxrwxr-x 1 oracle oinstall 7575 Apr 18 2005 awrrpti.sql
-rwxrwxr-x 1 oracle oinstall 1999 Oct 24 2003 awrrpt.sql
-rwxrwxr-x 1 oracle oinstall 6676 Jan 5 2005 awrsqrpi.sql
-rwxrwxr-x 1 oracle oinstall 1469 Jan 5 2005 awrsqrpt.sql
|
Step 3: Connect to the Oracle
$ sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Wed May 21 08:51:52 2008
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn / as sysdba
Connected.
SQL> |
Step 5: Now run the awrrpt.sql. Select the format for the report as
either ‘HTML’ or ‘TEXT’.
SQL> @awrrpt
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
2339164857 MSB 1 msb
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:
|
Step 6: Select number of days you want to go back or just hit enter
for listing all completed snapshots.
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 2339164857 1 MSB msb abcd-dba-xxx
.abcd.com
* 2339164857 1 MSB msb abcddb
Using 2339164857 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: |
Step 7: Then specify Begin and End snapshot Ids.
Listing all Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
msb MSB 102 17 May 2008 04:30 1
103 17 May 2008 05:30 1
104 17 May 2008 06:30 1
105 17 May 2008 07:30 1
106 17 May 2008 08:31 1
107 17 May 2008 09:30 1
108 17 May 2008 10:30 1
109 17 May 2008 11:30 1
110 17 May 2008 12:30 1
111 17 May 2008 13:30 1
112 17 May 2008 14:30 1
113 17 May 2008 15:30 1
114 17 May 2008 16:30 1
115 17 May 2008 17:30 1
116 17 May 2008 18:30 1
117 17 May 2008 19:30 1
118 20 May 2008 15:46 1
119 20 May 2008 16:30 1
120 20 May 2008 17:30 1
121 20 May 2008 18:30 1
122 20 May 2008 19:30 1
123 20 May 2008 20:30 1
124 20 May 2008 21:30 1
125 20 May 2008 22:30 1
126 20 May 2008 23:30 1
127 21 May 2008 05:50 1
128 21 May 2008 06:30 1
129 21 May 2008 07:30 1
130 21 May 2008 08:30 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 102
Begin Snapshot Id specified: 102
Enter value for end_snap: 117
End Snapshot Id specified: 117 |
Step 8: Here you specify the name of the report or select the default
name assigned.
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_102_117.html. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name:
|
Step 9: The report gets generated.
End of Report
</BODY></HTML>
Report written to awrrpt_1_102_177.html
SQL> |
Step 10: Exit from SQLPLUS.
Step 11:
Run command ls –ltr to show the new file created under the path: $ORACLE_HOME/rdbms/admin
| -rw-r--r-- 1 oracle oinstall 186 May 21 09:06 awrrpt_1_102_117.html |
Report is ready to view.
Operating System: Redhat Linux
Database: Oracle 10g
|