Oracle Database 26ai will be available on generic Linux platforms in January and soon on AIX and Windows
Purpose
Manageability Monitor Process (MMON), by default, samples the data dictionary once a week to collect database feature usage and high-water mark (HWM) statistics.
Registers tracking usage of a specific feature usage using a SQL statement
dbms_feature_usage.register_db_feature(
feature_name IN VARCHAR2,
install_check_method IN NUMBER,
install_check_logic IN VARCHAR2,
usage_detection_method IN NUMBER,
usage_detection_logic IN VARCHAR2
feature_description IN VARCHAR2);
set linesize 161
col name format a38
col description format a120
SELECT name, description
FROM dba_feature_usage_statistics
ORDER BY 1;
SELECT name, detected_usages
FROM dba_feature_usage_statistics
ORDER BY 1;
-- to register the use of function-based indexes an install check
-- is not required: The detection method is to use a SQL query
SELECT name, description
FROM dba_feature_usage_statistics
ORDER BY 1;
SELECT *
FROM dba_feature_usage_statistics
WHERE name = 'User FB Index';
SELECT name, detected_usages
FROM dba_feature_usage_statistics
ORDER BY 1;
SELECT *
FROM wri$_dbu_feature_metadata
WHERE name LIKE 'User FB%';
Track feature usage using a stored procedure
-- to register the HTML_DB (an install check is required and the detection method
-- uses a PL/SQL procedure
CREATE OR REPLACE PROCEDURE oratext_test (
feature_boolean OUT NOCOPY NUMBER,
auxiliary_count OUT NOCOPY NUMBER,
feature_info OUT NOCOPY CLOB) AUTHID DEFINER IS
BEGIN
SELECT COUNT(*)
INTO feature_boolean
FROM dba_users
WHERE username = 'CTXSYS';
auxiliary_count := 0;
feature_info := NULL;
END oratext_test;
/