Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

Friday, October 19, 2012

Using vSphere Replication for Protecting Databases with VMware Site Recovery Manager

I recently came across a question which involved the utilization of vSphere Replication to replicate databases from Protected Site to Recovery Site with VMware Site Recovery Manager as the DR engine. This query had 2 parts to it:- 

  • One, whether vSphere Replication Supports DB replication, &
  • Is it a good option to use vSphere Replication for DB Protection.


To begin with, you can definitely replicate Virtual Machines using vSphere Replication as a part of the VMware SRM 5.x solution. vSphere Replication does not care about what application you are running inside the Virtual Machine, hence we replicate any and every virtual machine which you configure for replication using this method. This is because we do not do the replication at the VMFS file system layer, however we do this from the VMkernel layer by using a vSCSI filter. 

Now, since we are planning to replicate a database, we might want to consider a few things which might help the replication engine to have a crash consistent data stream on the DR virtual machine. 

Since Databases can always create consistency issues when you replicate them using storage based or host based replication, most of the database vendors have their own solutions around replicating the database at the application level.This is definitely the safest option, along with a more traditional option of log shipping. However today I will discuss about other methods which might prove to be successful in your environments and help you save money on DB replication licensing & management overheads.

"With SRM 5.0 and now with SRM 5.1 we heavily rely on VMware Tools for consistency at the OS and application level.  VMware Tools has the ability to issue commands to the operating system such as to set up VSS snapshots.  With 5.1 we have the ability to do a little more than we have in the past, and ask the OS to flush application writers as well as make the OS itself quiescent.  This means for things like databases, messaging platforms, and other applications that have VSS writers, we can ensure a higher level of application recoverability.  When using vSphere Replication we can flush all the writers for the apps and the OS ensuring data consistency for the image used for recovery." - Reference - Ken Werneburg's SRM 5.1 and vSphere Replication as a Standalone Feature.

The only show stopper for us in this case would be that the OS instance of the Virtual Machine running the Database should support VSS (Windows Only). If your DB is indeed on Windows, then you would be able to enable Quiescing using VSS (Volume Shadow Services), while configuring vSphere replication on a virtual machine. The screenshot below shows that option highlighted in red, click on that drop-down and you would have the option to select VSS.


If you are not on Windows, then you should look at alternate solutions, such as Storage Array Based Replication or Log Shipping. In all the cases, I would setup a test environment and double-check the solution as this is not just technology dependent, but also environment dependent.

Hope this helps you take the right decision.



Wednesday, September 12, 2012

Oracle Licensing & Support in VMware vSphere Environments

I believe this is one of the most controversial and confusing topic when it comes to licensing of Oracle Applications/Databases on a Virtual Machine running on VMware vSphere platform. 

During discussions with my colleagues and customers, we debated on some excellent points on this topic. I thought it would be worth blogging about this to spread the correct information out to the decision makers who want to realize the full potential of their vSphere farms by Virtualizing Business Critical Apps such as Oracle Databases, E-business suite etc.

Let's look at the options which we have one at a time..

-------------------------------------------------------------------------------------------------------------------------------------------------------------


How Oracle Licenses its databases?

Oracle like most of the Vendors licenses their databases by 3 ways:-

Method A - Per CPU(Core)
Method B - Enterprise Licensing (All you can eat)
Method C - By Named users

Now, the customers who would worry about Virtualizing Oracle on vSphere would would mostly be using Method A, i.e. to license each and every CPU Socket/Core of the ESXi Server on which the Virtual Machine running the Oracle Application would live. There is a processor core factor depending on the type of CPU and can be 0.25, 0.5, 0.75 or 1.0. This means that you would either have to buy 0.25 , 0.5, 0.75 or 1 license for each CPU, and this entirely depends on the CPU Type (Intel, AMD) and the number of cores.

I would recommend reading and understanding more about Oracle Licensing on the following link - http://www.oracle.com/us/products/database/product-editions-066501.html

-------------------------------------------------------------------------------------------------------------------------------------------------------------

Lets do a quick math with an example for ease of understanding.

Situation - I want to run 6 Servers which need 2 CPU with 2 Cores each, hence I need a total of 12 CPU's with 24 Cores. How would I license this in a Physical World and then Virtual World??
-------------------------------------------------------------------------------------------------------------------------------------------------------------
For Physical World - Total Number of Oracle Licenses required = No. of CPU's * 0.5 (0.5 being the CPU Factor) 
                                                                               = 12 *0.5 
                                                                               = 6 Licenses

Hence if you want to run these servers you would have to pay Oracle for 6 licenses.

-------------------------------------------------------------------------------------------------------------------------------------------------------------
For Virtual World - Now, if you want to Virtualize these Servers, lets see what you need to do. To run these 6 servers as Virtual Machines, you can do with a Single ESXi server with 4 CPU and 6 Cores each. Lets see how many licenses you need

Total Number of Oracle Licenses required = No. of CPU's * 0.75 (0.75 being the CPU Factor, increased since the number of cores/CPU increased) 
                                                                 = 4*0.75 
                                                                 = 3 Licenses

Yup, you actually saved 50% of the cost by Virtualizing these servers just on the license. Lets say you want to give High Availability to these Physical Servers ( in The Physical World ). In that case you would have to buy 2 times the licenses, i.e 6 *2 = 12 licenses (You might have to buy additional licenses for clustering solutions / OS etc).

However, if you give the vSphere host another ESXi server for VMware HA then you would have to obtain just 3 more licenses making it a total of 6 licenses, plus the ESXi License per CPU. (VMware HA would be a part of the vSphere License, hence no extra cost).
-------------------------------------------------------------------------------------------------------------------------------------------------------------

Now, you would think that what is the stopping the customers from Virtualizing their Oracle Databases on VMware vSphere when they can actually save this much money?

The answer is a 3 letter word "FUD" - Fear, Uncertainty & Doubt. There are more and enough myths around Virtualizing Oracle on VMware vSphere Platform and we will look into each one of them and demystify them...

Alright, lets get the ball rolling.........
-------------------------------------------------------------------------------------------------------------------------------------------------------------
MYTH  - I have to license for all the ESXi hosts in the cluster where my Virtual Machine running oracle application/database is running. Hence if you have 6 vm's running oracle running on a 10 host ESXi cluster, you would have to license the CPU's on all the 10 Hosts, irrespective of the fact that my VM just lives on the first 2 hosts.

FACT  - It is true that you would have to license each CPU on which your oracle Virtual Machine might live even momentarily. In a vSphere Cluster, the virtual machines are free to move from one host to another using DRS & vMotion, and vCenter logs keep a track of what all hosts the machine was running on. In such a situation you would have to license all the hosts for Oracle and it is not a Myth.

The Myth is that you cannot use features such as DRS Affinity which can restrict all the Oracle virtual machines to run on specific ESXi hosts in a cluster. Hence license only those hosts which are required for all the Oracle Virtual Machines to run. At the end of the day what ORACLE checks is the vCenter Logs and if the logs say that the oracle virtual machines were only running on 2 hosts and those hosts are already licensed you are good to go. Hence we should use the features given by VMware on the vSphere Platform to achieve this and benefit out of Virtualization of oracle databases and application.

If you think that managing this is not your cup of tea and you want a simpler method, use the popular concept of ORACLE Islands. Instead of mixing your oracle virtual machines with other workloads, just go ahead and create a separate cluster of 2, 3 or as many hosts you want to run just Oracle Workloads and license only those hosts. As simple as it gets....

Now lets look at the Second Myth!!!
-------------------------------------------------------------------------------------------------------------------------------------------------------------
MYTH  - Oracle Applications and Databases running on VMware vSphere Virtual Machines are NOT SUPPORTED by oracle support.

FACT - This myth scares the customers the most and hence is used mostly by the Field Sales to ensure that the customer looks at alternative hypervisor choices.This helps them to scare away customers from using VMware vSphere which is the most advance and mature hypervisor if you compare it with any of the Claiming Competitors.

Now lets look at the reality. Oracle has a Support Statement which says that :-

"Oracle has not certified any of its products on VMware virtualized environments" (Quoted from - Oracle official support statement, note 249212.1 on My Oracle Support)

The above statement does not even carry the word "Support",  hence as a customer or a consultant, I would re-visit what the words of the sales guy and get the appropriate information. 

The support statement clearly states that Oracle does support VMware platform but does not certify it. This certification program of Oracle certifies hardware which run Oracle Applications and not hypervisor, hence it is not certified. 

However, it is supported by default and only in case of an unknown issue, you are asked to re-pro the issue on a physical environment. The reason  they ask you to do that is because they cannot do any testing internally as Oracle Engineering is forced to use Oracle VM and cannot deploy vSphere in their labs [which is understandable :-) ]

To take care of such a situation, VMware has taken a great initiative to help its customers to get support on Oracle issues from a specialized set of Oracle Support Engineers working out of VMware GSS. Understand VMware's own Oracle Support policy : Reference VMware's Global Support Services (GSS) support site and statement. Read Support Policy. This support is a part of the normal vSphere SnS and does not cost you extra. Seems, VMware has a point to prove. 

-------------------------------------------------------------------------------------------------------------------------------------------------------------
To top it all VMware runs all its Oracle Applications and Databases on vSphere Platform and guess what, they get support from Oracle whenever needed . I guess this would be a biggest case study for any customer who is considering Virtualizing Oracle on Vmware.

Well, enough of blowing the VMware Trumpet on Oracle support and licensing. Lets listen to what Oracle has to say on this.

I got my hands on an interview which was done at VMworld 2012 where the Oracle spokesperson was Richard Garsthagen, Director for Cloud Business Development, Oracle EMEA. Richard himself demystified the MYTHS around this subject. Lets listen to what he has to say on this.
 
-------------------------------------------------------------------------------------------------------------------------------------------------------------
I would also take this opportunity to share some of the other great resources on this topic which might help you take the right decision for your business. Here are a few links:-




A great Oracle Blog called the Oracle Storage guy - http://oraclestorageguy.typepad.com/oraclestorageguy/

-------------------------------------------------------------------------------------------------------------------------------------------------------------
Do share your comments if you have any and I would be happy to discuss.

- Sunny Dua