Preventing License Violation with CHOPT

Hi all,
So, in past weeks I’ve been publishing some material on how to prevent Licensing violations. Check below for my posts on last weeks:

Cool, but what about RAT, OLAP, Data Mining and Partitioning?

Well, we can use the chopt tool to disable the unlicensed options in the binaries. Check below:
Note: In a RAC with non shared Oracle homes, this has to be executed on every node.

For 12.1:

  1. Oracle Data Mining RDBMS Files (dm)
  2. Oracle OLAP (olap)
  3. Oracle Partitioning (partitioning)
  4. Oracle Real Application Testing (rat)

For 12.2:

  1. Oracle Advanced Analytics (oaa)
  2. Oracle OLAP (olap)
  3. Oracle Partitioning (partitioning)
  4. Oracle Real Application Testing (rat)

1. Shutdown all Oracle services running out of the Oracle RDBMS home (srvctl, SQL*Plus or lsnrctl as required)

srvctl stop home -oraclehome Oracle_home -statefile state_file

2 Disable the options as required

cd $ORACLE_HOME/bin
chopt disable dm # If Oracle version is 12.1
chopt disable oaa # If Oracle version is 12.2
chopt disable olap
chopt disable partitioning
chopt disable rat

3. Startup all Oracle services running out of the Oracle RDBMS home using either

srvctl, SQL*Plus or lsnrctl as required
srvctl start home -oraclehome Oracle_home -statefile state_file


EXTRA)
 It’s even easier for a 18c databases. The execution takes only a few seconds to complete.

[oracle@greporasrv ~]$ chopt disable oaa dm # If Oracle version is 18c

Writing to /opt/oracle/product/18c/dbhome_1/install/disable_oaa_2019-05-13_34-18-06PM.log...
/usr/bin/make -f /u01/oracle/product/18c/dbhome_1/rdbms/lib/ins_rdbms.mk dm_off ORACLE_HOME=/u01/oracle/product/18c/dbhome_1
/usr/bin/make -f /u01/oracle/product/18c/dbhome_1/rdbms/lib/ins_rdbms.mk ioracle ORACLE_HOME=/u01/oracle/product/18c/dbhome_1

How to Prevent Violate Active Dataguard License?

Hey folks,
As you all liked last week posts about preventing to violate Oracle Licensing, so let’s go another one, a quick one this time: Active Dataguard.

Matheus, is there a way to prevent using the Active Dataguard Option?

Well, there is. If you consider that this is basically a regular Dataguard that is opened in Read Only mode, here you go:

srvctl modify database -d GREPORADB_STBY -s MOUNT

By preventing the database open, we are preventing it to violate the Active Dataguard feature.

Quick reference on this:
– Which are Supported Methods to Prevent Active Data Guard Usage When License is Not Available? (Doc ID 2269239.1)

Hope it helps!

How to Disable AWR and Prevent Violating Diagnostic Tuning Pack License

Hey folks,
Seems you like it, so on same line that the post from last week: Let’s say you want to prevent yourself to violate Oracle licensing of your Enterprise Edition database… But as you know, Oracle is tricky sometimes. For example, all Diagnostic Pack features are enabled by default, you just need a JR DBA to go there and used for you to be stuck.

By the way, here is the first mistake: No, AWR is not part of Enterprise Edition, it also requires Diagnostic Pack!

Ok Matheus, so how to prevent it? Here it goes:

Disable AWR with Oracle provided script

Use the script dbmsnoawr.plb provided in MOS Doc ID 1909073.1 to disable AWR once the database has been created.

To install, run the package as SYS from SQL*Plus:
SQL> @dbmsnoawr.plb

To execute the package, use the command:
SQL> begin dbms_awr.disable_awr(); end;

Modify the CONTROL_MANAGEMENT_PACK_ACCESS init parameter to NONE and disable the AWR related advisors.

Disable AWR Related Options

ALTER SYSTEM SET control_management_pack_access=NONE;

SQL> select client_name, operation_name, status from dba_autotask_operation;

CLIENT_NAME                                                      OPERATION_NAME                                                   STATUS 
---------------------------------------------------------------- ---------------------------------------------------------------- --------
auto optimizer stats collection                                  auto optimizer stats job                                         ENABLED
auto space advisor                                               auto space advisor job                                           ENABLED
sql tuning advisor                                               automatic sql tuning task                                        ENABLED


BEGIN
  dbms_auto_task_admin.disable(
    client_name => 'sql tuning advisor',
    operation   => NULL,
    window_name => NULL);

  dbms_auto_task_admin.disable(
    client_name => 'auto space advisor',
    operation   => NULL,
    window_name => NULL);

END;
/

SQL> select client_name, operation_name, status from dba_autotask_operation;

CLIENT_NAME                                                      OPERATION_NAME                                                   STATUS 
---------------------------------------------------------------- ---------------------------------------------------------------- --------
auto optimizer stats collection                                  auto optimizer stats job                                         ENABLED
auto space advisor                                               auto space advisor job                                           DISABLED
sql tuning advisor                                               automatic sql tuning task                                        DISABLED

Some reference on it?
– How To Avoid the AWR Usage Without Having Diagnostic Pack License (Doc ID 2276199.1)
– Controlling Diagnostic and Tuning Pack Usage (Doc ID 436386.1)
– Disabling and Uninstalling AWR (Doc ID 1909073.1)

Hope it helps!