Oracle MGMT_DB_LL_METRICS
Version 19.3

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose OCM = Oracle Configuration Manager
AUTHID CURRENT_USER
Constants
Name Data Type Value
ORACLE_DATABASE_META_VER VARCHAR(17) '10.3.7.0.2'
VERSION_817 VARCHAR(3) '817'
VERSION_9i VARCHAR(3) '9i'
VERSION_9iR2 VARCHAR(4) '9iR2'
VERSION_10gR1 VARCHAR(5) '10gR1'
VERSION_10gR2 VARCHAR(5) '10gR2'
VERSION_11gR1 VARCHAR(5) '11gR1'
VERSION_11gR2 VARCHAR(5) '11gR2'
VERSION_12gR1 VARCHAR(5) '12gR1'
VERSION_12gR2 VARCHAR(5) '12gR2'
MIN_SUPPORTED_VERSION VARCHAR(10) '08.1.7.0.0'
NOT_SUPPORTED_VERSION VARCHAR(3) 'NSV'
HIGHER_SUPPORTED_VERSION VARCHAR(3) 'HSV'
Data Types TYPE GenericCurType IS REF CURSOR;
Dependencies
DBA_AUDIT_TRAIL GV$INSTANCE V$INSTANCE
DBA_DB_LINKS NLS_DATABASE_PARAMETERS V$PARAMETER
DBA_TABLES UTL_FILE V$PROCESS
DBMS_SQL UTL_INADDR V$SESSION
DUAL V$DATABASE  
Documented No
First Available 11.2.0.1
Security Model Owned by ORACLE_OCM with no privileges granted
Source The source code is unwrapped

header
{ORACLE_HOME}/rdbms/admin/ocmdbd.sql
body
{ORACLE_HOME}/rdbms/admin/ocmdbb.sql
Subprograms
 
COLLECT_CONFIG_METRICS
Puts the configuration data into the file
By default, this procedure does not raise an exception
mgmt_db_ll_metrics.collect_config_metrics(
directory_location IN VARCHAR2,
raise_exp          IN BOOLEAN DEFAULT FALSE);
exec oracle_ocm.mgmt_db_ll_metrics.collect_config_metrics('CTEMP');
 
COLLECT_STATS_METRICS
Puts the statistics config data into the file and, by default, does not raise an exception mgmt_db_ll_metrics.collect_stats_metrics(
directory_location IN VARCHAR2,
raise_exp          IN BOOLEAN DEFAULT FALSE);
conn sys@pdbdev as sysdba

CREATE OR REPLACE DIRECTORY ctemp AS 'c:\temp';

exec oracle_ocm.mgmt_db_ll_metrics.collect_stats_metrics('CTEMP');
-- this code from {ORACLE_HOME}/rdbms/admin/ocmjb10.sql: formatted here for clarity

PROCEDURE collect_stats IS
  CURSOR l_res_cur IS (select inst_id, instance_number from gv$instance);
BEGIN
  FOR inst_id_row in l_res_cur LOOP
    submit_job_for_inst(inst_id_row.inst_id, inst_id_row.instance_number, STATS_JOB_NAME,
    'BEGIN
      oracle_ocm.mgmt_db_ll_metrics.collect_stats_metrics(''ORACLE_OCM_CONFIG_DIR'');
    END;', NULL);
  END LOOP;
END collect_stats;
 
GET_VERSION_CATEGORY
Compute the version category mgmt_db_ll_metrics.get_version_category RETURN VARCHAR2;
SELECT oracle_ocm.mgmt_db_ll_metrics.get_version_category
FROM dual;
 
WRITE_DB_CCR_FILE
Write DB info to a file (for RAC discovery/ADR info collection) using UTL_FILE mgmt_db_ll_metrics.write_db_ccr_file(
directory_location IN VARCHAR2,
raise_exp          IN BOOLEAN DEFAULT FALSE);
-- this code from {ORACLE_HOME}/rdbms/admin/ocmjb10.sql: formatted here for clarity

PROCEDURE collect_config IS
 CURSOR l_res_cur IS
 SELECT inst_id, instance_number
 FROM gv$instance;
BEGIN
  FOR inst_id_row IN l_res_cur LOOP
    submit_job_for_inst(inst_id_row.inst_id, inst_id_row.instance_number, JOB_NAME,
    'BEGIN
       oracle_ocm.mgmt_db_ll_metrics.collect_config_metrics(''ORACLE_OCM_CONFIG_DIR'');
     END;',
    'BEGIN
       oracle_ocm.mgmt_db_ll_metrics.write_db_cvcr_file(''ORACLE_OCM_CONFIG_DIR2'', TRUE);
     END;');
  END LOOP;
END collect_config;
/

Related Topics
Built-in Functions
Built-in Packages
Oracle Support
What's New In 18c
What's New In 19c

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-2019 Daniel A. Morgan All Rights Reserved
  DBSecWorx