Some
Oracle licensing agreements rive Oracle Corporation the right to audit
your databases to ensure that you have paid for all of the Oracle
optional tools.
This might include the extra-cost
Database Diagnostic Pack that covers access to AWR (Automatic
Workload Repository) and ADDM (Automatic Database Diagnostic Monitor)
or the extra-cost Database Tuning Pack that is required if you
access the SQL Tuning Advisor PL/SQL Packages located in
$ORACLE_HOME/rdbms/admin.
The
Oracle documentation notes that there are some tables that do not
require a license to query (as audited in the
dba_feature_usage_statistics table).
"All data dictionary views beginning with the prefix
DBA_HIST_ are part of this pack, along with their underlying tables.The
only exception are the views: DBA_HIST_SNAPSHOT, DBA_HIST_DATABASE_INSTANCE,
DBA_HIST_SNAP_ERROR, DBA_HIST_SEG_STAT, DBA_HIST_SEG_STAT_OBJ, and
DBA_HIST_UNDOSTAT. They can be used without the Diagnostic Pack license."
Oracle has auditing to
tell if you have been querying the Oracle10g Automated Session History
views, an extra-cost option according to sources at Oracle.
Oracle has several views to tell if you have been using
specific extra cost Oracle features.
If we look at the source for the
DBA_FEATURE_USAGE_STATISTICS view we see that it is composed from
three WRI$ tables, wri$_dbu_usage_sample, wri$_dbu_feature_usage and
wri$_dbu_feature_metadata.
select
samp.dbid,
fu.name,
samp.version,
detected_usages,
total_samples,
decode(to_char(last_usage_date, 'MM/DD/YYYY, HH:MI:SS'),
to_char(last_sample_date, 'MM/DD/YYYY, HH:MI:SS'), 'TRUE',
currently_used,
first_usage_date,
last_usage_date,
aux_count,
wri$_dbu_usage_sample samp,
wri$_dbu_feature_usage fu,
wri$_dbu_feature_metadata mt
samp.version = fu.version and
fu.name not like '_DBFUS_TEST%' and /* filter out test features */
bitand(mt.usg_det_method, 4) != 4 /* filter out disabled features */
For more details on how Oracle
tracks extra cost feature usage, see the
dba_feature_usage_statistics table.