Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Oracle Database deployment on Oracle Cloud Infrastructure

Simon Coter-OracleMay 14 2019 — edited Oct 25 2023

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"

    list.png

  • The "Oracle Database" homepage appears; click on "Launch Instance" button to get started
    oracledb-01.png

  • 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

    03.png.jpeg

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

    04.png.jpeg

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

    05.png

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

    06.png

  • 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):

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

Here an example for a "StandardIO" shape:

#!/bin/bash

mount /u01

/u01/ocidb/GenerateNetconfig.sh > /u01/ocidb/netconfig.ini

/u01/ocidb/buildsingle.sh -s

Here an example for a "Customized DenseIO" shape:

#!/bin/bash

# ORACLE_SID for the Oracle SID name

# example: export SIDNAME=MYDB

export SIDNAME=SCOTER

# DBNAME for the Oracle Database name

# example: export DBNAME=MYDB

export DBNAME=SCOTER

# Database Listener Port

# example: export LISTENERPORT=1522

export LISTENERPORT=1523

# Install Sample Schema into the Oracle Database

# example: export DBCA_SAMPLE_SCHEMA=yes

export 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=xfs

export FS_TYPE=xfs

# Define the mount-point where NVMe storage will be mounted and where database files will be created

# example: FS_DATAFILE_LOCATION=/db

export 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 /u01

mkdir -p $FS_DATAFILE_LOCATION

mkfs.$FS_TYPE /dev/nvme0n1

mount /dev/nvme0n1 $FS_DATAFILE_LOCATION

echo "/dev/nvme0n1 $FS_DATAFILE_LOCATION auto defaults,_netdev 0 0" >> /etc/fstab

/u01/ocidb/GenerateNetconfig.sh > /u01/ocidb/netconfig.ini

/u01/ocidb/buildsingle.sh -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.

    08.png

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

    09.png

  • 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

    10.png

[scoter@area51: ~]# ssh opc@241.11.241.11

Last login: Tue May 14 14:23:29 2019 from 127.0.0.1

[opc@ORCLDB-183 ~]$ sudo su - oracle

Last login: Tue May 14 14:23:33 GMT 2019 on pts/0

[oracle@ORCLDB-183 ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Tue May 14 14:24:01 2019

Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle. All rights reserved.

Connected to:

Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

Version 18.3.0.0.0

SQL> 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                                                       18.0.0.0.0        18.0.0.0.0        18.3.0.0.0        14-MAY-19 OPEN         NO

     1 STOPPED                 ALLOWED    NO  ACTIVE            PRIMARY\_INSTANCE   NORMAL    NO           0 REGULAR     EE

                                                                             SINGLE

SQL> quit

Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production

Version 18.3.0.0.0

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:

Comments

Post Details