ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
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
X$KSPPI
DBMS_STANDARD
WRI$_DBU_FEATURE_METADATA
X$KSPPSV
OBJ$
WRI$_DBU_FEATURE_USAGE
Documented
No
Exceptions
Error Code
Reason
ORA-20015
Cleanup on local Database id for DB Features Usage not allowed
I originally wrote with respect to this procedure what appeared reasonable at the time.
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.
But Martin Berger has corrected me and it is Martin's description that appears to the left of the demo.
This procedure is, in fact, not "executed from a remote database".
IF CLEANUP_LOCAL is FALSE, all entries for DBIDs which are not current DBID are deleted (only from DBA_FEATURE_USAGE_STATISTICS, not from DBA_HIGH_WATER_STATISTICS).
If CLEANUP_LOCAL != FALSE
IF _awr_corrupt_mode or _awr_restrict_mode are not 'FALSE', DBA_FEATURE_USAGE_STATISTICS is cleared.
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;
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 839
ORA-06512: at line 1