Back in late June of 2015, Larry Ellison launched several public cloud services and one of those services was the public DBaaS. Today, I had the opportunity to try out this new service. This blog post will examine how to create it and how to connect it with sqlcli. As with any cloud service, it all happens in the background, saving you from doing tedious configuration steps to start using your service.
In my case, it took about 30 mins from when I clicked on create service to start using my database.
So the first thing that you have to do, obviously, is access the Oracle Cloud My Services application. If you do not currently have access, speak with your sales rep or cloud administrator, but remember that this application is not free. Once you have access, click on the Oracle Database Cloud Service link and the following page will come up. Click on “Create Service” :
Once you have done that, we need to choose the type of service we will solicit and the billing frequency. As I have talked about in previous posts, it all depends on your business needs and abilities. The difference here between choosing a “Cloud Service” and a “Cloud Service – Virtual Image” is that in the first option, the database and the database instance are created for you, whereas in the “Virtual Image“, you will need to create it yourself, so choose carefully. One of the good things that comes with the first option is that the cloud patching option comes with it, but in the “Virtual Image“, you have to do this yourself.
As of the writing of this post, Oracle offers two database versions – 18.104.22.168 and 22.214.171.124. I chose the latter.
In the Edition section, we get to choose the type of service we will get when choosing the Cloud Software Edition. Unlike the previous one, here we will choose the bells and whistles that you will be licensed to use in this database. I won’t include the differences between the two here, but you can view them in cloud.oracle.com in the PaaS section, under Database. In my case, I just chose the regular Enterprise Edition :
In the details section, we can set the characteristics of the database service. It is important to select the “Compute Shape” correctly as this is critical to your usage billing. It is also good to know that one OCPU (Oracle CPU) is equivalent to a 3.0 GHz 2012 Intel Xeon with HyperThreading Enabled. Also you will have to add a Public SSH key to access your compute node. You can learn how here: how to create one. This is where you will also set the usable storage, your system or administrator password for the database, the name of the SID, the version (in this case, you are using version 126.96.36.199), the name of the PDB. Last, but not least, you will choose your backup destination. In my case, I just chose a local, but you can choose the Oracle Database Backup Service if you have one.
Last, but not least, you will get a confirmation of the service you are about to create. I didn’t copy this particular screenshot when I created it, but here is a similar one, so you get the gist.
Once you click on create, you can select the service and see the details of the creation process, as well as some others, like the Public IP, Port, etc.
Once the DB and VM are allocated, you need to go back to the Oracle Cloud My Services application and go to the Oracle Compute Cloud Service console. This is to enable the security rule that will allow us to connect to port 1521 for this DB.
In my case, I enabled the “dbaas/test-orcl/db/ora_p2_dblistener” rule.
In this particular case – and I want to emphasize this – I am not concerned with security, so I also enabled the Security List for Inbound/Outbound Policy traffic.
Once I had done this, I am now ready to connect to my DB via sqlcli like I would connect to any other DB:
Renes-iMac:bin Rene$ ./sql system@***.***.****.****:1521:ORCL SQLcl: Release 188.8.131.52.177.0246 RC on Fri Aug 21 11:41:42 2015 Copyright (c) 1982, 2015, Oracle. All rights reserved. Password? (**********?) ************ Connected to: Oracle Database 12c Enterprise Edition Release 184.108.40.206.0 - 64bit Production With the Oracle Label Security option SQL> select name from v$database; NAME --------- ORCL SQL> set lines 200 pages 9999 SQL> COLUMN PDB_NAME FORMAT A15 SQL> SQL> SELECT PDB_ID, PDB_NAME, STATUS FROM CDB_PDBS ORDER BY PDB_ID; PDB_ID PDB_NAME STATUS ---------- --------------- --------- 2 PDB$SEED NORMAL 3 PDB1 NORMAL SQL> alter session set container=PDB1; Session altered.
As you can see, it is quite easy to request a database service and start using it. You will have to start building your case to use the public cloud, but once you do, you can see that using your database is no different from an on-premise to a cloud service.
Note– This was originally published on rene-ace.com