Manually generate an AWR report
Sometimes the AWR report cannot be graphically generated for installing EM in the database. In this case, you need to manually generate an AWR report. Oracle provides an SQL statement to manually generate an AWR report. First, create a report directory, here is/home/oracle/AWR
$ Mkdir AWR
$ Cd AWR
$ Pwd
/Home/oracle/AWR
Go to sqlplus
[Oracle @ ocp ~] $ Sqlplus/as sysdba
SQL * Plus: Release 11.2.0.1.0 Production on Wed Dec 30 02:41:04 2015
Copyright (c) 1982,200 9, Oracle. All rights reserved.
Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Execute the script ,? $ ORACLE_HOME, @ indicates SQL Execution. Two report formats are provided by default: html and txt. The default format is html.
@? /Rdbms/admin/awrrpt. SQL
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
-------------------------------------------
1425858850 ORCL 1 orcl
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
Select the time range of the report extracted from the system. Generally, it takes 7 days. ORACLE will display the report within seven days on the screen.
Enter value for num_days: 7
Listing the last 7 days of Completed Snapshots
Enter the start snap id and end snap id, indicating the time period for intercepting the report.
Instance DB Name Snap Id Snap Started Level
--------------------------------------------------------
Orcl ORCL 81 29 Dec 2015 1
82 29 Dec 2015 1
83 29 Dec 2015 1
84 29 Dec 2015 1
85 29 Dec 2015 1
86 29 Dec 2015 1
87 29 Dec 2015 1
88 29 Dec 2015 1
89 29 Dec 2015 1
90 29 Dec 2015 1
91 30 Dec 2015 1
92 30 Dec 2015 1
93 30 Dec 2015 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 83
Begin Snapshot Id specified: 83
Enter value for end_snap: 93
End Snapshot Id specified: 93
Specify the report name. If this parameter is not specified, press enter to generate a report name based on the on-screen prompt.
Report written to awrrpt_000083_93.html
Download it to your local computer and check it.