Oracle MGMT_DB_LL_METRICS
Version 12.1.0.1

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 11.2.0.3 to 12.1.0.1. Demos are being upgraded to reflect the new Container paradigm as well as EBR (Edition Based Redefinition) and may contain references to CDBs, PDBs, and other objects you may not be familiar with such as CDB_OBJECTS_AE: Welcome to 12c.
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'
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
Oracle Support
Packages

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