Configuring Oracle Homes
About Read-Only Oracle Homes
Read-only Oracle Homes separate Oracle software installation from configuration and operational data. Although the Oracle Home is configured as read-only, its file system and mount point remain read/write. Configuration files and logs are relocated outside ORACLE_HOME into ORACLE_BASE_HOME and ORACLE_BASE_CONFIG, and read-only mode should be enabled with roohctl before creating the database or listener.
Read More: About Read-Only Oracle Homes
About Oracle Base Home
ORACLE_BASE_HOME stores user-specific, instance-specific, networking, and log files for both read-only and read/write Oracle Homes. In read/write mode it is the same as ORACLE_HOME; in read-only mode it is located at ORACLE_BASE/homes/HOME_NAME. The orabasehome command, run from ORACLE_HOME/bin, reports the applicable path.
Read More: About Oracle Base Home
About Oracle Base Config
ORACLE_BASE_CONFIG stores Oracle Home configuration files, including database files in its dbs subdirectory. In read/write mode it equals ORACLE_HOME, while in read-only mode it equals ORACLE_BASE, allowing configuration files such as SPFILEs and password files to reside outside the software installation. The orabaseconfig command reports the applicable location.
Read More: About Oracle Base Config
About orabasetab
The orabasetab file, located at ORACLE_HOME/install/orabasetab, defines ORACLE_HOME, ORACLE_BASE, HOME_NAME, and whether the home is read-only. Its final colon-delimited entry identifies the Oracle Home, base directory, internal home name, and mode flag, with Y indicating read-only and N indicating read/write. 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 equal ORACLE_HOME.
Read More: About orabasetab
Location of Networking Files in a Read-Only Oracle Home
In a read-only Oracle Home, networking directories are stored under ORACLE_BASE_HOME/network, while read/write installations use ORACLE_HOME/network. tnsnames.ora is searched for in TNS_ADMIN, /etc, ORACLE_BASE_HOME/network/admin, and ORACLE_HOME/network/admin; sqlnet.ora is searched for in TNS_ADMIN, ORACLE_BASE_HOME/network/admin, and ORACLE_HOME/network/admin. Password files are searched for first in ORACLE_BASE_CONFIG/dbs and then ORACLE_HOME/dbs.
Read More: Location of Networking Files in a Read-Only Oracle Home
Enabling a Read-Only Oracle Home
Enable read-only mode after a software-only Oracle AI Database installation by running roohctl -enable, then create the database with DBCA. The Oracle Home must be configured before creating the database or listener. For Oracle RAC, run roohctl on every node or use its nodelist option to specify all cluster nodes.
Read More: Enabling a Read-Only Oracle Home
Copying demo Directories to Oracle Base Home
Because demo directories may be modified when used, copy the required directories from ORACLE_HOME to ORACLE_BASE_HOME in a read-only installation. The affected locations include jdbc, odbc, ord/http, precomp, rdbms, sqlplus, and xdk demos; symbolic links must replace the original odbc, precomp, rdbms, and xdk paths as specified. Also copy or synchronize init.ora into ORACLE_BASE_HOME. The plsql/demo ncmpdemo.sql file is not usable in read-only mode.
Read More: Copying demo Directories to Oracle Base Home
Determining If an Oracle Home is Read-Only
Run 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. The ORACLE_HOME environment variable must be set 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 relocate writable configuration and operational directories outside the software installation. ORACLE_BASE_HOME becomes ORACLE_BASE/homes/HOME_NAME, ORACLE_BASE_CONFIG becomes ORACLE_BASE, networking files move under ORACLE_BASE_HOME/network, database configuration files under ORACLE_BASE_CONFIG/dbs, and hs, mgw, and drdaas administration files under ORACLE_BASE_HOME. In read/write mode, these locations remain within ORACLE_HOME; the orabasehome and orabaseconfig commands display the active paths.
Read More: File Path and Directory Changes in Read-Only Oracle Homes