6 thoughts on “DBMS_FEATURE_USAGE_REPORT and The Phantom AFTER SELECT Trigger”

  1. I have also come to this after doing some research and next task seems to map out what all features fall in which packs and how to manually see if they are enabled and queries to find if they are enabled.
    but here when u say the packages DBMS_SWRF_REPORT_INTERNAL is wrapped what does that means?

    Like

    1. Shipra,

      I’ve taken the next step you suggested – i.e. identifying which features fall into which packs.
      You can find the outcome in this post.

      As for identifying what is enabled, that’s a bit more tricky. The fact is that everything in these packs is accessible, whether or not you actually have a license.
      This applies even if you set the appropriate database parameters/tool configuration options. You can see an example of this ( using SQLDeveloper) here.

      I have formulated an approach that will further restrict access to the packs for which you are not licensed, which you can find here.

      In answer to your question about what wrapping is…Oracle provides a utility to allow you to store PL/SQL program units in an encrypted format.
      Oracle supplied code uses this technique quite a lot.
      Morgan’s Library has quite a good example of how this works.
      As a result, it makes it very hard to work out what the original source code was, just from querying the data dictionary.

      HTH

      Mike

      Like

  2. Hello, Thanks for the great article. Do you know of any way to clear out or purge all FUS history on a database? My research indicates it not standard or “recommended”. Is it possible? Any serious risks?

    Like

    1. Yogi,

      You’re right, this sort of thing is not standard or recommended.
      Oracle uses this information for license audits so this is not really surprising.
      Additionally, I don’t know if there is some independent internal mechanism to track feature usage which would remain unaffected by a full purge of the visible FUS data.
      DBMS_FEATURE_USAGE_INTERNAL.CLEANUP_DATABASE might do this but it seems to be for Oracle’s use only. Simply running it locally (passing a value of TRUE) will give you an error :


      exec dbms_feature_usage_internal.cleanup_database(true)

      ORA-20015: Cleanup on local Database id for DB Feature Usage not allowed

      In summary, it may be technically possible to do this. However, there are likely to be some fairly big legal and ethical risks in doing so.

      HTH,

      Mike

      Like

  3. According to my tests so far, and contrary to what I expected, Oracle does not seem to trigger a Diagnostic pack license usage entry when directly selecting e.g. from DBA_HIST% views or underlying WRH$% tables. It only triggered when calling one of the AWR report PLSQL APIs.

    Like

    1. Andy,

      that’s interesting.
      The examples in this article were tested on Oracle 11g.
      I know that things have improved somewhat in terms of preventing access to these packs in subsequent releases.

      As you are probably aware, the following DBA_HIST% views were not part of the Diagnostic Pack in 11g :

      DBA_HIST_SNAPSHOT
      DBA_HIST_DATABASE_INSTANCE
      DBA_HIST_SNAP_ERROR
      DBA_HIST_SEG_STAT
      DBA_HIST_SEG_STAT_OBJ
      DBA_HIST_UNDOSTAT

      Am I correct in assuming that your testing is not centred on any of these ?
      Also, could you confirm which Oracle version you are testing on ?

      Thanks,

      Mike

      Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.