Upgrading in the cloud – VM DB Systems

This is the first post in a series on the entry-level database system in OCI – being Virtual Machine DB System (VM DB System). You don’t get the same specs as with Exadata DB Systems and Bare Metal DB Systems, but it is much more affordable and still a very good platform. There is good tooling that allows most operations to be fully automated. But there are some limitations that you must be aware of that makes upgrading slightly different.

  • It is not supported to install a second database Oracle Home. You must use the one that is supplied when the system is provisioned. If you need a new database Oracle Home, you must provision a new system.
  • It is not supported to upgrade the Grid Infrastructure.
  • It is not supported to drop the existing CDB and create your own. It is, however, supported to drop the pre-created CDB and replace it with a backup (and we will discuss this option later).
  • For Database 19c you can only provision systems with multitenant architecture.

Obviously, this limits our possibilities to perform upgrades, and you must do things a little different than you would on-premises. But this is our entry-level offering and you don’t get all the nice features that you get with an ExaCS.

Provision a new VM DB System with 19c

For this blog post series, I will be upgrading to Oracle Database 19c. Whenever I need to upgrade a database on a VM DB System I need to create a new VM DB System due to the restrictions mentioned above. As part of the upgrade I need to move the database from the old release DB System to the new release DB System. For the purpose of creating new VM DB Systems, I will be using the OCI CLI. My fellow PM Pieter Van Puymbroeck recently showed in a blog post how to use OCI CLI to provision new systems, so I will use the same approach. You can either use a cloud shell or install OCI CLI on your own machine. Create the new system with Oracle Database release 19c:

oci db system launch --compartment-id "..." \
   --availability-domain "..." \
   --subnet-id "..." \
   --shape "VM.Standard2.2" \
   --cpu-core-count 2 \
   --database-edition "STANDARD_EDITION" \
   --admin-password "..." \
   --ssh-authorized-keys-file "..." \
   --license-model "BRING_YOUR_OWN_LICENSE" \
   --db-name "CDB1" \
   --pdb-name "SALES" \
   --storage-management "ASM" \
   --node-count 1 \
   --initial-data-storage-size-in-gb 256 \
   --display-name "TARGET19" \
   --hostname "TARGET19" \
   --db-version ""

Note that I am specifying the version as This way OCI will automatically give me a system with the latest Release Update. It is my clear recommendation that you always upgrade to the latest Release Update. I will enable login as oracle by putting my key into the authorized_keys file:

ssh -i my_key_file opc@xxx.xxx.xxx.xxx "sudo -i rm /home/oracle/.ssh/authorized_keys ; sudo -i cp /home/opc/.ssh/authorized_keys /home/oracle/.ssh/authorized_keys ; sudo -i chown oracle:oinstall /home/oracle/.ssh/authorized_keys"

Once I have done that, I will log on to the new release CDB and drop the pre-created PDB, named SALES. We don’t need that as part of the upgrade will be cloning the PDB from the source system:

sql / as sysdba


Now I have a new release VM DB System that I can use in the following blog posts. Stay tuned!

Other posts in this series

One thought on “Upgrading in the cloud – VM DB Systems

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s