Feb 28, 2017 4:13:55 PM by Ajith Narayanan
by Ajith Narayanan
This article explains the step-by-step approach for creating a database service using Oracle Cloud DBaaS, during which we will create the needed Storage Containers that can be used by the Database Cloud Services for backup purpose. We will also learn how to create the SSH keys used during the database creation steps. After the database, has been created, you will be able connect into the database image using the SSH private key and create a new user in the database instance.
For any business applications, database becomes the core part of the tech stack. In any product development phase the database provisioning (creation, refreshing, cloning & configuration) is a time-consuming task. DBaaS is gaining more traction these days because it enables businesses to deploy new databases quickly, securely, and cheaply.
Step 1: Create a new SSH public and private key
Assumption is that you already have registered for an Oracle Cloud account and have the login information needed to connect to your Oracle Public Cloud domain. Now, we will be creating new SSH public and private keys.
ssh-keygen -b 2048 -t rsa -f MyKey
ubuntu@ajithn:~$ ssh-keygen -b 2048 -t rsa -f MyKey
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in MyKey.
Your public key has been saved in MyKey.pub.
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
| E. *+|
| . ....++|
| . S .. +|
| . . . . |
| ... o . . |
| .o = . |
| .. .o . |
Step 2: Login to your Oracle Cloud account
NOTE: The User Name, Identity Domain and Password values would have been sent via email, after you registered for Oracle Cloud.
Step 3: Create Storage Containers
For Database Cloud Service the use of a storage container for backups is required. Before running through the Create Instance wizard you will need to first create storage containers to be used by the Cloud Services. You can perform this step using REST API’s also (Not explained in this article).
Step 4: Create Database Cloud Service
On the left panel, select Oracle Database Cloud Service as shown in the below screenshot.
Step 5: Identify the Instance Configuration
This next step is very important when provisioning or creating a service instance. In this step, you will shape the service and provide an identity INSTANCE CONFIGURATION:
When providing a name, please note you might have another service instance already created in your account, so the name must be unique.
DB Name(SID) = ORCL
PDB Name = AlphaDBCS
Click on the Edit button to browse for the MyKey.pub file
Administration Password = <your choice>
Backup Destination = Both Cloud Storage and Block Storage
Cloud Storage Container = Storage-<your domain Id>/AlphaDBCS_SC
Cloud Storage User Name = <your user name>
Cloud Storage Password = < your password>
Notes about the information entered:
Step 6: Connect to the newly created database
ssh -i ./lab/MyKey oracle@<IP of DBCS>
If you are on Windows, you may use the PuTTY utility to connect to the VM.
create user alpha identified by oracle;
grant connect,dba to alpha;
In this article, you learnt how to provision a cloud database using Oracle Cloud DBaaS option. Oracle Cloud DBaaS will provide us the capability of quick provisioning of databases with enhanced security and centralized management of all the databases of your organization.
Oracle ACE Associate
Oracle RAC SIG Board Member
Author of "Oracle SQL Developer"
Written by Ajith Narayanan
Ajith Narayanan is currently the Chief Technology Officer (CTO) of InfraStack-Labs, Bangalore, India having a total 14 Years of work experience as Oracle DBA, Oracle Apps DBA, Oracle ERP Platform Architect & OpenStack Cloud Architect with an expertise in Infrastructure Architecture, capacity planning & Performance tuning of mid to large Oracle & OpenStack Cloud environments.