Create 12c RAC Database

<- Create


What follows are the steps to create a standard Oracle RAC database for an enterprise environment.

You can view the progress of the dbca via:

 tail -f /u01/app/oracle/diag/rdbms/<DBName>/<InstName>/trace/alert_<InstName>.log


Create RAC Database


  1. You have created the BASH profile for the oracle user account.
  2. Your SA has provided disks and volumes for ASM.
  3. You have installed and configured the Grid Infrastructure (GI).
  4. As grid user, ensure core cluster components up:
    • olsnodes
    • srvctl status asm
    • crsctl check cluster -all
    • crs_stat -t
  5. Using asmca you have created the required Disk Groups
    Commonly created groups below:
    • MGMT: Grid Infrastructure Management Repository (AKA GIMR).
    • GRID: OCR (Oracle Cluster Registry) and Voting Files.
    • DATA: Control, data, redo, parameter, password and temp files.
    • FRA (Fast Recovery Area): Archived logs, control and redo files.


Perform the below as the oracle user account.

Run dbca.

 cd $ORACLE_HOME/bin
 ./dbca &



Database Operation

  Create Database

Creation Mode

  Advanced configuration

Deployment Type

 Database Type:      Oracle Real Application Clusters (RAC) Database
 Configuration Type: Admin Managed
   Custom Database

Nodes Selection

 Ensure all nodes to selected.
 Example:  lnx01

Database Identification

 Global Database Name: oradb
 SID Prefix: oradb

 Note: Whatever name you choose will be used as the base name for instances.
 Ex: oradb1, oradb2 ...

  Create As Container Database

Storage Option

  Use following for the database storage attributes
     Database files Storage Type: Automatic Storage Management (ASM)
      Use Oracle-Managed Files

This will be the: DB_CREATE_FILE_DEST

Fast Recovery Area

  Specify Fast Recovery Area
      Recovery Files Storage Type: Automatic Storage Management (ASM)
      Fast Recovery Area:          +FRA
      Fast Recovery Area Size: <use default or greater> Ex: 25 GB  Determine FRA Size
  Enable Archiving
       Automatic Archiving
          Archive Log File Format: %t_%s_%r.arc

          Note: No need to specify "Archive log destinations". The FRA will be used.

This will be the: DB_RECOVERY_FILE_DEST

Database Options

 Only select what you are actually going to use.
 Ex:  Oracle JVM

 (if prompted)
 Data Vault Option
 [ ] Configure Oracle Database Vault
 [ ] Configure Oracle Label Security 

Configuration Options

         Use Automatic Shared Memory Management
            SGA size: 2394 mb (Use 50-75% of your systems RAM.)
            PGA size:  798 mb
        Block Size: 8192 Bytes
        Processes:  1500
  Character Sets
         Use Default
  Connection Mode
         Dedicated Server Mode

Management Options

  Run Cluster Verification Utility (CVU) Check Periodically
  Configure Enterprise Manager (EM) Database Express
    EM Database Express Port: 5500
   Register with Enterprise Manager (EM) Cloud Control

User Credentials

  Use the same administrative password for all accounts
    Password:         ********
    Confirm Password: ********

Creation Options

  Create database

 ===> Make sure to press  after each change!  <===

 • Control Files:  Options
     Maximum Datafiles: 1024
     Maximum Instances: 8
     Maximum Log History: 1
     Maximum Redo Log Files: 16
     Maximum Log Members: 3

 • Tablespaces
    For each where possible:
        Use Locally Managed Tablespace
           Allocation: (x) Automatic  
        Use Bigfile Tablespace

    • A SYSTEM tablespace cannot use Automatic Segment Space Management.
    • A Temp tablespace cannot be automatically allocated,
      i.e. you have to use (x) Uniform and specify Bytes.
 • Datafiles
      Increment: 25 MBytes
   Maximum Size:  Unlimited

   File                               Size (small | medium)
   --------------------------------   ---------------------------
   OMF_SYSAUX_1                          1 gb |  2 gb
   OMF_SYSTEM_1                          1 gb |  2 gb
   OMF_TEMP_1                            5 gb | 25 gb
   OMF_UNDOTBS<n_1>                      2 gb | 25 gb
   OMF_USERS_1                          25 mb

 • Redo Log Groups (minimum 4 groups with two members each)

   File Name                            Size
   -----------------------------------  ------
   <OMF_1_REDOLOG_MEMBER_0>             200 mb
   <OMF_2_REDOLOG_MEMBER_0>             ...
   <OMF_3_REDOLOG_MEMBER_0>             ...
   <OMF_4_REDOLOG_MEMBER_0>             ...

   Create Database
   Save as a Database Template
       Name: Standard


 • Window blanks out for about a minute.
 • Then Progress Page displayed... 

 You can tail the log shown


Delete Database

As the oracle user run the Database Configuration Assistant (DBCA).

 0. cd $ORACLE_HOME/bin
   ./dbca &
 1. Select: (x) Delete Database.
            User name: SYS
            Password:  ********
 2. Management Options: 
    [ ] De-register from EM cloud control
 3. Summary: Confirm this is the database you want deleted.
             Then press Finish
 4. Process will run...
 5. When completed you will see the message:
    "Database deletion completed"

You might need to delete FRA data to regain ASM space.

 grid> asmcmd
 asmcmd> cd FRA
 asmcmd> rm -rf mydb

FRA data is not purged when you delete a database.

Add RAC Database Instance

  • Assumes Oracle database product already installed.
  • Run using the oracle user from first RAC node. You will add a node from there.
  1. Database Operation
    (x) Instance Management
  2. Instance Operation
    (x) Add an instance
  3. Database List
    You should see Database listed\selected. Select Next.
  4. List Instance
    Existing instances will be displayed.
    Click Next to add the new instance.
  5. Add Instance
    Instance Name: db3 (increments existing base name)
    Node name: <Hostname Displayed>
  6. Summary
    • If need be change the Custom Storage Locations.
    • Review then press Finish.
  7. Progress Page (process displayed)
    • Adding instance...
    • Completing instance management...
  8. Finish
    Success = Instance "<InstanceName>" added successfully on node "<NodeName>".
    Select Close.
  9. Confirm
    srvctl status database -d <DBName>
    Added instance should be displayed.

Delete RAC Database Instance

This process deletes the Oracle instance and its associated OFA directory structure. All information about this instance will be deleted. Run using the oracle user from first RAC node. You will delete the node from there.

  1. Run DBCA
    cd $ORACLE_HOME/bin
    ./dbca &
  2. Database Operation
    (x) Oracle RAC database Instance management
  3. Instance Operation
    (x) Delete an instance
  4. Select Database
    You should see the Database listed\selected.
    Select instance from list to delete.
    User name: sys
    Password: ********
  5. Delete Instance Selection
    (x) oradb3 (Node name: rac03)
  6. Summary
    • Instance to be deleted will be displayed.
    • If correct press Finish.
  7. Progress Page (process displayed)
    • Deleting instance...
    • Completing instance management...
  8. Finish
    Success = Instance "<InstanceName>" deleted successfully on node "<NodeName>".
    Select Close.
  9. Confirm
    srvctl status database -d <DBName>
    Deleted instance should not be displayed.

Fast Recovery Area (FRA) Size

The minimum recommended size is:

 FRA = database size + RMAN files + archived logs + flashback logs (if used)

Multiplex Redo Logs and Control Files

Prerequisite (init file system):

 mkdir -p /u03/oradata
 chown -R oracle:oinstall /u03/oradata
 chmod -R 775 /u03/oradata

 mkdir -p /u04/oradata
 chown -R oracle:oinstall /u04/oradata
 chmod -R 775 /u04/oradata

During dbca:

 Location: 1. /u03/oradata
 Location: 2. /u04/oradata

OMF creates the following directories correspondingly:



New Database Initial Oracle Schema


<- Create