Steps for generating an Oracle AWR report

Source: Internet
Author: User

Steps for generating an Oracle AWR report

Oracle AWR generates report data by comparing the statistical information collected by two snapshots. The generated report consists of multiple parts, which is similar to the report generated by Statspack. However, when generating a report, AWR can generate a report in two formats: TXT or HTML. HTML is more conducive to reading, TXT has a wider applicability (even on machines that cannot use browsers ).

Generate and view Oracle AWR reports

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

All the friends who have operated Statspack still remember to generate the report using $ ORACLE_HOME/rdbms/admin/spreport. the SQL script has the same operation steps as AWR, but there are many more options for generating the report script, including:
• Awrrpt. SQL: generate a statistical report for the specified snapshot range;
• Awrrpti. SQL: generates statistical reports for specified database instances and specified snapshot ranges;
• Awrsqlrpt. SQL: generate a statistical report for a specified snapshot interval and a specified SQL statement (the SQLID of the statement is actually specified;
• Awrsqrpi. SQL: generate statistical reports of specified SQL statements in the specified database instance and snapshot interval;
• Awrddrpt. SQL: Specifies two different time periods to generate statistical comparison reports for these two periods;
• Awrddrpi. SQL: Specifies the database instance and two different time periods to generate statistical comparison reports for these two periods;
 
The report generation process is as follows:
 
(1) Go to the command line and switch to your working directory:
 
Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
 
C: \ Documents ents and Settings \ Administrator> d:
 
D: \>
 
Note: The switch directory is used to set the storage location of the generated report file.
 
(2) Use sqlplus command line tool to log on to the database
 
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0-Production
With the Partitioning, OLAP and Data Mining options
 
D: \> sqlplus/nolog
 
SQL * Plus: Release 10.1.0.2.0-Production on Thursday May 20 16:48:19 2010
 
Copyright (c) 1982,200 4, Oracle. All rights reserved.
 
SQL> conn studydb/studydb @ studydb
 
Connected.
SQL>
 
(3) run the SQL file @ D: \ oracle \ product \ 10.1.0 \ Db_1 \ RDBMS \ ADMIN \ awrrpt. SQL
 
SQL> @ D: \ oracle \ product \ 10.1.0 \ Db_1 \ RDBMS \ ADMIN \ awrrpt. SQL
 
Current Instance
~~~~~~~~~~~~~~~~
 
DB Id DB Name Inst Num Instance
-------------------------------------------
2514848645 STUDYDB 1 studydb
 

Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Wocould you like an HTML report, or a plain text report?
Enter 'html' for an html report, or 'text' for plain text
Ults 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
--------------------------------------------------------
* 2514848645 1 STUDYDB studydb MIN
 
Using 2514848645 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>
Specifying a number lists all completed snapshots.
 
 
 
Listing the last 3 days of Completed Snapshots
 
Snap
Instance DB Name Snap Id Snap Started Level
--------------------------------------------------------
Studydb STUDYDB 271 19 August 14 1
 
272 19 August 14 1
273 19 August 14 1
274 19 August 14 1
275 19 August 14 1
 
276 20 May 14 1
277 May 20 1
278 May 20 1
 
279 May 20 August 14 1
280 May 20 1
281 May 20 1
 
 
 
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 279
Begin Snapshot Id specified: 279
 
Enter value for end_snap: 281
End Snapshot Id specified: 281
 
 
 
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_0000279_281.html. To use this name,
Press <return> to continue, otherwise enter an alternative.
 
Enter value for report_name: // Enter the generated file name. The default value is awrrpt_0000279_281.html.
 
.................... // The generation process is omitted
 
End of Report
</BODY> </HTML>
Report written to awrrpt_0000279_281.html
SQL>
 
(4) Report Generation completed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.