Monday, May 9, 2016

Setting up an Oracle Cloud Database Service

As cloud databases are all the rage these days, lets briefly go through how to set up an Oracle Cloud Database Service. The only assumption is that you already have a subscription to the Oracle Cloud.

Overview of Oracle Cloud structures

When you purchase a subscription to the Oracle Cloud, you will be given an Identity Domain and a account with identity domain administrator privileges. The Identity Domain will be located in one of Oracle's data centers and contains the cloud service types you have subscribed too.

Sign into - https://cloud.oracle.com/home
Choose the Data Center where you account exists.


Enter the identity domain you wish to connect to.


Enter your username and password when requested. On the "Oracle Could My Services" page, click on the "Navigation Menu" drop down and choose Oracle Database Cloud Service.


From the Oracle Database Cloud Services page, click on "Create Service"


We now start using the Database Cloud Service Instance wizard to create a database.  

Subscription Type -

In the Service Level section we have a choice of either Oracle Database Cloud Service or Oracle Database Cloud Service - Virtual Image. Each option gives you a virtual machine and the database software installed. The main difference being the 'Cloud Service' will create the database instance for you using configuration options provided in this wizard. The 'Vitrual Image' option allows you to manually create the database instance.

For the Billing Frequency we will choose hourly.  

Release -

Here we choose the database release version for this Service instance. Lets choose 12c installed on Oracle Linux 6.6  

Edition -

We can now select the database edition we would like for the database. We have two familar options Standard and Enterprise. There are also 2 other options here, High Performance and Extreme Performance.

High Performance give us Multitenant, Partitioning, Real Application Testing, Advanced Compression, Advanced Security, Label Security, Database Vault, OLAP, Advanced Analytics, Spatial and Graph, Diagnostics Pack, Tuning Pack, Database Lifecycle Management Pack, Data Masking & Subsetting Pack and Cloud Management Pack.

Extreme Performance gives us In-Memory Database, RAC (Real Application Clusters), Active Data Guard, Multitenant, Partitioning, Real Application Testing, Advanced Compression, Advanced Security, Label Security, Database Vault, OLAP, Advanced Analytics, Spatial and Graph, Diagnostics Pack, Tuning Pack, Database Lifecycle Management Pack, Data Masking & Subsetting Pack and Cloud Management Pack. For this example we will choose Enterprise addition.  

Details -

Service Configuration

  • Service name - This will be the name of our cloud database service, it will also end up being the hostname for our VM that will be created for the database. 

  • Description - Provides a description for the service 

  • Shape - Specifies the CPU and memory for the VM 

  • Timezone - VM timezone 

  • SSH Key - This is required so we can ssh to the VM. To create this run the following from your linux prompt. Once the key is generated copy and paste the id_rsa.pub contents to this field. 

$ ssh-keygen -t rsa -N "" -b "2048" -C "OracleCloud" -f /home/username/id_rsa

Database Configuration

  • Usable Database Storage - Adjust this value to suit your needs 

  • Administrative passwords - Set the default password for database admin accounts (sys/system) 

  • DB Name (SID) - The name of your database 

  • PDB Name - The name of the default PDB that is created for you. 

  • Character Set - Specify the database character set need.
  • National Character Set - Select a national character set.

Recovery Configuration

For the purpose of this demonstration we will set this to none.


 


Confirmation -
Review and click create.

Once the service is created the Oracle Database Cloud Service services page will show an overview of the newly created service. We can click on the service name we see more detail about the service / instance we created.


The virtual machine used to host the database instance is created as a compute instance. If we use the 'Navigation menu' and switch to the 'Compute Cloud Service' page, we can see the newly created instance (VM). When we view the details we can also see the public ip address for the VM.




We can use this to connect to the VM via ssh using the opc user


$ ssh opc@129.144.1.1
[opc@vmserver ~]$ hostname vmserver
[opc@vmserver ~]$ ps -ef|grep smon oracle   13846     1  0 13:46 ?        00:00:00 ora_smon_vmdb01
[opc@vmserver ~]$ sqlplus system@vmdb01
SQL> select instance_name, host_name from v$instance;
INSTANCE_NAME     HOST_NAME ---------------- ---------- vmdb01      vmserver



******************************************
keywords:
******************************************
rdbms version:
*****************************************

No comments: