X

Pat Shuff's Blog

  • PaaS |
    June 24, 2016

database option - Data Guard part 2

Normally the part two of the option pack has been a hands on tutorial or examples liberally lifted from Oracle by Example, OpenWorld hands on labs, or the GSE Demo environment. I even went to an internal repository site and the database product manager site and all of the tutorials were for an existing database or labs on a virtual machine. None of these were easy to replicate and all of them assumed a virtual machine with a pre installed instance. None of the examples were form 2015 or 2016. If anyone knows of a hands on tutorial that uses the public cloud as at least one half of the example, let me know. There is a really good DR to the Cloud whitepaper that talks about how to setup Data Guard to the cloud but it is more of a discussion than a hands on tutorial. I typically steal screen shots and scripts from demo.oracle.com but the examples that exist in the GSE demo pool use Enterprise Manager 10g, servers inside of Oracle running an early version of 11g, or require a very large virtual image download. The closest thing that I could find as a hands on tutorial is Oracle by Example - Creating a Physical Standby. For this blog we will go through this tutorial and follow along with the Oracle Public Cloud as much as possible.

Step One is to create an 11g database. We could do this on 12c but the tutorial uses 11g. If anyone wants to create a 12c tutorial, contact me and we can work on a workshop together. We might even be able to get it into the hands on labs at OpenWorld or Collaborate next year. Rather than going through all of the steps to create an 11g instance I suggest that you look at the May 4th blog entry - Database as a Service. Select 11g and High Performance Edition. We will call this database instance PRIM rather than ORCL. Your final creation screen should look like

We want to create a second database instance. We will call this one ORCL and select High Performance Edition and 11g. The name does not matter as long as it is different from the first one. I am actually cheating on the second one and using a database instance that I created weeks ago.

It is important to note while we are waiting on the database to finish that we can repeat this in Amazon but need to use EC2 and S3. We can also do this in Azure but in Azure Compute. We will need to provide a perpetual license along with Advanced Security and potentially Compression if we want to compress the change logs when we transmit them across the internet. It is also important to remember that there will be an outbound charge when going from one EC2 or Azure Compute instance to the other. If we assume that we have a 1 TB database and it changes 10% per day, we will ship 100 GB daily or being conservative and saying that we only get updates during the week and not the weekend we would expect 2 TB of outbound charges a month. Our cost for this EC2 service comes in at $320/month. If we use our calculations from our Database Options Blog post we see that the perpetual license amortized over 4 years is $2620/month. This brings the cost of the database and only Advanced Security to $2940. If we amortize this over 3 years the price jumps to $3,813/month. When we compare this to the Oracle High Performance Edition at $4K/month it is comparable but with High Performance Edition we also get eight other features like partitioning, compression, diagnostics, tuning, and others. Note in the calculator that the bulk of the processor cost is outbound data transfer. It would be cheaper to run this with un-metered compute services in the Oracle cloud at $75/month.

If we follow the instructions in DR to Oracle Cloud whitepaper we see that the steps are

  1. Subscribe to Oracle Database Cloud Service
  2. Create an Oracle instance
  3. Configure Network
  4. Encrypt Primary Database (Optional)
  5. Instantiate Data Guard Standby
  6. Perform Data Guard health check
  7. Enable Runtime Monitoring
  8. Enable Redo Transport Compression (Optional)

So far we have done steps one and two. When the database creation has finished we perform step 3 by going into the compute console and opening up port 1521 or the dblistener service. We do this by going to the compute service and looking for our database instance name. In our example we hover over the service and find the dblistener service for prs11gPRIM. We select update and enable the port. Given that these are demo accounts we really can't whitelist the ip addresses and can only open it up to the public internet or nothing. We do this for the primary and the standby database



Once we have this configured we need to look at the ip addresses for prs11gPRIM and prs11gHP. With these ip addresses we can ssh into the compute instances and create a directory for the standby log files. We can create these files with the /u02 partition with the data or the /u03 partition with the backups. I suggest that you put them in the /u04 partition with the archive and redo logs. Once we have created these directories we can follow along with the Oracle By Example Physical Data Guard example starting at step 3. The network configuration is shown on page 12 of DR to Oracle Cloud whitepaper. We can also follow along with this using prs11gPRIM as the primary and prs11gHP as the standby. Unfortunately, after step 5 the instructions stop showing commands and screen shots to finish the configuration. We are forced to go back to the OBE tutorial and modify the scripts that they give and execute the configurations with the new names.

Again, I am going to ask if anyone has a full tutorial on this using cloud services. It seems like every example goes half way and I am not going to finish it in this blog. It would be nice to see a 12c example and see how a pluggable database automatically replicates to the standby when it is plugged in. This would be a good exercise and workshop to run. My guess is this would be a half day workshop and could all be done in the cloud.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services