Enabling and Disabling Database Options

One of those small items that is easy overlooked (at least I overlooked it…) and I think, arrived with Oracle database version 11.2, at least on Windows/Linux…

The Oracle 11gR2 Database Installation Guide for Windows described a new tool, at least for me, that enables or disables database features on Windows. In the manual it is described as follows…

When you install Oracle Database, certain options are enabled and others are disabled. If you must enable or disable a particular database feature for an Oracle home, then shut down the database and use the chopt tool. See Example 5-1.

The chopt tool is a command-line utility that is located in the ORACLE_HOME\bin directory. The syntax for chopt is as follows:

chopt [ enable | disable] db_option

The possible values for db_option described in the following table.

ValueDescription
dmOracle Data Mining RDBMS Files
dvOracle Database Vault
lbacOracle Label Security
olapOracle OLAP
partitioningOracle Partitioning
ratOracle Real Application Testing
ode_net_2Oracle Database Extensions for .NET 2.0

Example 5-1 Complete Example of Running the Chopt Tool

To enable the Oracle Label Security option in your Oracle binary files:

  1. Shut down the database with srvctl or SQL*Plus:
    srvctl stop database -d myDb
  2. Stop the database service, OracleServiceSID, using the Services program in Control Panel.
  3. Run the following commands:
    cd %ORACLE_HOME%/bin
    chopt enable lbac
  4. Start the database service, OracleServiceSID, using the Services program in Control Panel.
  5. Start up the database:
srvctl start database -d myDb

In linux the “chopt” statement will show the following output

[oracle@localhost ~]$ chopt
 
usage:
 
chopt [enable|disable] {option}
 
options:
                  dm = Oracle Data Mining RDBMS Files
                  dv = Oracle Database Vault option
                lbac = Oracle Label Security
                olap = Oracle OLAP
        partitioning = Oracle Partitioning
                 rat = Oracle Real Application Testing
 
e.g. chopt enable rat

Useful information / good to know…its that easy in 11.2 to enable/disable database options.

HTH