This post covers How To Create Database on Oracle’s Gen2 Cloud (OCI).
https://www.youtube.com/watch?v=PEm6yQdgzDQ
Database Deployment
We can deploy User-managed Database In Oracle Gen2 Cloud (OCI) either on Virtual machine (VM), Bare Metal (BM) or on Exadata CS, In this post, I have covered the steps for VM-DB but concepts remain more or less same for BM & Exadata CS too.
Note: To know more about Oracle Cloud Database Options (VMDB, BMDB, ExaCS, ExaCS & Autonomous (ADW, ATP), Check here
So Let’s look at Deployment on Cloud so two main Deployment Model on Public Subnet. In order to understand this, there is VCN (this is network) & Subnet which is VCN divided into smaller parts.
- Database Deployed On Private Subnet
Database Host on a private subnet listen on a Private IP, We recommend the Deploying database on a private subnet & you will be able to access the database within the Virtual Cloud Network. You can also access it from the on-premise network using DRG (Dynamic Routing Gateway).
- Database Deployed On Public Subnet
A database running on Public Subnet will get both Private IP & Public IP, you will be able to access it via Public IP & Internet Gateway is required for connectivity.
We only recommend creating a database on the public subnet only when you are using this database for testing purposes or if you want to expose your database to the internet.
Note: To know more about VCN, Subnet, Firewall (Security List), IGW, DRG & how to create it, check here
How to Create Database on Oracle Cloud
1) Register & Log in to the Oracle Cloud account, cloud.oracle.com
Note: First, you should have an Account at Oracle Cloud and if you don’t have one, then you can register FREE using my step-by-step video & guide that I covered in episode 30. You can get it by visiting k21academy.com/30 or k21academy.com/cloud01.
2) Configure Network: Next, as we want to access the database over the internet, so we’ll create it in the Public Subnet and assign Public IP in addition to configuring Internet Gateway on VCN.
Note: If you are not familiar with VCN, Subnet or Internet Gateway then learn about them in one of my previous episodes on networking at https://k21academy.com/1z093215. Trust me, it is easy and should not take more than 15-20 minutes. If you hit an issue, leave a comment and either I or someone from my team will help you.
3) Generate SSH Keys: Once you are done with creating VCN & Public Subnet, then you also need one more thing i.e. SSH Keys Pair that you generate using Puttygen, so that you can access the Autonomous Linux using SSH private key.
Note: If you are new to SSH Keys or don’t have one, then create them using the step-by-step guide that we use in our Oracle Cloud Training. Check at https://k21academy.com/oci51.
4) Sign In: Once you have all the things sorted, sign in to Oracle Cloud Account, and you will land on the OCI Console.
5) Create Database Instance: Click on the hamburger menu on the top left side, select Bare metal, VM & Exadata & then Click on Create DB System.
6) Enter the name of DB System, Then choose Availability Domain inside which you want to create the Instance, If you want higher CPU & higher memory, then click on “Change Shape“.
Note: Want to know more about Region & Availability Domain in OCI, then click HERE.
7) Under “Add Public SSH key”, Copy the content of SSH Public key.
8) Select the VCN & Public Subnet, then click on Next
9) Enter the DB Name, & select the Database version. Create the SYS admin password (make sure you remember the password)
Note: The password must be nine to thirty characters and contain at least two uppercase, two lowercase, two numeric, and two special characters. The special characters must be _, #, or –
10) When the database creation is complete, the status changes from Provisioning to Available
Note: It will take 50-60 minutes to make your instance up & Running
How To Connect
1) In order to connect to Database Host deployed in Oracle Gen2 Cloud (OCI), you need to open port 22, which is SSH port and you will be able to connect to your database Instance and port 1521 which is database port, so that your database will be able to talk to application or other services over internet.
Note: When you create VCN using default options various resources are by default created by Oracle (Security List, IGW, Route Table).
To know how to create a security list and open port in Oracle Gen2 Cloud check here
2) To connect to the Instance you will need the Public IP of the Instance & the PuTTY Software.
Note: To know how to get the Public IP of the Database, check here
Enter the Public IP Address in the Hostname, then add the SSH Private key (That we created before) under SSH & then Auth. Click on “Open”
Related/Further Readings
- Oracle Cloud: Create VCN, Subnet, Firewall (Security List), IGW, DRG: Step By Step
- Oracle Cloud Database Options (VMDB, BMDB, ExaCS, ExaCS & Autonomous (ADW, ATP)
- How to Get Public IP of Database In Oracle Gen 2 Cloud (OCI)
- [Video] Oracle Autonomous Data Warehouse Cloud Service 18c Now on OCI
How Can I Learn More
We cover all this in detail in our DBA to Oracle Cloud DBA Training program. To Know, what to expect in our training, Register for our FREE Masterclass on “Upgrade From DBA To Oracle Cloud DBA Including Certification & Earn More In 2020″
Leave a Reply