- a single schema based service
- virtual machine with a fully configured and running Oracle Database Instance
- Exadata Service with all the database features.
You can look into details here: https://cloud.oracle.com/en_US/database
We will talk about Database as a Service and not about Schema or Exadata here. So my final goal is to create database for GoldenGate replication which is separate service. Ok let’s start.
1. Login to My Services https://cloud.oracle.com/en_US/sign-in
2. My Service pages show already created services. I have 1 Compute, 1 Database and 1 GoldenGate insdtances.
3. Click on menu for Database Service and choose Open Service Console. You will get directly to Oracle DBaaS cloud service console.
4. Click Create Service button and then choose:
- Required type of subscription (Oracle Database Cloud Service or Oracle Database Cloud Service — Virtual Image). I have only one available type.
- Choose Oracle Database version (11.2 or 12.1)
- Choose Database edition
5. Fill database parameters. So there two things to mention: backup storage container and SSH Public Key.
Backup Storage Containers is used by database to create backup. Also it will be used by GoldenGate to backup its configuration. It is possible to create this container automatically (using this wizard) but also possible to use REST API or Java API (see Oracle Storage Cloud Service: Creating Containers Using the REST API). I will do creating here for simplicity. You should use the following name for Backup Storage: Storage-identityDomain/ContainerName.
SSH Public key is used to authenticate you to cloud. You have both private and public cloud for your account. You gives public key to server. It will use it to authenticate you by private key which is not shared. You can use this page to generate public and private keys automatically for you. Another option is to use you local ssh to generate key and copy public key to Oracle Cloud
6. Last page shows summary. Check it and click Create button. You will be returned to DBaaS Service home page where you see database creation progress
7. When database creation is finished you will see new database on the home page. Click on
8. You will see page describing your database instance. You should see IP assigned to your VM. We will use this ip to connect to the database. Write it down.
9. We can use this page to allow connections to different host ports. Click on menu and choose Access Rules. By defaults only ssh is allowed from public internet and connection to port 1521 is allowed for localhost. This is test instance — so let’s enable access to 1521 (listener), 1158 (dbconsole), 5500 (dbexpress), 80 (DBaaS Monitor)
10. Finally we should have the following access rules enabled
11. Another required step is to connect to ssh. You downloaded public and private keys on the step 5. You can use private key in Unix ssh. However if you use putty then you should convert private key to putty format. You can rich this goal by puttygen utility. You load privatekey file from sshbundle.zip and save it using Save private key,
12. Load this key to Putty/Kitty, enter ip address for you server and login as opc or oracle user. SSH will not ask for password because authentication is done using key. Your database is ready to use.
13. Let’s return to DBaaS Service Console. You can access tools for database managing from this page.
14. First tool is Database EM Express (https://hostname:5500/em) which is standard Oracle EM Express. So nothing new here. You can login using «system» database user and password entered during database creation
15. Second tool is DBaaS Monitor (https://hostname/dbaas_monitor). Which is absolutely new tool for database in cloud. You can use username «dbaas_monitor» and password entered during database creation.
16. Let’s click on the Green Checkmark (Listener Status) to see all registered services.
17. Let’s use demos service to create connection in SQL Developer
18. We created connection and can run standard queries
19. If you don’t want to open listener port to Whole World then you can use ssh to tunnel traffic to port localhost:1521 port on the database side. Let’s do this using Putty.
20. Load your SSH connection and go to SSH->Tunnels. Add your tunnel like showed on the picture then save and reconnect.
21. Create connection using entered port. This connection will be tunneled through SSH (so it will be encrypted and data will not be altered while travelling):
Oracle Database as a Service is just Oracle Database deployed in the Oracle Cloud. It has some automation which makes it easy to support it. Any user can create database and connect in 5 minutes. No SSH and iptables commands. No storage management. No OS installation. It is very good for quick start.