Thursday, September 1, 2011

Wondering which component of database is in use?


DBA_FEATURE_USAGE_STATISTICS - Displays database feature usage statistics.

SELECT u1.name,
       u1.detected_usages
FROM   dba_feature_usage_statistics u1
WHERE  u1.version = (SELECT MAX(u2.version)
                     FROM   dba_feature_usage_statistics u2
                     WHERE  u2.name = u1.name)
ORDER BY u1.name;

DBA_HIGH_WATER_MARK_STATISTICS - Displays high watermark statistics.

SELECT hwm1.name,
       hwm1.highwater,
       hwm1.last_value
FROM   dba_high_water_mark_statistics hwm1
WHERE  hwm1.version = (SELECT MAX(hwm2.version)
                       FROM   dba_high_water_mark_statistics hwm2
                       WHERE  hwm2.name = hwm1.name)
ORDER BY hwm1.name;

You may also use this through OEM(Administration->Database Feature Usage).

HTH:-)