Oracle DBMS_FEATURE_USAGE_INTERNAL
Version 12.1.0.2

General Information
Library Note Morgan's Library Page Footer
The Library is currently in the process of being upgraded from Oracle Database Version 12.1.0.1 to 12.1.0.2. 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.

Interested in Oracle GoldenGate? Check out the IGGOUG,
Purpose Internal utilities supporting feature usage monitoring with DBMS_FEATURE_USAGE
AUTHID DEFINER
Dependencies
DBMS_ASSERT USER$ WRI$_DBU_HIGH_WATER_MARK
DBMS_FEATURE_USAGE V$DATABASE WRI$_DBU_HWM_METADATA
DBMS_SQL V$INSTANCE WRI$_DBU_USAGE_SAMPLE
DBMS_STANDARD WRI$_DBU_FEATURE_METADATA X$KSPPI
OBJ$ WRI$_DBU_FEATURE_USAGE X$KSPPSV
Documented No
First Available 10.2.0.1
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/prvtfus.plb
Subprograms
 
CLEANUP_DATABASE
This function appears to only be executable using TRUE when executed from a remote database ... which makes sense if you are Oracle Corp. dbms_feature_usage_internal(cleanup_local IN BOOLEAN);
col name format a55

SELECT name, detected_usages, total_samples
FROM dba_feature_usage_statistics
ORDER BY 1;

exec dbms_feature_usage_internal.cleanup_database(FALSE);

SELECT name, detected_usages, total_samples
FROM dba_feature_usage_statistics
ORDER BY 1;

exec dbms_feature_usage_internal.cleanup_database(TRUE);
*
ERROR at line 1:
ORA-20015: Cleanup on local Database id for DB Feature Usage not allowed
ORA-06512: at "SYS.DBMS_FEATURE_USAGE_INTERNAL", line 834
ORA-06512: at line 1
 
EXEC_DB_USAGE_SAMPLING
Collects usage statistics for all features dbms_feature_usage_internal(curr_date IN DATE);
SELECT MAX(last_usage_date)
FROM dba_feature_usage_statistics;

exec dbms_feature_usage_internal.exec_db_usage_sampling(SYSDATE);

SELECT MAX(last_usage_date)
FROM dba_feature_usage_statistics;
 
SAMPLE_ONE_FEATURE
Runs the stored procedure identified as the tool for collecting statistics on the named feature dbms_feature_usage_internal(feat_name IN VARCHAR2);
SELECT name, detected_usages, total_samples, last_usage_date
FROM dba_feature_usage_statistics
WHERE name = 'Services';

exec dbms_service.create_service('UW', 'u.washington.edu');
exec dbms_service.start_service('UW', 'orabase');

exec dbms_feature_usage_internal.sample_one_feature('Services');

SELECT name, detected_usages, total_samples, last_usage_date
FROM dba_feature_usage_statistics
WHERE name = 'Services';

exec dbms_service.stop_service('UW', 'orabase');
exec dbms_service.delete_service('UW');
 
SAMPLE_ONE_HWM
Runs the stored procedure identified as the tool for collecting statistics on the named high water mark dbms_feature_usage_internal(hwm_name IN VARCHAR2);
SELECT name, highwater, last_value
FROM dba_high_water_mark_statistics
WHERE name = 'USER_TABLES';

CREATE TABLE uwclass.user_table(
testcol DATE);

exec dbms_feature_usage_internal.sample_one_hwm('USER_TABLES');

SELECT name, highwater, last_value
FROM dba_high_water_mark_statistics
WHERE name = 'USER_TABLES';

DROP TABLE uwclass.user_table PURGE;

Related Topics
DBMS_FEATURE_USAGE
DBMS_FEATURE_USAGE_REPORT
Feature Usage Procedures
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