myorama
3/8/2016 - 1:25 PM

Get licence for used licences

Get licence for used licences

COLUMN name  FORMAT A60
COLUMN detected_usages FORMAT 999999999999

SELECT u1.name,
       u1.detected_usages,
       u1.currently_used,
       u1.version
FROM   dba_feature_usage_statistics u1
WHERE  u1.version = (SELECT MAX(u2.version)
                     FROM   dba_feature_usage_statistics u2
                     WHERE  u2.name = u1.name)
AND    u1.detected_usages > 0
AND    u1.dbid = (SELECT dbid FROM v$database)
AND    u1.name NOT LIKE '%system%'
ORDER BY u1.name;

COLUMN FORMAT DEFAULT