DBaaS

Your Oracle Cloud Products in My Oracle Support – Now you are Administrator

Three weeks ago I have ordered the Oracle Database Backup Service. The registration via shop.oracle.com was easy, minutes later after I have entered my credit card details and pressed the submit button, I got the login information via email and Oracle has given me a new CSI number.

Some time later I took a look in My Oracle Support, my new CSI was added but in state PENDING.

cloud_pending01

Now I clicked on the button to Request Access. This message cames up, this is the normal procedure when you buy a product at at Oracle and when you get a new CSI. I clicked on Accept Responsability.

cloud_pending02

Afterwards the button below has changed to Request Access.

cloud_pending03

And now I am administrator of the CSI, the status is now Approved.

cloud_pending04

After a fresh login, the main page has changed in my My Oracle Support dashboard, in the top right corner now I can change to another dashboard to open service requests for cloud products.

cloud_pending05

And this is the new Oracle Cloud Support dashboard

cloud_pending06

Oracle Database Backup Service Configuration – java.net.UnknownHostException

In all the trials in the Oracle cloud in the past, I used the same syntax below to configure the Oracle Database Backup Service on my local servers. Last week I have decided to order the Service via shop.oracle.com. Now I am an official owner of an Oracle cloud account with a CSI :-). But back to my problem, after my account was created I got the mail with the configuration details. So far so good. Then I tried to configure the OPC package as always:

The installer didn’t found the hostname where my backup location should be located. I tried to verify if the REST endpoint URL was available, it was ok:

storage_test_api

The output from the installer file without any parameter shows me no additional information:

In the extracted opc_installer.jar file is a Java class file called OpcConfig.class. I used JD-GUI, a small Java decompiler, to take a look insight the Java class file. And at line 90 I found a new parameter which was not listed above – the -host.

opc_class

So why not try to install opc_installer.jar again and add this -host parameter?

Et voilà – the Oracle Database Backup Service is now configured and ready to use. Time to start RMAN 🙂

From the Command Line into the to the Oracle Cloud – the ORACLE-DBCS-CLI Utility

The Oracle ORACLE-DBCS-CLI utility is a command-line interface tool to manage the lifecycle of your Database as as Service instances in cloud.oracle.com. You can create and delete instances, verify and apply patches, scale your instances up and down and many more. The advantage is that you can work with configuration files. And I like to work with such files, if I need 10 instances with the same shape, I have only to search and replace the instance name – fire!

The ORACLE-DBCS-CLI utility is available for Unix platforms at the moment. I have installed ORACLE-DBCS-CLI on a Oracle Linux 6.5, JDK version 1.7 or higher is required.

Download and Documents

The software can be downloaded here: http://www.oracle.com/technetwork/database/database-cloud/public/downloads/index.html

The  ORACLE-DBCS-CLI documentation starts here: https://docs.oracle.com/cloud/latest/dbcs_dbaas/CSDBI/GUID-E9F2219D-EBDC-44B3-BE22-BEED6C2BAB74.htm#CSDBI-GUID-E9F2219D-EBDC-44B3-BE22-BEED6C2BAB74

Installation

After download the software has to be extracted on target server. My install directory is /u00/app/oracle/tools/dbcs-cli/ – take care about the release number.

What you get:

The dboplan.dat.tmpl is a template file which contains all required variables for working with cloud.oracle.com. For some actions you only need a subset of them.

Get Domain Information

To gather information about your created instances, you need this four parameters.

sm_url Endpoint URL – Attention: for EMEA it’s https://dbcs.emea.oraclecloud.com/paas/service/dbcs/api/v1.1/instances and not https://dbaas.oraclecloud.com/paas/service/dbcs/api/v1.1/instances as written in the documentation
user_name Your cloud.oracle.com user name
password Your cloud.oracle.com password
identity domain Your identity domain – e.g. trivadis4703

 

For this action, I have created a small configuration file which contains these four lines:

Now I can execute ORACLE-DBCS-CLI with the configuration file, all my instances in the specified domain are listed:

Get Patch Information

For this action you need your cloud SSH key and the host, IP does also work if the host name is not resolved by DNS, /etc/hosts etc.

Creating a new Instance

It is very easy to create a new instance, but here you need the full content from the configuration template. I have created my own template called cloud10.dat to create an instance with shape OC3 and no backup, a new ssh key will be created and uploaded by the ORACLE-DBCS-CLI. I have specified these parameters, all other I let them on default values:

sm_url Endpoint URL – Attention: for EMEA it’s https://dbcs.emea.oraclecloud.com/paas/service/dbcs/api/v1.1/instances and not https://dbaas.oraclecloud.com/paas/service/dbcs/api/v1.1/instances as written in the documentation
user_name Your cloud.oracle.com user name
password Your cloud.oracle.com password
identity domain Your identity domain – e.g. trivadis4703
vm_name Your new instance name – e.g. CLOUD10
vm_shape Your shape – e.g. OC3
db_sid Your SID – e.g. cloud10
db_dbname Your DB name – e.g. cloud10
db_passwd Your SYS password – it have to contain a numer, a # or a _ character
db_bkup_disk Backup = No

 

Executing ORACLE-DBCS-CLI with my Configuration File cloud04.dat

Unfortunately there is no logfile available, but If you have set a wrong shape or a too simple password, you will get an error.

That’s all folks – in cloud.oracle.com you can see now that your instance will be created immediately.

cloud04

My Template cloud04.dat

Summary

The ORACLE-DBCS-CLI Utility is a great tool to manage the lifecycle of your Oracle cloud instances in th CLI. With a small set of templates and configuration files, you are able to manage your cloud instances without any browser.

cloud.oracle.com – Create a Storage Container for a Backup in the Cloud

Why to use the Oracle Backup  Cloud storage?

During the instance creation process – the full deployed instance, not for the virtual machine – you can select if you want to store your database local or in the cloud – or both. The benefit to store a instance backup by RMAN in the cloud? Storage redundancy, easy access, full RMAN integration and with a service price of $33 / TB / Month it’s a real storage option.

Here is the step where you can select the backup storage option.

cloud_storage_1

Information Gathering

Before you can use this storage, you have to configure a storage container first. This can be done via REST command for example by a tool like curl. In this example I used curl for Windows. To create a storage container you have to know an authentification token (X-Auth-Token) and the URL (X-Storage-Url)  where the storage is presented. The storage name is composed by the word Storage and your Identity Domain name. For example my domain is called chtrivadis4703, the name of the storage user is Storage-chtrivadis4703.

The GET command:

There are some more lines with connection output text, I have removed then so it’s better readable:

Create a Storage Container

Now we know the X-Auth-Token and the X-Storage-Url, so we can create a new storage container called Backup.

For the verification I used Cloud Berry Explorer for OpenStack Storage (http://www.cloudberrylab.com/free-openstack-storage-explorer.aspx) – the container Backup was created successfully.

cloud_storage_2

Configure the Instance to use the Storage

Fill in the name of the cloud created storage container here and finalize the instance creation process.

cloud_storage_3

If the credentials or the storage container name is wrong, you will get an error message:

cloud_storage_4

Enjoy the new Cloud Storage

The new instance will be automatically configured to use this cloud storage as backup destination. But this container is not only for a backup of the cloud instances, you can use the Oracle Database Cloud Backup Module to backup your on-premise instances into the Oracle cloud. But this will be content in one of my next posts…

Links

Lost Disk after DBaaS Restart via Cloud Service Console

I have created a DBaaS instance three weeks ago, and now it was time to attach new storage in the Oracle Compute Cloud Service  to have additional disk space for some Trivadis tools. But after a reboot with a mouse-click in the DBaaS Cloud Service Console, the disk was lost and had to be re-attached.

The procedure to add additional storage is documented in this Oracle tutorial: http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/dbaas/OU/IntroDBaaS/AddStorageDBaaSInstance/AddStorageDBaaSInstance.html

Creating additional  Storage in the Oracle Compute Cloud Service

In the Create Storage Volume menu, I have created a new storage volume of 10GB and attached it to my running DBaaS instance called TrivadisExPerf.

attach01

OS Verfication

After some minutes waiting, I logged in on the database server to verify the operation. The disk was attached as device xvdg.

Creating a Filesystem

Then I created a new partition with fdisk, formatted the partion as Ext4 and mounted it as /u05. At this point, I did not add something to /etc/fstab. But this had no impact for later actions.

Restart via DBaaS Cloud Service Console

The DBaaS restart was executed by the Service Console. In the background the DBaaS service was restarted automatically. The process is visible in the console and you can see the progress. I don’t know why Oracle requires more than 10 minutes for a simple restart, in some cases more than 20 minutes…

attach02

The Storage is lost…

After the restart I logged in again in the terminal. And what do I see? The storage was no more attached at the instance. There was no /dev/xdg or /dev/xdg1 visible.

After re-attaching the storage to the instance in the Oracle Compute Cloud Storage menu, the storage was back again. And I tried another way to restart a server…

attach03

Restart in the Terminal

First I checked again if the storage was attached. The device /dev/xdg was here.

Then I restarted the server with the shutdown command.

And after the restart, the storage was still here. The device /dev/xdg was available. And it didn’t require 10 mins, after 2 mins the server was back again and ready to log-in.

Summary

If you want to attach additional storage via Oracle Compute Cloud Service, it’s better at the moment NOT to restart your DBasS service instance via the console. Just use the good old shutdown command. I am sure, this can not be a feature, this is must be a bug.

Additional Information

When you attach a disk with the Scale Up function, then it works properly.

attach03

Now you have two ways how to attach additonal storage which are working. It’s like in the movie Indiana Jones and the Last Crusade:

You must choose. But choose wisely…