This article is intended to instruct project personnel to extract the AWR reports of Oracle databases themselves.
1. The AWR report extraction for the current connection instance:@?/rdbms/admin/awrrpt
Sql> @? /RDBMS/admin/awrrpt CurrentInstance~~~~~~~~~~~~~~~~DB Id db Name Inst Num Instance----------- ------------ -------- ------------ 857123342Jy1jy1specify the report Type~~~~~~~~~~~~~~~~~~~~~~~would likeAn HTML report,orA plaintextReport ? Enter'HTML' forAn HTML report,or 'text' forPlaintextDefaults to 'HTML'Enter Value forReport_type:type specified:htmlinstancesinchThis Workload RepositorySchema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~db Id Inst Num db Name Instance Host------------ -------- ------------ ------------ ------------ 857123342 2JY Jy2 RAC2-Server* 857123342 1JY jy1 Rac1-serverusing857123342 for Databaseidusing1 forInstance NumberSpecify the Number ofDays ofSnapshots toChoose from~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Entering the Number ofDays (n) would resultinchThe most recent (n) days ofSnapshots being listed. Pressing<return>withoutspecifying a NumberLists Allcompleted snapshots. Enter value forNum_days:1Listing The last Day'S completed snapshots snapinstance DB Name Snap Id Sn AP Started level--------------------------------------------------------jy1 JY Oct 07:32 1 1 94 Oct 20 1 10:00am-Oct 1Specify the Begin and End Snapshot ids~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~enter value for Begin_snap:94Begin Snapshot Id specified:94enter value for End_snap: theEnd Snapshot Id specified:95specify The name~~~~~~~~~~~~~~~~~~~~~~~the default report file Name is Awrrpt_1_94_9 5.html. To the name,press <return> to continue, otherwise enter an alternative. Enter value for report_name:using the report name awrrpt_1_94_95.html
A large number of screen outputs are omitted here:
End of Report</body>!pwd/home/oracle
Note: The generated report file is sent to me, for example, here is the awrrpt_1_94_95.html file, which represents the workload report of the DB instance jy1 for the hour of October 16, 2014 10 o'clock.
Other instances of 2.RAC AWR report extract:@?/rdbms/admin/awrrpti
Sql> @? /RDBMS/admin/ awrrptiSpecify the report Type~~~~~~~~~~~~~~~~~~~~~~~would likeAn HTML report,orA plaintextReport ? Enter'HTML' forAn HTML report,or 'text' forPlaintextDefaults to 'HTML'Enter Value forReport_type:type specified:htmlinstancesinchThis Workload RepositorySchema~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~db Id Inst Num db Name Instance Host------------ -------- ------------ ------------ ------------ 857123342 2JY Jy2 RAC2-Server* 857123342 1JY jy1 Rac1-Serverenter Value fordbid857123342Using857123342 for DatabaseIdenter Value forInst_num:2Using2 forInstance NumberSpecify the Number ofDays ofSnapshots toChoose from~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Entering the Number ofDays (n) would resultinchThe most recent (n) days ofSnapshots being listed. Pressing<return>withoutspecifying a NumberLists Allcompleted snapshots. Enter value fornum_days:listing Allcompleted snapshots snapinstance DB Name Snap Id Snap Started Level------------ ------------ --------- ------------------ -----Jy2 JY the -Oct the Ten:Ten 1 the -Oct the -: + 1 the -Oct the the:xx 1 94 -Oct the Ten:xx 1 the -Oct the One:xx 1Specify theBegin and EndSnapshot Ids~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Enter Value forBegin_snap:94BeginSnapshot Id specified:94Enter Value forEnd_snap: the EndSnapshot Id specified: theSpecify the report Name~~~~~~~~~~~~~~~~~~~~~~~ thedefaultReportfileName isAwrrpt_2_94_95.html. to UseThis name,press<return> to Continue, otherwise enter an alternative. Enter value forreport_name:using the report name awrrpt_2_94_95.html here omits a lot of screen output :End of Report</BODY></Html>Report written toAwrrpt_2_94_95.html
3. Manually generate a snapshot:
exec dbms_workload_repository.create_snapshot ();
SQL>exec dbms_workload_repository.create_snapshot ();P l/procedure successfully completed.
Oracle Awr Report Extraction method