Oracle Real-Time ADDM Reports are generated using the “rtaddmrpt.sql” and “rtaddmrpti.sql” scripts in the “$ORACLE_HOME/rdbms/admin” directory.
The “rtaddmrpt.sql” script assumes the report is for the current database and instance, and uses a reporting period of the -60 mins to current time (SYSDATE). This sounds a little like a conventional ADDM report, but the information is sourced from the DBA_HIST_REPORTS
view, not the conventional ADDM analysis. An example of running the “rtaddmrpt.sql” script is shown below. Only the report_id
and report_name
required user input.
SQL> @rtaddmrpt Current Database ~~~~~~~~~~~~~~~~ 845557242 Instances in this Report reposistory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 845557242 1 Default to current database Using database id: 845557242 Enter begin time for report: -- Valid input formats: -- To specify absolute begin time: -- [MM/DD[/YY]] HH24:MI[:SS] -- Examples: 02/23/03 14:30:15 -- 02/23 14:30:15 -- 14:30:15 -- 14:30 -- To specify relative begin time: (start with '-' sign) -- -[HH24:]MI -- Examples: -1:15 (SYSDATE - 1 Hr 15 Mins) -- -25 (SYSDATE - 25 Mins) Default to -60 mins Report begin time specified: Enter duration in minutes starting from begin time: Defaults to SYSDATE - begin_time Press Enter to analyze till current time Report duration specified: Using 20/07/2015 09:39:41 as report begin time Using 20/07/2015 10:39:41 as report end time Report ids in this workload repository. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 845557242 1922 20/07/2015 10:34:29 High Load 20.16 Select a report id from the list. If the report id list is empty, please select a different begin time and end time. Enter value for report_id: 1922 Report id specified : 1922 Specify the Report Name ~~~~~~~~~~~~~~~~~~~~~~~~ The default report file name is rtaddmrpt_0720_1039.html. To use this name, press <return> to continue, otherwise enter an alternative. Enter value for report_name: /tmp/rtaddmrpt_0720_1039.html Using the report name /tmp/rtaddmrpt_0720_1039.html ... Removed HTML Output ... Report written to /tmp/rtaddmrpt_0720_1039.html SQL>
The “rtaddmrpti.sql” script allows you to manually select the database and reporting period. The items in bold required user input.
SQL> @rtaddmrpti Instances in this Report reposistory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Db Id Inst Num ---------- -------- 845557242 1 Default to current database Enter value for dbid: Using database id: 845557242 Enter begin time for report: -- Valid input formats: -- To specify absolute begin time: -- [MM/DD[/YY]] HH24:MI[:SS] -- Examples: 02/23/03 14:30:15 -- 02/23 14:30:15 -- 14:30:15 -- 14:30 -- To specify relative begin time: (start with '-' sign) -- -[HH24:]MI -- Examples: -1:15 (SYSDATE - 1 Hr 15 Mins) -- -25 (SYSDATE - 25 Mins) Default to -60 mins Enter value for begin_time: -5 Report begin time specified: -5 Enter duration in minutes starting from begin time: Defaults to SYSDATE - begin_time Press Enter to analyze till current time Enter value for duration: Report duration specified: Using 20/07/2015 10:29:46 as report begin time Using 20/07/2015 10:34:47 as report end time Report ids in this workload repository. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DBID REPORT_ID TIME trigger_cause impact ---------- --------- -------------------- ------------------------- ---------- 845557242 1922 20/07/2015 10:34:29 High Load 20.16 Select a report id from the list. If the report id list is empty, please select a different begin time and end time. Enter value for report_id: 1922 Report id specified : 1922 Specify the Report Name ~~~~~~~~~~~~~~~~~~~~~~~~ The default report file name is rtaddmrpt_0720_1034.html. To use this name, press <return> to continue, otherwise enter an alternative. Enter value for report_name: /tmp/rtaddmrpt_0720_1034.html Using the report name /tmp/rtaddmrpt_0720_1034.html ... Removed HTML Output ... Report written to /tmp/rtaddmrpt_0720_1034.html SQL>
Oracle Real-Time ADDM Reports DBMS_ADDM.REAL_TIME_ADDM_REPORT Function
The DBMS_ADDM
package contains a function called REAL_TIME_ADDM_REPORT
SET LONG 1000000 LONGCHUNKSIZE 1000000
SET LINESIZE 1000 PAGESIZE 0
SET TRIM ON TRIMSPOOL ON
SET ECHO OFF FEEDBACK OFF
SELECT DBMS_ADDM.real_time_addm_report FROM dual;
Also See: