Thinking Out Loud

September 6, 2023

options_packs_usage_statistics.sql

Filed under: oracle — mdinh @ 3:40 am
I have been working on project identify DB FEATURE USAGE.

Luckily there's a script for that and happy auditing.

Database Options/Management Packs Usage Reporting for Oracle Databases 11.2 and later (Doc ID 1317265.1)	

Here is an example and search for TRUE to find usage.

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> grant dba to mdinh identified by mdinh;

Grant succeeded.

SQL> CREATE TABLE test_tbl_oltp COMPRESS FOR OLTP
  2  AS
  3  SELECT * FROM dba_objects;

Table created.

SQL> insert into test_tbl_oltp SELECT * FROM dba_objects;
SQL> commit;

SQL> start options_packs_usage_statistics.sql
OVERALL INFORMATION

HOST_NAME                               |INSTANCE_NAME   |DATABASE_NAME |OPEN_MODE       |DATABASE_ROLE   |CREATED            |      DBID|VERSION    |BANNER
----------------------------------------|----------------|--------------|----------------|----------------|-------------------|----------|-----------|--------------------------------------------------------------------------------
GREEK                                   |orcl            |ORCL          |READ WRITE      |PRIMARY         |2023.09.04_18.35.53|1674462089|12.1.0.2.0 |Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

PARAMETER                     |VALUE
------------------------------|--------------------
control_management_pack_access|DIAGNOSTIC+TUNING
enable_ddl_logging            |FALSE


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
MULTITENANT INFORMATION (Please ignore errors in pre 12.1 databases)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CON_ID|NAME                          |OPEN_MODE       |RESTRICTED|REMARKS
------|------------------------------|----------------|----------|-----------------------------------------------------------------------------
     0|orcl                          |READ WRITE      |NO        |

The multitenant architecture with one user-created pluggable database (single tenant) is available in all editions without the Multitenant Option.
If more than one PDB containers are created, then Multitenant Option licensing is needed
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> Selecting from DBA_FEATURE_USAGE_STATISTICS


DBA_FEATURE_USAGE_STATISTICS (DBA_FUS) INFORMATION - MOST RECENT SAMPLE BASED ON LAST_SAMPLE_DATE

LAST_DBA_FUS_DBID|LAST_DBA_FUS_VERS|LAST_DBA_FUS_SAMPLE|SYSDATE            |REMARKS
-----------------|-----------------|-------------------|-------------------|-----------------
       1674462089|12.1.0.2.0       |2023.09.05_00.39.38|2023.09.05_19.54.30|


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PRODUCT USAGE
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

PRODUCT                                            |USAGE                   |LAST_SAMPLE_DATE   |FIRST_USAGE_DATE   |LAST_USAGE_DATE
---------------------------------------------------|------------------------|-------------------|-------------------|-------------------
Active Data Guard                                  |NO_USAGE                |2023.09.05_00.39.38|                   |
Advanced Analytics                                 |NO_USAGE                |2023.09.05_00.39.38|                   |
Advanced Compression                               |NO_USAGE                |2023.09.05_00.39.38|                   |
Advanced Security                                  |NO_USAGE                |2023.09.05_00.39.38|                   |
Database In-Memory                                 |NO_USAGE                |2023.09.05_00.39.38|                   |
Database Vault                                     |NO_USAGE                |2023.09.05_00.39.38|                   |
Diagnostics Pack                                   |NO_USAGE                |2023.09.05_00.39.38|                   |
Label Security                                     |NO_USAGE                |2023.09.05_00.39.38|                   |
OLAP                                               |NO_USAGE                |2023.09.05_00.39.38|                   |
Partitioning                                       |NO_USAGE                |2023.09.05_00.39.38|                   |
RAC or RAC One Node                                |NO_USAGE                |2023.09.05_00.39.38|                   |
Real Application Clusters                          |NO_USAGE                |2023.09.05_00.39.38|                   |
Real Application Clusters One Node                 |NO_USAGE                |2023.09.05_00.39.38|                   |
Real Application Testing                           |NO_USAGE                |2023.09.05_00.39.38|                   |
Spatial and Graph                                  |NO_USAGE                |2023.09.05_00.39.38|                   |
Tuning Pack                                        |NO_USAGE                |2023.09.05_00.39.38|                   |
.Database Gateway                                  |NO_USAGE                |2023.09.05_00.39.38|                   |
.Exadata                                           |NO_USAGE                |2023.09.05_00.39.38|                   |
.GoldenGate                                        |NO_USAGE                |2023.09.05_00.39.38|                   |
.HW                                                |NO_USAGE                |2023.09.05_00.39.38|                   |
.Pillar Storage                                    |NO_USAGE                |2023.09.05_00.39.38|                   |


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
FEATURE USAGE DETAILS
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

PRODUCT                                            |FEATURE_BEING_USED                                      |USAGE                   |LAST_SAMPLE_DATE   |      DBID|VERSION    |DETECTED_USAGES|TOTAL_SAMPLES|CURRENTLY_USED|FIRST_USAGE_DATE   |LAST_USAGE_DATE    |EXTRA_FEATURE_INFO
---------------------------------------------------|--------------------------------------------------------|------------------------|-------------------|----------|-----------|---------------|-------------|--------------|-------------------|-------------------|--------------------------------------------------------------------------------
Active Data Guard                                  |Active Data Guard - Real-Time Query on Physical Standby |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Active Data Guard                                  |Global Data Services                                    |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Analytics                                 |Data Mining                                             |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Advanced Index Compression                              |SUPPRESSED_DUE_TO_BUG   |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              1|            1|TRUE          |2023.09.05_00.39.38|2023.09.05_00.39.38|
Advanced Compression                               |Backup HIGH Compression                                 |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Backup LOW Compression                                  |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Backup MEDIUM Compression                               |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Backup ZLIB Compression                                 |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Data Guard                                              |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |HeapCompression                                         |SUPPRESSED_DUE_TO_BUG   |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              1|            1|TRUE          |2023.09.05_00.39.38|2023.09.05_00.39.38|
Advanced Compression                               |Heat Map                                                |SUPPRESSED_DUE_TO_BUG   |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Hybrid Columnar Compression Row Level Locking           |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Information Lifecycle Management                        |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Oracle Advanced Network Compression Service             |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Oracle Utility Datapump (Export)                        |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |Oracle Utility Datapump (Import)                        |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              1|            1|TRUE          |2023.09.05_00.39.38|2023.09.05_00.39.38|
Advanced Compression                               |SecureFile Compression (user)                           |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Compression                               |SecureFile Deduplication (user)                         |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Security                                  |Data Redaction                                          |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Security                                  |Encrypted Tablespaces                                   |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Security                                  |Oracle Utility Datapump (Export)                        |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Security                                  |Oracle Utility Datapump (Import)                        |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              1|            1|TRUE          |2023.09.05_00.39.38|2023.09.05_00.39.38|
Advanced Security                                  |SecureFile Encryption (user)                            |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Advanced Security                                  |Transparent Data Encryption                             |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Database In-Memory                                 |In-Memory Aggregation                                   |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Database In-Memory                                 |In-Memory Column Store                                  |SUPPRESSED_DUE_TO_BUG   |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Database Vault                                     |Oracle Database Vault                                   |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Database Vault                                     |Privilege Capture                                       |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Diagnostics Pack                                   |ADDM                                                    |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Diagnostics Pack                                   |AWR Baseline                                            |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Diagnostics Pack                                   |AWR Baseline Template                                   |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Diagnostics Pack                                   |AWR Report                                              |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Diagnostics Pack                                   |Automatic Workload Repository                           |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Diagnostics Pack                                   |Baseline Adaptive Thresholds                            |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Diagnostics Pack                                   |Baseline Static Computations                            |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Diagnostics Pack                                   |EM Performance Page                                     |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Label Security                                     |Label Security                                          |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
OLAP                                               |OLAP - Analytic Workspaces                              |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
OLAP                                               |OLAP - Cubes                                            |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Partitioning                                       |Partitioning (user)                                     |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Partitioning                                       |Zone maps                                               |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
RAC or RAC One Node                                |Quality of Service Management                           |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Real Application Clusters                          |Real Application Clusters (RAC)                         |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Real Application Clusters One Node                 |Real Application Cluster One Node                       |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Real Application Testing                           |Database Replay: Workload Capture                       |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Real Application Testing                           |Database Replay: Workload Replay                        |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Real Application Testing                           |SQL Performance Analyzer                                |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Spatial and Graph                                  |Spatial                                                 |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Tuning Pack                                        |SQL Access Advisor                                      |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Tuning Pack                                        |SQL Monitoring and Tuning pages                         |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Tuning Pack                                        |SQL Profile                                             |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
Tuning Pack                                        |SQL Tuning Advisor                                      |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.Database Gateway                                  |Gateways                                                |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.Database Gateway                                  |Transparent Gateway                                     |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.Exadata                                           |Exadata                                                 |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.GoldenGate                                        |GoldenGate                                              |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.HW                                                |Hybrid Columnar Compression                             |SUPPRESSED_DUE_TO_BUG   |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.HW                                                |Hybrid Columnar Compression Row Level Locking           |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.HW                                                |Sun ZFS with EHCC                                       |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.HW                                                |ZFS Storage                                             |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.HW                                                |Zone maps                                               |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.Pillar Storage                                    |Pillar Storage                                          |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |
.Pillar Storage                                    |Pillar Storage with EHCC                                |NO_CURRENT_USAGE        |2023.09.05_00.39.38|1674462089|12.1.0.2.0 |              0|            1|FALSE         |
 |                   |

USER is "SYS"

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DESCRIPTION:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The two reports, PRODUCT USAGE and FEATURE USAGE DETAILS, provide usage statistics for Database Options, Management Packs
and their corresponding features.
Information is extracted from DBA_FEATURE_USAGE_STATISTICS view.

DBA_FEATURE_USAGE_STATISTICS view is updated once a week, so it may take up to 7 days for the report to reflect usage changes.
DBA_FEATURE_USAGE_STATISTICS view contains a different set of entries for each VERSION and DBID occurring in the database history.
The weekly refresh process updates only the current row set.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
NOTES:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The report lists all detectable products and features, used or not used.
The CURRENTLY_USED column in the DBA_FEATURE_USAGE_STATISTICS view indicates if the feature in question was used during the last sampling interval
or is used at the refresh moment.
CURRENT_USAGE represents usage tracked over the last sample period, which defaults to one week.
PAST_OR_CURRENT_USAGE example: Datapump Export entry indicates CURRENTLY_USED='TRUE' and FEATURE_INFO "compression used" counter
indicates a non zero value that could have been triggered by past or current (last week) usage.
For historical details check FIRST_USAGE_DATE, LAST_USAGE_DATE, LAST_SAMPLE_DATE, TOTAL_SAMPLES, DETECTED_USAGES columns
Leading dot (.) denotes a product that is not a Database Option or Database Management Pack

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
DISCLAIMER:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Information provided by the reports is to be used for informational purposes only and does not represent your license entitlement or requirement.
The usage data may indicate, in some cases, false positives.
This may be due to inclusion of usage by sample schemas (such as HR, PM, SH...) or system/internal usage.

Please refer to MOS DOC ID 1317265.1 and 1309070.1 for more information.

End of script (v 21.0 Oct-2021)
SQL>

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

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

Blog at WordPress.com.