Oracle DBMS_FEATURE_USAGE_INTERNAL
Version 11.2.0.3
 
General Information
Source {ORACLE_HOME}/rdbms/admin/prvtfus.plb
First Available 10.1
Dependencies
DBA_FEATURE_USAGE_STATISTICS V$INSTANCE
DBA_HIGH_WATER_MARK_STATISTICS WRI$_DBU_FEATURE_METADATA
DBMS_ASSERT WRI$_DBU_FEATURE_USAGE
DBMS_FEATURE_USAGE WRI$_DBU_HIGH_WATER_MARK
DBMS_SQL WRI$_DBU_HWM_METADATA
OBJ$ WRI$_DBU_USAGE_SAMPLE
USER$ X$KSPPI
V$DATABASE  
Security Model Owned by SYS with no privileges granted
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;
 
 
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-2013 Daniel A. Morgan All Rights Reserved