Read-Only Oracle Home

Read-Only Oracle Home

Starting with Oracle Database 18c, you can configure an Oracle home in read-only mode. Benefits of a Read-Only Oracle Home:

– Enables seamless patching and updating of Oracle databases without extended downtime
– Simplifies patching and mass rollout as one image will be enough to distribute a patch to many servers
– Simplifies provisioning by implementing separation of installation and configuration

 

SYNTAX


$ roohctl -help
Usage: roohctl [<flag>] [<command> <option>]
Following are the possible flags:
-help

Following are the possible commands:
-enable Enable Read-only Oracle Home
[-nodeList List of nodes in a cluster environment]

 

The orabasetab file resides in ORACLE_HOME/install/orabasetab and can be used to determine if an ORACLE_HOME is read-only or read/write. The last field is ‘N‘ and means that read only oracle home is disable.


$ cat $ORACLE_HOME/install/orabasetab
#orabasetab file is used to track Oracle Home associated with Oracle Base
/u01/app/oracle/product/18.0.0.0/dbhome_1:/u01/app/oracle:c10_DbHome_1:N:

 

Enable Read-Only Oracle Home

 

If the utility “roohctl” finds an existing database or listener related to this Oracle Home it will return the error:


$ roohctl -enable
Enabling Read-Only Oracle home.
Cannot enable Read-Only Oracle home in a configured Oracle home.
The Oracle Home is configured with databases 'cpdbanq01,cpdbcmi10,cpdbdcd1'.

There is an undocumented “-force” parameter to add to “roohctl -enable”:


$ roohctl -enable -force
Enabling Read-Only Oracle home.
The Oracle Home is configured with databases databases 'cpdbanq01,cpdbcmi10,cpdbdcd1'.
Update orabasetab file to enable Read-Only Oracle home.
Orabasetab file has been updated successfully.
Create bootstrap directories for Read-Only Oracle home.
Bootstrap directories have been created successfully.
Bootstrap files have been processed successfully.
Read-Only Oracle home has been enabled successfully.

 

View the contents of the orabasetab file. The last field is ‘Y‘ and means that read only oracle home is enabled.


$ cat $ORACLE_HOME/install/orabasetab
#orabasetab file is used to track Oracle Home associated with Oracle Base
/u01/app/oracle/product/18.0.0.0/dbhome_1:/u01/app/oracle:c10_DbHome_1:Y:

 

Disable Read-Only Oracle Home

 

You disable a Read Only Oracle Home with ‘roohctl -disable‘:

$ roohctl -disable -force 
Disabling Read-Only Oracle home. 
Update orabasetab file to disable Read-Only Oracle home. 
Orabasetab file has been updated successfully. 
Read-Only Oracle home has been disabled successfully. 
Check the log file /u01/app/oracle/cfgtoollogs/roohctl/roohctl-210110PM125527.log.