Geo-distributed Oracle Database, a.k.a Oracle Database Sharding, enables globally distributed, linearly scalable, converged Oracle databases for hyper-scale applications that have low response time, high availability and data sovereignty requirements.

Hi There! I am Bharath Ramaprasad, a principal software engineer with the Oracle Database Sharding team, and welcome to a quick walkthrough article on how to deploy Geo-Distributed Oracle Database a.k.a Oracle Sharded database from OCI Marketplace, on Oracle Cloud Infrastructure.

I promise you that by the end of this article, you will have learned how to deploy a simple Oracle Database Sharding deployment setup like the one shown below. You can find more deployment architecture related information here.

A sample Oracle Database Sharding deployment architecture
Sample Oracle Database Sharding Deployment Architecture

If you don’t already have access to Oracle cloud (OCI) account, sign up for a free Oracle cloud trial account. Otherwise, just sign into your OCI console.

So, without further ado, let’s get started with it.

First up, I am going to click on the left hamburger navigation menu on the OCI console and scroll down to the solution and platform section. Here I am going to click on the Marketplace menu item.

Doing so will bring up the OCI marketplace home screen, and as you can see, Oracle Database Sharding is listed right at the top in the featured apps section, which makes it really easy and convenient to get to. Note: In case you are unable to find the Oracle Database Sharding app for some reason, just search for it in the marketplace search bar.

Oracle Database Sharding on the Featured Apps section of OCI Marketplace
Searching for Oracle Database Sharding on OCI Marketplace

Next, I am going to click on Oracle Database Sharding tile, to bring up the product listing page.

Oracle Database Sharding product page on OCI marketplace

The Oracle Database Sharding product listing page, describes the following information -

On the left hand side you have :

  • An overview of Oracle database sharding and a pointer to the product home page.
  • Marketplace user guide link — So if you need any help or clarification on how to deploy or manage Oracle database sharding on OCI, the sharding marketplace user guide is your best bet.
Oracle Database Sharding Product Listing Overview and Version Details

On the right hand side you have :

  • Support information.
  • Version Details including, features available in the current version.
  • System Requirements — which are essentially highlighting the fact that, since sharding employs automatic and uniform distribution of sharded database resources across Availability Domains (ADs) in the current region, as well as across Fault domains in each AD, you as the user should make sure that you have enough number of database and compute service instances in your tenancy, for the shape which you plan to choose in the upcoming Oracle Database Sharding configuration screen.

Moving on, let us take a look at the pricing of Oracle Database Sharding and guess what ? Oracle Database Sharding software is absolutely free ! and you, as the user, only pay for the infrastructure provisioned by Oracle Database Sharding namely, the OCI database instances, compute instances and the storage. And that is it for pricing ! Pretty Cool huh ?

With that, let us choose the default recommended version, which is 1.0 in this case and choose a compartment in which you want to deploy Oracle Database Sharding in your tenancy.

Launch Stack

Once you have done that, click on Launch stack.

This brings us to the Oracle database sharding create stack screen. Here, you can optionally add a name as well as a description for the Oracle Database Sharding Stack.

Oracle Database Sharding Create Stack Screen — Part 1
Oracle Database Sharding Create Stack Screen — Part 2

You can skip the rest and leave it at the default values.

Now, I am going to Click next, which brings us to the Oracle Database Sharding Configuration screen.

This screen has the following configuration sections :

1. General Configuration.

2. Shard Configuration.

3. Shard Catalog configuration.

4. Replication configuration.

5. Shard Director configuration.

6. Network settings.

7. Ssh Configuration.

If you want to give Oracle Database Sharding a quick try for a POC, OR are evaluating Oracle Database Sharding for your application OR if you just want to kick the tires with a simple Oracle database sharding setup, all you need to do is, configure three simple inputs.

First, Sharded Database Name — Which is a unique name for the entire sharded database, and serves as a prefix for all sharded database resource display names. Also, the specified sharded database name must be unique within the regional subnet… Now, I am going to name this sharded database as “sdb”.

Sharded Database Name

Second, Network Settings — Here we highly recommend to select the create new network option, so that a new regional network is provisioned, on top of which Oracle Database Sharding resources will be deployed. This option mandatorily needs to be checked for your very first Oracle sharded database deployment in a VCN for any region, so that the essential networking fabric required for sharding in the current VCN and region is setup.

Third, SSH public key — Upload the ssh public key from your laptop or local machine where you have previously generated an RSA key pair, so that you are able to access the sharded database resource instances, once Oracle Database Sharding is deployed.

You can skip the rest of the configuration and leave it at its default values.

That is pretty much the configuration you will need to input, to deploy a simple oracle database sharding on OCI.

Then all you would need to do is click next and in the following review screen, you can click create, which will create all the Oracle database sharding resources and deploys the Oracle Sharded Database.

Isn’t that sweet and simple ?

Now, let me step back to the sharding configuration screen and go over the rest of the configuration sections.

Oracle Database Sharding general configuration section
  • In the General configuration section, the next input after Sharded database name is the sharding method, which is by default system-managed sharding, wherein the user does not need to specify any mapping of data to shards and the data is automatically distributed across shards using partitioning by consistent hash. System managed sharding, ensures that the data is evenly and randomly distributed across all the shards, thereby eliminating data hot spots and provides uniform performance across shards.
  • Moving on, the database software edition is Enterprise Extreme performance by default.
  • Storage management software is LVM.
  • License Type is License Included by default. You can choose to bring your own license as well.
  • Database version is 19c by default.

And that is it for the General configuration section.

Next, let us take a look at the Shard configuration section.

Based on your application needs

  • You can select the appropriate Shard Shape.
  • Number of primary shards.
  • As well as the database storage per shard.

Moving on, let us take a look at the Shard Catalog Configuration section

Based on your application needs

  • You can select the appropriate Shard catalog shape.
  • As well as the Shard catalog database storage.
  • The number of primary shard catalogs is restricted to 1, as there can be only one primary catalog for the entire sharded database.

Next let us take a look at the replication configuration section.

Replication configuration section

The concept of replication factor is similar to a replica set which basically determines how many copies of user data is maintained by Oracle Sharded Database.

The default replication configuration is 1, which implies that it is a primary only setup. So that means only primary shards and primary catalog are going to be deployed.

You could also bump this up to 2, which implies that each primary shard and catalog will have a corresponding standby. Setting, replication factor to 2 is recommended for production deployments for HA and DR purposes.

Moving on, let us take a look at the Shard Director Configuration section.

Here, based on your application needs,

  • You can select the appropriate shard director compute shape
  • As well as the number of shard directors.

Note, Shard directors, shards and catalogs will be uniformly distributed across all availability domains in the current region and across fault domains within each availability domain.

Finally, in the network settings configuration section, you can choose to use an existing network by unchecking create new network option, provided you have already created a sharded database from OCI marketplace in the past. If not please leave this option checked to create a new network.

After configuring the network settings, all you would need to do is click next and in the following review screen, you can click create, which will deploy Oracle Sharded Database on OCI.

Once you click create, it will bring up the Oracle Resource Manager (ORM) job screen which shows the progress of the Sharded database deployment.

Oracle Database Sharding deployment job in progress

The status of the job moves from Accepted to In Progress and finally after a few minutes (~ 15 mins), it will move to succeeded when Oracle Database Sharding deployment is complete and the ORM apply job shows that it has succeeded.

Oracle Database Sharding successful deployment job status

Now, let us take a look at the resources menu on the left in the ORM job screen.

  • Logs view show us the details of the deployment and prints out a successfully deployed message at the very end.
  • Variables view show us the configuration that we just entered in the configuration screen. So user can always refer back to the variables menu and quickly verify if the inputs match what is going to be deployed or was deployed in the past.
  • Moving on, Outputs view, gives the user any information required for using or accessing the deployed sharded database components.
Outputs view after Oracle Database Sharding has been successfully deployed

As you can see, the output view provides the connection string which you can just copy and stick it into your application database access layer configuration, so that you can straight away start accessing Oracle Sharded Database that was just deployed, like any other database from your application.

Also as you can see that the IPs are listed here, so that, the user can access different components of Sharded database. As you can probably recall, from the Oracle Database sharding configuration screen, that we covered earlier, we had configured the Oracle sharded database to have 2 primary shards and 1 Shard Director and as you can notice, there are two shard IPs corresponding to the two shard instances, and one shard director IP corresponding to the Shard director instance that was deployed based on the user configuration.

  • Last but not the least, we have the associated resources view, wherein all the Oracle database sharding resources that were created as part of the deployment are listed. The user can just click on any of the shard links or catalog link to access its OCI database system screen OR shard director link to access its OCI compute screen.
Oracle Database Sharding resources deployed on OCI

So, just to summarize, it is utterly simple, intuitive and easy to deploy Oracle Database Sharding on OCI from OCI marketplace and it takes just a few clicks to get a production scale Oracle Sharded database deployment up and running, all within a matter of few minutes.

If you don’t have an Oracle Cloud account yet, we highly encourage you to sign up for a free trial of Oracle cloud and take Oracle Database sharding on OCI marketplace for a spin.

If you already have an Oracle cloud account, you can start using Oracle Database Sharding at the following link.

That brings us to the end of this article, on how to deploy Oracle Database Sharding from OCI Marketplace on Oracle Cloud Infrastructure.

Follow my medium account and Oracle’s dev medium account to get notified about more exciting content on Geo-Distributed Oracle Database Sharding.

Thanks for reading !