Oracle by Example brandingEnable a Read-Only Oracle Home and Create a Database

section 0Before You Begin

This 15-minute tutorial shows you how to enable a read-only Oracle home and create a database.

Background

In a read-only Oracle home, all the configuration data and log files reside outside of the read-only Oracle home. This feature allows you to use the read-only Oracle home as a software image that can be distributed across multiple servers.

Apart from the traditional ORACLE_BASE and ORACLE_HOME directories, the following directories contain files that used to be in ORACLE_HOME:

  • ORACLE_BASE_HOME

    This directory contains user-specific files, instance-specific files, and log files. In a read/write ORACLE_HOME, the ORACLE_BASE_HOME path is the same as the ORACLE_HOME directory. However, in a read-only ORACLE_HOME, the ORACLE_BASE_HOME directory is located at ORACLE_BASE/homes/HOME_NAME. HOME_NAME is the internal name for ORACLE_HOME.

  • ORACLE_BASE_CONFIG

    This directory contains configuration files. In a read/write ORACLE_HOME, the ORACLE_BASE_CONFIG path is the same as the ORACLE_HOME. However, in a read-only ORACLE_HOME, the ORACLE_BASE_CONFIG path is the same as ORACLE_BASE.

What Do You Need?


section 1Enable a Read-Only Oracle Home

  1. Go to the bin directory.
    $ cd $ORACLE_HOME/bin

    where ORACLE_HOME is the path to the Oracle home directory. For example:

    /u01/app/oracle/product/18.0.0/dbhome_1

  2. Run the roohctl script.
    $ ./roohctl -enable 

    The following message is displayed:

    Description of the Enabling Read-Only Oracle Home Script Ouput
    Description of the Enabling Read-Only Oracle Home Script Output

section 2Run Oracle Database Configuration Assistant

  1. Ensure that you are still in the bin directory and run Oracle Database Configuration Assistant (Oracle DBCA).
    $ ./dbca
  2. In the Select Database Operation screen, select Create a Database and click Next.

    The configuration screens vary depending on the options you select. Respond to the prompts as needed. Click Help if you have any questions about the information you are asked to submit during database creation.

  3. In the Select Database Creation Mode screen, select Typical configuration and enter the values for the following:

    Note: Typical configuration is selected for the purpose of this tutorial.  In this configuration, you make fewer choices in the options for your database, which allows you to create your database sooner.

    Global database name: Enter the database name in the form database_name.domain_name.

    Storage type: Choose either File System or Automatic Storage Management.

    When you choose File System, your database files are managed by the file system of your operating system.

    When you choose Automatic Storage Management, you place your data files in Oracle Automatic Storage Management (Oracle ASM) disk groups.

    Database files location: The choice you make for the Storage type option determines what you specify for the Database files location option.

    When you choose File System in the Storage type field, you specify the directory path where the database files are to be stored in the Database files location field. Oracle Database can create and manage the actual files.

    When you choose Automatic Storage Management in the Storage type field, you specify the disk group to use in the Database files location field (the disk group must already exist). With Oracle ASM, Oracle Database automatically manages database file placement and naming.

    Fast Recovery Area (FRA): Specify a backup and recovery area.

    Database character set: Choose the character set to use for the database.

    Administrative password: Enter the password to use for the database administrative passwords. For example: Oracle_4u.

    Confirm password: Reenter the password. For example, Oracle_4u.

    Description of the Select Database Creation Mode screen
    Description of the Select Database Creation Mode screen
  4. Select the Create as Container database option if you want to create the database as a multitenant container database (CDB) that can support zero, one, or many user-created pluggable databases (PDBs).
  5. If you want Oracle DBCA to create a PDB when it creates the CDB, specify the PDB name in the Pluggable database name field. For example, pdb1. Click Next.
  6. In the Summary screen, select Save Response File to save the response file to a directory and click Next.

    You can use this response file later to create a database in a silent mode.

  7. The Progress Page displays the progress of database creation.
    Description of the Database Creation progress
    Description of the Database Creation progress
  8. Click Close to exit the Database Configuration Assistant wizard.

next stepNext Tutorial

Perform an Oracle Database Examples Installation


more informationWant to Learn More?