Sometimes people have the desire to remove options from the database kernel (i.e. from the oracle executable).
It’s a matter of fact that by default you’ll get plenty of things linked into your kernel in Oracle Database 12c.
In case you’d like to remove things the chopt utility does still exist in Oracle Database 12c – but you may recognize a difference between Oracle 11.2 and Oracle 12.1. Anyhow, ideally you’ll do these changes before you create a database directly after the installation has been completed. See the documentation for Post Installation Tasks first:
- Oracle 11.2 – chopt utility options:
http://docs.oracle.com/cd/E11882_01/install.112/e48740/post_inst_task.htm#AXDBI1274 - Oracle 12.1 – chopt utility options on Unix/Linux:
http://docs.oracle.com/database/121/LADBI/post_inst_task.htm#LADBI5600 - Oracle 12.1 – chopt utility options on Windows:
http://docs.oracle.com/database/121/NTDBI/postcfg.htm#NTDBI5600
Now let’s call chopt and see what it tells us on the command prompt:
$ chopt usage: chopt <enable|disable> <option> options: dm = Oracle Data Mining RDBMS Files olap = Oracle OLAP partitioning = Oracle Partitioning rat = Oracle Real Application Testing e.g. chopt enable rat
For a first try I’m unlinking Data Mining:
$ chopt disable dm Writing to /u01/app/oracle/product/12.1.0.2/install/disable_dm.log... /usr/bin/make -f /u01/app/oracle/product/12.1.0.2/rdbms/lib/ins_rdbms.mk dm_off ORACLE_HOME=/u01/app/oracle/product/12.1.0.2 /usr/bin/make -f /u01/app/oracle/product/12.1.0.2/rdbms/lib/ins_rdbms.mk ioracle ORACLE_HOME=/u01/app/oracle/product/12.1.0.2
I tested all the 4 available chopt options and this is the result when you exit SQL*Plus afterwards:
SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
versus before with all options still linked into the kernel:
SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
But how about all the other options being available in releases
before Oracle Database 12c, such as: lbac_on|off
(Label Security), dv_on|off
(Database Vault)? If you’d refer to the list of options to link on/off published by Ghokan Atil years back in his blog you may find more things to try out.
Lets give it a try with Label Security:
$ /usr/bin/make -f /u01/app/oracle/product/12.1.0.2/rdbms/lib/ins_rdbms.mk lbac_off ORACLE_HOME=/u01/app/oracle/product/12.1.0.2 lbac_off has been deprecated
Ah, very smart š It signals that you can’t link those things off anymore. The same would happen with dv_off.
And how about things which are from older sources, such as Spatial Data (sdo_on|off
)?
$ /usr/bin/make -f /u01/app/oracle/product/12.1.0.2/rdbms/lib/ins_rdbms.mk sdo_off ORACLE_HOME=/u01/app/oracle/product/12.1.0.2
Warning: sdo is always turned on. sdo_off is disabled
In this case it would be simple: You’d take out SDO from the
components inside the database – and there’s no need to unlink anything.
Update:
But months later I learned that there’s in fact an option you can unlink (It’s linked in by default): JOX, the JavaVM JIT Compiler option.
$ cd $ORACLE_HOME/rdbms/lib $ /usr/bin/make -fĀ /u01/app/oracle/product/12.1.0.2/rdbms/lib/ins_rdbms.mk jox_off ioracle
Please find the related blog post here:
- https://mikedietrichde.com/2017/02/23/remove-components-from-the-oracle-kernel-with-chopt/
- https://mikedietrichde.com/2015/12/02/what-or-who-is-jox-and-what-happens-if/
–Mike
Hi Mike,
chopt is for 4 options only. What we really need would be on/off switches for _ALL_ Oracle extra cost options to avoid license violations effectively.
Please come back soon when they are build-in. š
Cheers, Markus
Markus,
fully agree – but this is not in my hands unfortunately (even though I strongly vote for it).
Cheers
Mike