1 logging in to an Oracle user
Su-oracle
2 Enter the SQLplus, sweep the line @awrrpt. sql. Note that to specify the awrrpt.sql script path, it is recommended that you start by entering the specified directory as a convenience
cd/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/
Here's a tip, the admin has a lot of scripts to generate reports like Ashrpt.sql used to generate Ash reports. The file name is named by the abbreviated +rpt.sql method of the report name.
3 Specify the report format and time range, here four times input
The first time you specify the format, the HTML format is used here.
Specify the date range for the second time. Note that because these data occupy a large space, it is generally not recommended to keep it for too long. Our side has been reserved for two days.
Third time period specified
Fourth time specifying the file name
Finally, a lot of people will notice to enter the command under SSH, if the input error, no way to use the Background button . This is because of the Sqlplus encoding format. You can use Ctrl+background to delete two characters at a time ... It will be used.
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 textdefaults to ' HTML ' enter value for report_type: htmltype specified: htmlspecify 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> withoutspecifying a number lists all completed snapshots. enter value for num_days: 1 17950 20 nov 2014 20:00 1 17951 20 nov 2014 21:00 1specify the begin and End Snapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Enter value for Begin_snap: 17950begin snapshot id specified: 17950enter value for end _snap: 17951end snapshot id specified: 17951
4 The resulting file is generated in the form of file name +.lst. Just open it in the browser.
5 If a DB cluster is used, the full AWR report can be taken on any server, because the data is in the cluster.
Oracle acquires AWR reports