Oracle PRVT_HDM
Version 21c

General Information
Library Note Morgan's Library Page Header
ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling complimentary technical Workshops on Database Security for the first 30 Oracle Database customers located anywhere in North America, EMEA, LATAM, or APAC that send an email to asra_us@oracle.com. Request a Workshop for your organization today.
Purpose Utilities for creating ADDM Reports
AUTHID DEFINER
Data Types Undocumented
Dependencies
AWRRPT_HTML_TYPE DBMS_ADVISOR V_$INSTANCE
AWRRPT_HTML_TYPE_TABLE DBMS_ASSERT V_$SYSTEM_PARAMETER
AWR_PDB_DATABASE_INSTANCE DBMS_HDM_LIB WRH$_SQLSTAT
AWR_PDB_PDB_INSTANCE DBMS_LOB WRI$_ADV_ACTIONS
AWR_PDB_SNAPSHOT DBMS_LOCK WRI$_ADV_ADDM_FDG
DBA_ADDM_FDG_BREAKDOWN DBMS_MANAGEMENT_PACKS WRI$_ADV_ADDM_INST
DBA_ADDM_FINDINGS DBMS_OUTPUT WRI$_ADV_ADDM_PDBS
DBA_ADDM_INSTANCES DBMS_PERF WRI$_ADV_ADDM_TASKS
DBA_ADDM_SYSTEM_DIRECTIVES DBMS_REPORT WRI$_ADV_ADDM_TODO
DBA_ADDM_TASKS DBMS_SQL WRI$_ADV_FINDINGS
DBA_ADDM_TASK_DIRECTIVES DBMS_SQLTUNE_INTERNAL WRI$_ADV_HDM_T
DBA_ADVISOR_ACTIONS DBMS_STANDARD WRI$_ADV_INST_FDG
DBA_ADVISOR_DEF_PARAMETERS DBMS_SWRF_REPORT_INTERNAL WRI$_ADV_MESSAGE_GROUPS
DBA_ADVISOR_DIR_DEFINITIONS DBMS_SYSTEM WRI$_ADV_OBJECTS
DBA_ADVISOR_DIR_TASK_INST DUAL WRI$_ADV_PARAMETERS
DBA_ADVISOR_FINDINGS PRVT_ADVISOR WRI$_ADV_RECOMMENDATIONS
DBA_ADVISOR_OBJECTS PRVT_AWR_VIEWER WRI$_ADV_TASKS
DBA_ADVISOR_PARAMETERS PRVT_SMGUTIL WRI$_REPT_ADDM
DBA_ADVISOR_RATIONALE SYS_IXMLAGG WRM$_DATABASE_INSTANCE
DBA_ADVISOR_RECOMMENDATIONS USER_ADDM_TASK_DIRECTIVES WRM$_SNAPSHOT
DBA_ADVISOR_TASKS V$ACTIVE_SESSION_HISTORY X$KEAFDGN
DBA_HIST_REPORTS V$CONTAINERS X$KEHF
DBA_USERS V$INSTANCE XMLAGG
DBMS_ADDM V$PARAMETER XMLTYPE
Documented No
First Available Not Known
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/prvtdmsu.plb
Subprograms
 
ADDM_REPORTS
Undocumented prvt_hdm.addm_reports(
p_dbid            IN NUMBER,
p_begin_snap_id   IN NUMBER,
p_end_snap_id     IN NUMBER,
p_instance_number IN NUMBER,
p_html            IN NUMBER)
RETURN sys.awrrpt_html_type_table;
SELECT dbid
FROM v$database;

      DBID
----------
2140826538


SELECT MAX(snap_id)
FROM dba_hist_snapshot;

MAX(SNAP_ID)
------------
        3509


DECLARE
 tname VARCHAR2(30) := 'UW_TASK1';
BEGIN
  dbms_addm.analyze_inst(tname, 25461, 25485, 1, 2140826538);
  dbms_output.put_line(tname);
END;
/

SELECT * FROM TABLE(prvt_hdm.addm_reports(2140826538, 25461, 25485, 1, 1));

OUTPUT
-----------------------------------------------------------------------------------<h2>ADDM Task ADDM:2140826538_1_25462</h2>
<pre>
ADDM Report for Task &apos;ADDM:2140826538_1_25462&apos;
----------------------------------------------

Analysis Period
---------------
AWR snapshot range from 25461 to 25462.
Time period starts at 21-JUN-21 08.00.31 AM
Time period ends at 21-JUN-21 08.20.41 AM

Analysis Target
---------------
Database &apos;TEST21DB&apos; with DB ID 2140826538.
Database version 21.0.0.0.0.
ADDM performed an analysis of instance test21db, numbered 1 and hosted at
PERRITO5.
ADDM detected that the database type is MULTITENANT DB.

Activity During the Analysis Period
-----------------------------------
Total database time was 0 seconds.
The average number of active sessions was 0.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are no findings to report.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Additional Information
----------------------

Miscellaneous Information
-------------------------
There was no significant database activity to run the ADDM.

</pre>
<h2>ADDM Task ADDM:2140826538_1_25463</h2>
<pre>
ADDM Report for Task &apos;ADDM:2140826538_1_25463&apos;
----------------------------------------------

Analysis Period
---------------
AWR snapshot range from 25462 to 25463.
Time period starts at 21-JUN-21 08.20.41 AM
Time period ends at 21-JUN-21 08.40.54 AM

Analysis Target
---------------
Database &apos;TEST21DB&apos; with DB ID 2140826538.
Database version 21.0.0.0.0.
ADDM performed an analysis of instance test21db, numbered 1 and hosted at
PERRITO5.
ADDM detected that the database type is MULTITENANT DB.

Activity During the Analysis Period
-----------------------------------
Total database time was 0 seconds.
The average number of active sessions was 0.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are no findings to report.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Additional Information
----------------------

Miscellaneous Information
-------------------------
There was no significant database activity to run the ADDM.

</pre>
<h2>ADDM Task ADDM:2140826538_1_25464</h2>
<pre>

ADDM Report for Task &apos;ADDM:2140826538_1_25464&apos;
----------------------------------------------

Analysis Period
---------------
AWR snapshot range from 25463 to 25464.
Time period starts at 21-JUN-21 08.40.54 AM
Time period ends at 21-JUN-21 09.00.57 AM

Analysis Target
---------------
Database &apos;TEST21DB&apos; with DB ID 2140826538.
Database version 21.0.0.0.0.
ADDM performed an analysis of instance test21db, numbered 1 and hosted at
PERRITO5.
ADDM detected that the database type is MULTITENANT DB.

Activity During the Analysis Period
-----------------------------------
Total database time was 0 seconds.
The average number of active sessions was 0.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are no findings to report.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Additional Information
----------------------

Miscellaneous Information
-------------------------
There was no significant database activity to run the ADDM.

</pre>

123 rows selected.
 
ADDM_REPORT_XML
Undocumented prvt_hdm.addm_report_xml(
p_dbid       IN VARCHAR2,
p_inst_id    IN VARCHAR2,
p_begin_time IN VARCHAR2,
p_end_time   IN VARCHAR2,
p_days       IN VARCHAR2,
p_owner      IN VARCHAR2,
p_task_name  IN VARCHAR2,
p_section    IN VARCHAR2,
p_spotrep    IN VARCHAR2,
p_spotlist   IN VARCHAR2,
p_show_sql   IN VARCHAR2)
RETURN XMLTYPE;
TBD
 
ADDM_TASK_LIST_XML
Undocumented prvt_hdm.addm_task_list_xml(
p_dbid       IN NUMBER,
p_inst_id    IN NUMBER,
p_begin_time IN DATE,
p_end_time   IN DATE,
p_owner      IN VARCHAR2,
p_show_sql   IN BOOLEAN)
RETURN XMLTYPE;
TBD
 
ADDM_TASK_REPORT_LINES
Undocumented prvt_hdm.addm_task_report_lines(
p_task_id IN NUMBER,
p_html    IN NUMBER)
RETURN sys.awrrpt_html_type_table;
TBD
 
ADDM_TASK_REPORT_XML
Undocumented prvt_hdm.addm_task_report_xml(
p_owner     IN VARCHAR2,
p_task_name IN VARCHAR2,
p_show_sql  IN BOOLEAN)
RETURN XMLTYPE;
TBD
 
ADD_INFO
Undocumented prvt_hdm.add_info(task_id IN NUMBER);
exec prvt_hdm.add_info(3683);
 
AGGREGATE_FINDINGS
Undocumented prvt_hdm.aggregate_findings(
task_id      IN NUMBER,
total_dbtime IN NUMBER,
ap_duration  IN NUMBER,
ename        IN VARCHAR2)
TBD
 
APPLY_DIRECTIVES
Undocumented prvt_hdm.apply_directives(task_id IN NUMBER);
exec prvt_hdm.apply_directives(3683);
 
AUTOMATE_ACTIONS
Undocumented prvt_hdm.automate_actions(
auto_task_id   IN NUMBER,
budget_in_secs IN NUMBER);
TBD
 
AUTO_EXECUTE
Undocumented prvt_hdm.auto_execute(
db_id             IN NUMBER,
inst_id           IN NUMBER,
end_snap          IN NUMBER,
time_left_in_secs IN NUMBER);
exec prvt_hdm.auto_execute(2140826538, 1, 21677, 30);
 
DB_FEATURE_CLOB
Undocumented prvt_hdm.db_feature_clob RETURN CLOB;
DECLARE
 retVal CLOB;
BEGIN
  retVal := prvt_hdm.db_feature_clob;
  dbms_output.put_line(retVal);
END;
/
<ADDM_USAGE>
<TASKS>
<TOTAL>
1
</TOTAL>
<MANUAL>
1
</MANUAL>
<FIRST>
00:19:04 JUN-22-2021
</FIRST>
<LAST>
00:19:04 JUN-22-2021

</LAST>
</TASKS>
<FINDINGS>
</FINDINGS>
</ADDM_USAGE>

PL/SQL procedure successfully completed.
 
DESCRIBE_DIRECTIVE
Undocumented prvt_hdm.describe_directive(
dir_name IN VARCHAR2,
data     IN CLOB)
RETURN VARCHAR2;
TBD
 
EVALUATE_METER
Undocumented prvt_hdm.evaluate_meter(task_id IN NUMBER);
exec prvt_hdm.evaluate_meter(3683);
 
EXECUTE
Undocumented prvt_hdm.execute(task_id IN NUMBER);
exec prvt_hdm.execute(3683);
 
EXECUTE_SLAVE_ACTIONS
Undocumented prvt_hdm.execute_slave_actions;
exec prvt_hdm.execute_slave_actions;
 
FINDING_NAME_10G
Undocumented prvt_hdm.finding_name_10g(p_msg_id IN NUMBER) RETURN VARCHAR2;
TBD
 
FIND_LOCAL_FDGS
Undocumented prvt_hdm.find_local_fdgs(
tname   IN VARCHAR2,
task_id IN NUMBER,
ename   IN VARCHAR2);
TBD
 
GET_ASH_QUERY
Undocumented prvt_hdm.get_ash_query(
task_name  IN VARCHAR2,
finding_id IN NUMBER)
RETURN VARCHAR2;
TBD
 
GET_QUERY_PREDICATE
Undocumented prvt_hdm.get_query_predicate(
query_args IN VARCHAR2,
query_type IN BINARY_INTEGER)
RETURN VARCHAR2;
TBD
 
MESSAGE
Undocumented prvt_hdm.message(
id IN NUMBER,
p1 IN VARCHAR2,
p2 IN VARCHAR2,
p3 IN VARCHAR2,
p4 IN VARCHAR2,
p5 IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
PARAMETER_EXISTS
Returns TRUE if the parameter name corresponds to a valid parameter prvt_hdm.parameter_exists(parameter_name IN VARCHAR2) RETURN BOOLEAN;
BEGIN
  IF prvt_hdm.parameter_exists('NotValid') THEN
    dbms_output.put_line('NotValid Is A Valid Parameter');
  ELSE
    dbms_output.put_line('NotValid Is Not Valid');
  END IF;
END;
/
 
PRINT_ELEMENT
Undocumented prvt_hdm.print_element(
buffer      IN OUT CLOB,
level       IN     NUMBER,
header      IN     VARCHAR2,
data        IN     CLOB,
next_indent IN     NUMBER);
TBD
 
PRINT_LINE
Undocumented prvt_hdm.print_line(
buffer IN OUT CLOB,
data   IN     VARCHAR2);
TBD
 
REGISTER_SLAVE_ACTION
Undocumented prvt_hdm.register_slave_action(
db_id        IN NUMBER,
is_rac_coord IN NUMBER,
end_snap     IN NUMBER);
TBD
 
REPORT
Undocumented prvt_hdm.report(
taskid IN NUMBER,
level  IN NUMBER)
RETURN CLOB;
TBD
 
RUN
Undocumented prvt_hdm.run(
db_id   IN NUMBER,
inst_id IN NUMBER,
snap1   IN NUMBER,
snap2   IN NUMBER,
task_nm IN VARCHAR2);
TBD
 
RUN_LOCALS
Undocumented prvt_hdm.run_locals(task_id IN NUMBER);
exec prvt_hdm.run_locals(3683);
 
TOP_ADDM_TASKS
Undocumented prvt_hdm.top_addm_tasks(
p_dbib            IN NUMBER,
p_begin_snap_id   IN NUMBER,
p_end_snap_id     IN NUMBER,
p_instance_number IN NUMBER)
RETURN sys.awrrpt_html_type_table;
TBD
 
TRANSLATE_CLOB
Undocumented prvt_hdm.translate_clob(
p_str  IN CLOB,
p_from IN VARCHAR2,
p_to   IN VARCHAR2)
RETURN CLOB;
TBD
 
UPDATE_FDG_COUNT
Undocumented prvt_hdm.update_fdg_count(task_id IN NUMBER);
exec prvt_hdm.update_fdg_count(3683);
 
VALIDATE_INSTANCE
Undocumented prvt_hdm.validate_instance(value IN VARCHAR2) RETURN BINARY_INTEGER;
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
DBMS_ADVISOR
What's New In 21c
What's New In 23c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2023 Daniel A. Morgan All Rights Reserved
  DBSecWorx