Execute the roohctl -enable command from $ORACLE_HOME/bin directory
[oracle@host02 dbhome_1]$ pwd /u02/app/oracle/product/18.0.0/dbhome_1 [oracle@host02 dbhome_1]$ cd bin [oracle@host02 bin]$ ./roohctl -enable Enabling Read-Only Oracle home. 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. Check the log file /u02/app/oracle/cfgtoollogs/roohctl/roohctl-181102AM091318.log.
Verify if the Oracle Home is read-only
If the output of the orabasehome command is the same as the $ORACLE_HOME, then it means the Oracle home is configured in (traditional) read/write mode.
However, if the output displays the path ORACLE_BASE/homes/HOME_NAME, then the Oracle home is configured in read-only mode.
[oracle@host02 bin]$ export ORACLE_HOME=/u02/app/oracle/product/18.0.0/dbhome_1 [oracle@host02 bin]$ ./orabasehome /u02/app/oracle/homes/OraDB18Home1
ORACLE_BASE_CONFIG
The ORACLE_BASE_CONFIG contains the configuration files like the database init.ora and password files. In a read/write Oracle Home, the ORACLE_BASE_CONFIG is the same as the ORACLE_HOME.
In a read-only Oracle Home, the ORACLE_BASE_CONFIG is instead ORACLE_BASE. Under the $ORACLE_BASE we now have different directories for each $ORACLE_SID. So we will have for example $ORACLE_BASE/$ORACLE_SID/dbs directory – the dbs directory is not under the $ORACLE_HOME as in the case of earlier versions.
Run the command orabaseconfig to display the ORACLE_BASE_CONFIG value
[oracle@host02 bin]$ ./orabaseconfig /u02/app/oracle
orabasetab file
The orabasetab file is located under the ORACLE_HOME/install/ directory and can be used to determine if an ORACLE_HOME has been configured in read-only or read/write mode.
It also defines the ORACLE_BASE and the HOME_NAME of the Oracle home. HOME_NAME is the internal name for ORACLE_HOME.
The first field is the $ORACLE_HOME value.
The second field is the $ORACLE_BASE defined for the current ORACLE_HOME.
The third field contains the HOME_NAME which is used in constructing the ORACLE_BASE_HOME path in a read-only ORACLE_HOME. HOME_NAME is the internal name defined for ORACLE_HOME.
Note: In a read/write ORACLE_HOME, ORACLE_HOME, ORACLE_BASE_HOME and ORACLE_BASE_CONFIG will all have the same value.
The fourth field displays the value N in a read/write ORACLE_HOME and Y in a read-only ORACLE_HOME.
[oracle@host02 install]$ cat orabasetab #orabasetab file is used to track Oracle Home associated with Oracle Base /u02/app/oracle/product/18.0.0/dbhome_1:/u02/app/oracle:OraDB18Home1:Y:
Compare the same with a read/write Oracle Home
[oracle@host01 install]$ cat orabasetab #orabasetab file is used to track Oracle Home associated with Oracle Base /opt/oracle/product/18c/dbhome_1:/opt/oracle:OraHome1:N:
ORACLE_BASE_HOME
The read-write directories like $ORACLE_HOME/network/admin and $ORACLE_HOME/dbs are now located outside the ORACLE_HOME in the ORACLE_BASE_HOME directory structure
[oracle@host02 oracle]$ cd homes/ [oracle@host02 homes]$ ls -l total 4 drwxr-x---. 8 oracle oinstall 4096 Nov 2 09:54 OraDB18Home1 [oracle@host02 homes]$ cd OraDB18Home1/ [oracle@host02 OraDB18Home1]$ ls -l total 24 drwxr-x---. 3 oracle oinstall 4096 Nov 2 09:13 assistants drwxr-x---. 2 oracle oinstall 4096 Nov 2 10:41 dbs drwxr-x---. 2 oracle oinstall 4096 Nov 2 09:13 install drwxr-x--T. 4 oracle oinstall 4096 Nov 2 09:55 log drwxr-x---. 5 oracle oinstall 4096 Nov 2 09:13 network drwxr-x---. 4 oracle oinstall 4096 Nov 2 09:13 rdbms [oracle@host02 OraDB18Home1]$ ls -l ./network/admin total 12 -rw-r-----. 1 oracle oinstall 344 Nov 2 09:54 listener.ora -rw-r-----. 1 oracle oinstall 197 Nov 2 09:54 sqlnet.ora -rw-r-----. 1 oracle oinstall 433 Nov 2 10:13 tnsnames.ora [oracle@host02 OraDB18Home1]$ cd $ORACLE_BASE/dbs [oracle@host02 dbs]$ ls -l total 18308 -rw-rw----. 1 oracle oinstall 1544 Nov 2 10:31 hc_CDB2.dat -rw-r-----. 1 oracle oinstall 44 Nov 2 10:31 initCDB2.ora -rw-r-----. 1 oracle oinstall 24 Nov 2 09:55 lkCDB2 -rw-r-----. 1 oracle oinstall 3584 Nov 2 10:13 orapwCDB2 -rw-r-----. 1 oracle oinstall 18726912 Nov 2 10:41 snapcf_CDB2.f -rw-r-----. 1 oracle oinstall 3584 Nov 2 10:33 spfileCDB2.ora