How To Generate AWR Report In the RAC Enviornments.
AWR report can be generating in RAC database using 2 scripts awrrpt.sql or awrrpti.sql and It can be generated at the CDB and PDB levels.
awrrpt.sql – > This will generate the one report for the database across all the nodes.
awrrpti.sql – > This will generates report for a particular instance levels.
[demantra@dsiddem admin]$ sqlplus "/as sysdba"
SQL*Plus: Release 19.0.0.0.0 - Production on Fri Jul 28 13:05:32 2023
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
SQL> @$ORACLE_HOME/rdbms/admin/awrrpt.sql
Specify the Report Type ~~~~~~~~~~~~~~~~~~~~~~~ AWR reports can be generated in the following formats. Please enter the name of the format at the prompt. Default value is 'html'. 'html' HTML format (default) 'text' Text format 'active-html' Includes Performance Hub active report Enter value for report_type: old 1: select 'Type Specified: ',lower(nvl('&&report_type','html')) report_type from dual new 1: select 'Type Specified: ',lower(nvl('','html')) report_type from dual Type Specified: html old 1: select '&&report_type' report_type_def from dual new 1: select 'html' report_type_def from dual old 1: select '&&view_loc' view_loc_def from dual new 1: select 'AWR_PDB' view_loc_def from dual Current Instance ~~~~~~~~~~~~~~~~ DB Id DB Name Inst Num Instance Container Name -------------- -------------- -------------- -------------- -------------- 3659554064 ORCLCDB1 1 orclcdb1 CDB$ROOT Instances in this Workload Repository schema ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id Inst Num DB Name Instance Host ------------ ---------- --------- ---------- ------ 3659554064 1 ORCLCDB1 orclcdb1 shsdnbty01.a * 3659554064 1 ORCLCDB1 orclcdb1 dsiddem.apps Using 3659554064 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> without specifying a number lists all completed snapshots. Enter value for num_days: 1 Listing the last day's Completed Snapshots Instance DB Name Snap Id Snap Started Snap Level ------------ ------------ ---------- ------------------ ---------- orclcdb1 ORCLCDB1 160 28 Jul 2023 03:11 1 161 28 Jul 2023 04:30 1 162 28 Jul 2023 05:30 1 163 28 Jul 2023 06:30 1 164 28 Jul 2023 07:30 1 165 28 Jul 2023 08:30 1 166 28 Jul 2023 09:30 1 167 28 Jul 2023 10:30 1 168 28 Jul 2023 11:30 1 169 28 Jul 2023 12:30 1 Specify the Begin and End Snapshot Ids ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enter value for begin_snap: 160 Begin Snapshot Id specified: 160 Enter value for end_snap: 169 End Snapshot Id specified: 169 Specify the Report Name ~~~~~~~~~~~~~~~~~~~~~~~ The default report file name is awrrpt_1_160_169.html. To use this name, press <return> to continue, otherwise enter an alternative. Enter value for report name: Using the report name awrrpt_1_160_169.html
USING AWRRPTI.SQL SCRIPT:
This script will prompt for providing the instance number :
SQL> @$ORACLE_HOME/rdbms/admin/awrrpti.sql Specify the Report Type ~~~~~~~~~~~~~~~~~~~~~~~ AWR reports can be generated in the following formats. Please enter the name of the format at the prompt. Default value is 'html'. 'html' HTML format (default) 'text' Text format 'active-html' Includes Performance Hub active report Enter value for report_type: Type Specified: html Instances in this Workload Repository schema ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for dbid: 3659554064 Using 3659554064 for database IdEnter value for inst_num: 1 ------------------->>> Here you need to the pass the instance number 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 without specifying a number lists all completed snapshots. Enter value for num_days: 1 Listing the last day's Completed Snapshots Snap Instance DB Name Snap Id Snap Started Level ------------ ------------ --------- ------------------
Comments
Post a Comment