Configuring Read-Only Oracle Homes
About Read-Only Oracle Homes
Starting with Oracle Database 18c, an Oracle home can be configured in read-only mode while its underlying file system remains read/write. This configuration separates software installation from operational configuration by relocating user-specific files, logs, and configuration data outside ORACLE_HOME into ORACLE_BASE_HOME and ORACLE_BASE_CONFIG. Read-only mode should be enabled before creating the database or listener and does not change database monitoring, diagnosis, or performance-tuning procedures.
Read More: About Read-Only Oracle Homes
About Oracle Base Homes
ORACLE_BASE_HOME stores user-specific, instance-specific, and log files for both read-only and read/write Oracle homes. In a read/write installation it is the same directory as ORACLE_HOME, while in a read-only installation it is located at ORACLE_BASE/homes/HOME_NAME; for example, networking administration, trace, and log directories reside there. The orabasehome command, run from ORACLE_HOME/bin, displays the active ORACLE_BASE_HOME path.
Read More: About Oracle Base Homes
About Oracle Base Config
ORACLE_BASE_CONFIG contains Oracle home configuration files. In a read/write installation it is the same as ORACLE_HOME, whereas in a read-only installation it equals ORACLE_BASE. Its dbs subdirectory stores configuration files identified by ORACLE_SID, allowing the directory to support multiple instances. The orabaseconfig command from ORACLE_HOME/bin displays the configured ORACLE_BASE_CONFIG path.
Read More: About Oracle Base Config
About orabasetab
The orabasetab file, located at ORACLE_HOME/install/orabasetab, defines ORACLE_BASE, HOME_NAME, and the relationships among Oracle home directories. Its final colon-delimited entry identifies the Oracle home, base directory, internal home name, and mode indicator, with N denoting read/write and Y denoting read-only. In read-only mode, ORACLE_BASE_HOME is ORACLE_BASE/homes/HOME_NAME and ORACLE_BASE_CONFIG is ORACLE_BASE; in read/write mode, all three logical locations coincide with ORACLE_HOME. The file can be inspected by the Oracle software owner.
Read More: About orabasetab
Enabling a Read-Only Oracle Home
Enable a read-only Oracle home after completing a software-only Oracle Database installation by running roohctl -enable, then create the database with DBCA. The installation requires creating and extracting the database home, running the installer with Set Up Software Only selected, and executing roohctl from the home’s bin directory. For Oracle RAC, run the command on every node or specify a node list. The read-only configuration must be enabled before creating the database or listener.
Read More: Enabling a Read-Only Oracle Home
Copying demo Directories to Oracle Base Home
Because demonstration directories may be modified during use, their required copies must be moved from ORACLE_HOME to ORACLE_BASE_HOME for read-only installations. The affected directories include jdbc, odbc, ord/http, precomp, rdbms, sqlj, sqlplus, and xdk demo paths; symbolic links are required for the odbc, precomp, rdbms, and xdk locations so applications resolve the relocated content. The init.ora file must also be copied to ORACLE_BASE_HOME or synchronized there, while plsql/demo/ncmpdemo.sql is not usable in read-only mode.
Read More: Copying demo Directories to Oracle Base Home
Determining if an Oracle Home is Read-Only
Use the orabasehome command from ORACLE_HOME/bin to determine the Oracle home mode. If it returns the same path as ORACLE_HOME, the installation is read/write; if it returns ORACLE_BASE/homes/HOME_NAME, the installation is read-only. ORACLE_HOME must be set in the shell environment before running the command.
Read More: Determining if an Oracle Home is Read-Only
File Path and Directory Changes in Read-Only Oracle Homes
Read-only Oracle homes retain the same ORACLE_HOME and ORACLE_BASE locations but relocate operational directories. ORACLE_BASE_HOME moves from ORACLE_HOME to ORACLE_BASE/homes/HOME_NAME, and ORACLE_BASE_CONFIG moves from ORACLE_HOME to ORACLE_BASE. Consequently, networking files are stored under ORACLE_BASE_HOME/network, while database configuration files are stored under ORACLE_BASE/dbs instead of ORACLE_HOME/dbs; read/write installations keep these paths within ORACLE_HOME.
Read More: File Path and Directory Changes in Read-Only Oracle Homes