Sunday, April 28, 2019

Add or Remove Database Options with chopt

chopt tool allows easier way of enabling or disabling certain database options after the database software installation. chopt does the binary relinking as part of enabling or disabling. Following shows an oracle database installation where real application testing is enabled (output generated using script here).
RAC             [    INSTALLED     ]
RAT             [    INSTALLED     ]
OLS             [  NOT INSTALLED   ]
DV              [  NOT INSTALLED   ]
ASM             [  NOT INSTALLED   ]
OLAP            [    INSTALLED     ]
PART            [    INSTALLED     ]
CTX             [    INSTALLED     ]
chopt is used to disable RAT. Shutdown the database first and then use chopt.
srvctl stop database -db en18c

chopt disable rat

Writing to /opt/app/oracle/product/18.x.0/dbhome_1/install/disable_rat_2019-04-09_15-36-37pm.log...
/usr/bin/make -f /opt/app/oracle/product/18.x.0/dbhome_1/rdbms/lib/ins_rdbms.mk rat_off ORACLE_HOME=/opt/app/oracle/product/18.x.0/dbhome_1
/usr/bin/make -f /opt/app/oracle/product/18.x.0/dbhome_1/rdbms/lib/ins_rdbms.mk ioracle ORACLE_HOME=/opt/app/oracle/product/18.x.0/dbhome_1

srvctl start database -db en18c


Checking the output for enabled components after the change shows RAT is not installed any more.
RAC             [    INSTALLED     ]
RAT             [  NOT INSTALLED   ]
OLS             [  NOT INSTALLED   ]
DV              [  NOT INSTALLED   ]
ASM             [  NOT INSTALLED   ]
OLAP            [    INSTALLED     ]
PART            [    INSTALLED     ]
CTX             [    INSTALLED     ]
Currently chopt could be used to enable or disable Oracle Advanced Analytics, Oracle OLAP, Oracle Partitioning and Oracle Real Application Testing options in 12.1 and above. For 11.2 the list include Oracle Data Mining RDBMS Files, Oracle Database Vault option, Oracle Label Security, Oracle OLAP, Oracle Partitioning and Oracle Real Application Testing.