Generate AWR reports from command line

Sometimes generating AWR reports from Grid Control can be slow, or even hang with timeouts. Creating the report from the server directly is usually quicker.

All the report generation sql are stored in the directory $ORACLE_HOME/rdbms/admin/

1. The awrrpt.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids.
2. The awrrpti.sql SQL script generates an HTML or text report that displays statistics for a range of snapshot Ids on a specified database and instance.
3. The awrsqrpt.sql SQL script generates an HTML or text report that displays statistics of a particular SQL statement for a range of snapshot Ids. Run this report to inspect or debug the performance of a SQL statement.
4. The awrsqrpi.sql SQL script generates an HTML or text report that displays statistics of a particular SQL statement for a range of snapshot Ids on a specified SQL.
5. The awrddrpt.sql SQL script generates an HTML or text report that compares detailed performance attributes and configuration settings between two selected time periods.
6. The awrddrpi.sql SQL script generates an HTML or text report that compares detailed performance attributes and configuration settings between two selected time periods on a specific database and instance.

 

[**LIVE**]mydb07:/u01/app/oracle/product/11.1/db/rdbms/admin : sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 – Production on Fri Apr 27 09:51:09 2012
Copyright (c) 1982, 2008, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 – 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> @awrrpt.sql

Current Instance
~~~~~~~~~~~~~~~~
DB Id       DB Name      Inst Num Instance
———– ———— ——– ————
4284183767  DB1                2  DB12

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: text

Type Specified:  text

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

Enter value for end_snap: 151537
End   Snapshot Id specified: 151537

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

Enter value for report_name: awrrpt_db12_201204180700-201204180800.txt

Using the report name awrrpt_db12_201204180700-201204180800.txt

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: