Oracle DBMS_FEATURE_USAGE_INTERNAL
Version 18.3.0.1

General Information
Library Note Morgan's Library Page Header
Are you prepared for the release of Oracle Database 18c ... the first autonomous database? We are here at the Library. It is time for DBAs to stop fighting robots with their fingers and losing ... time to start using our intelligence and winning.
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. and don't want your customers purging past misdeeds. 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
Built-in Functions
Built-in Packages
CARTRIDGE
DBMS_FEATURE_USAGE
DBMS_FEATURE_USAGE_REPORT
Feature Usage Procedures
What's New In 12cR2
What's New In 18cR3

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