Forum Stats

  • 3,734,326 Users
  • 2,246,947 Discussions


Oracle Database deployment on Oracle Cloud Infrastructure

Simon Coter-Oracle
Simon Coter-Oracle Member Posts: 67 Employee

The award winning Oracle Database engine is now available for evaluation in the Oracle Cloud/MarketPlace. The deployment, as well as the automation, is leveraging the decade long Oracle VM Templates for Oracle Database framework to provide a quick, easy and cost efficient path to deploy an Oracle Database in the Cloud.

By leveraging Oracle Database on the Oracle Cloud Marketplace, you can deploy an Oracle Database in minutes on your preferred Oracle Cloud Infrastructure Instance shape.

Here the steps required to deploy the "Oracle Database" on Oracle Cloud Infrastructure:

  • Open the Oracle Cloud MarketPlace and select the "Oracle Database"


  • The "Oracle Database" homepage appears; click on "Launch Instance" button to get started
  • On the "Launch Instance" window, choose the desired "Oracle Database Release" and the "OCI Compartment" where to deploy.
  • Once done, review the "Terms of Use" and click on "Launch Instance" button


  • On the "Create Compute Instance" window, choose the desired "Instance Name", select the preferred "Availability Domain" and the "Instance Type"


  • On the same window, choose the desired "Instance Shape" and supply your own "SSH Key" for the key-based authentication


  • On the same window, define the desired "Network Configuration" for your "OCI Instance" and expand the "Show Advanced Option" section


  • On the "Advanced Section" supply the "Database Deployment Cloud Init" file
Followin step is OPTIONAL; this means, that simply Launching an instance will automatically create the default database (single instance) on that VM/BM, using ORCL sid, listener port 1521 and all the Oracle Database default options.

Automated Deployment options are available (see this attached file):

      • Example for the default Oracle Database deployment on "StandardIO" OCI Shapes, cloud-init syntax
      • Example for the default Oracle Database deployment on "StandardIO" OCI Shapes, shell syntax
      • Example for the customized Oracle Database deployment on "StandardIO" OCI Shapes, shell syntax; options available:
        • SIDNAME
        • DBNAME
      • Example for the default Oracle Database deployment on "DenseIO" OCI Shapes, shell syntax
      • Example for the default Oracle Database deployment on "DenseIO" OCI Shapes, shell syntax; options available:
        • SIDNAME
        • DBNAME
        • FS_TYPE

Here an example for a "StandardIO" shape:

#!/bin/bashmount /u01/u01/ocidb/ > /u01/ocidb/netconfig.ini/u01/ocidb/ -s

Here an example for a "Customized DenseIO" shape:

#!/bin/bash# ORACLE_SID for the Oracle SID name# example: export SIDNAME=MYDBexport SIDNAME=SCOTER# DBNAME for the Oracle Database name# example: export DBNAME=MYDBexport DBNAME=SCOTER# Database Listener Port# example: export LISTENERPORT=1522export LISTENERPORT=1523# Install Sample Schema into the Oracle Database# example: export DBCA_SAMPLE_SCHEMA=yesexport DBCA_SAMPLE_SCHEMA=yes# Define the Filesystem Type will be used on NVMe storage for database files# Options available are: ext4 or xfs# example: export FS_TYPE=ext4# example: export FS_TYPE=xfsexport FS_TYPE=xfs# Define the mount-point where NVMe storage will be mounted and where database files will be created# example: FS_DATAFILE_LOCATION=/dbexport FS_DATAFILE_LOCATION=/SCOTER# Further Popular parameters: that may be useful to change during initial or re-deployment:# - DBCA_PLUGGABLE_DB_NAME (Pluggable database name)  defaults 'orclpdb'# - REDOLOG_FILESIZE_MB (redologs size) default automatic# - CLONE_SI_DATABASE_AUTOSTART_USE_SYSTEMD (Start DB via Systemd framework) default "no"# - CLONE_DATABASE_EDITION (Database Edition) default "EE"  [STD for Standard Edition 2]mount /u01mkdir -p $FS_DATAFILE_LOCATIONmkfs.$FS_TYPE /dev/nvme0n1mount /dev/nvme0n1 $FS_DATAFILE_LOCATIONecho "/dev/nvme0n1 $FS_DATAFILE_LOCATION  auto defaults,_netdev 0 0" >> /etc/fstab/u01/ocidb/ > /u01/ocidb/netconfig.ini/u01/ocidb/ -s

  • Based on the OCI Shapes choose you can proceed to customize an existing Oracle Database Deployment script (starting from examples available above in the zip file)
  • When ready, just upload the script into the "User Data" section as a "cloud-init script"; the script can be "cloud-init" as well as "shell" one.


  • Click on "Create Instance" button to proceed to the "Oracle Database" deployment


  • Wait for your "OCI Oracle Database Instance" to start to then work with the Oracle Database deployed.
  • To connect to your "OCI Instance", just use "ssh" and the SSH-Key added to the deployment phase


[[email protected]: ~]# ssh [email protected] login: Tue May 14 14:23:29 2019 from[[email protected] ~]$ sudo su - oracleLast login: Tue May 14 14:23:33 GMT 2019 on pts/0[[email protected] ~]$ sqlplus / as sysdbaSQL*Plus: Release - Production on Tue May 14 14:24:01 2019Version (c) 1982, 2018, Oracle.  All rights reserved.Connected to:Oracle Database 18c Enterprise Edition Release - ProductionVersion> select * from v$instance;INSTANCE_NUMBER INSTANCE_NAME    HOST_NAME                                                        VERSION           VERSION_LEGACY    VERSION_FULL      STARTUP_T STATUS       PAR--------------- ---------------- ---------------------------------------------------------------- ----------------- ----------------- ----------------- --------- ------------ ---   THREAD# ARCHIVE LOG_SWITCH_WAIT LOGINS     SHU DATABASE_STATUS   INSTANCE_ROLE      ACTIVE_ST BLO     CON_ID INSTANCE_MO EDITION---------- ------- --------------- ---------- --- ----------------- ------------------ --------- --- ---------- ----------- -------FAMILY                                                                           DATABASE_TYPE-------------------------------------------------------------------------------- ---------------              1 SCOTER           ORCLDB-183                                                     14-MAY-19 OPEN         NO         1 STOPPED                 ALLOWED    NO  ACTIVE            PRIMARY_INSTANCE   NORMAL    NO           0 REGULAR     EE                                                                                 SINGLESQL> quitDisconnected from Oracle Database 18c Enterprise Edition Release - ProductionVersion

Note: The deployed Oracle Database environment does not includes the latest Oracle Linux & Oracle Database patches at time of the deployment. It is strongly recommended to apply the latest updates using standard OS/Oracle Database patching practices. Oracle Linux updates may be obtained via 'yum update' and Oracle Database patches as described in Critical Patch Updates (CPU) page on Oracle website.

For further information:


Sign In or Register to comment.