Cloning Oracle 11g Single Instance Grid Infrastructure

Jim Hannan (@HoBHannan), Principal Architect

In this blog post I will look at cloning Oracle 11g single instance. This procedure will be useful for cloning virtual machines that are running Oracle 11g with ASM. As of Oracle 11g, ASM is installed separately from RDBMS software. The ASM software requires Oracle Cluster Services. Both ASM and Cluster Services are part of the Grid Infrastructure installation media.

Cloning an Oracle RDBMS software home is pretty straight forward. However, cloning an Grid Infrastructure home is tricky. It is tricky because the Oracle Cluster Services are tied to the host name. Lets first take a look at the steps involved in cloning the Grid Infrastructure Home:

Clone or copy the Virtual Machine
Change the IP address and hostname of the new VM
Shut down any failed Grid processes that may have started up
Detach the Oracle Grid Home from the Oracle Inventory
Attach the Grid Home back to the Oracle Inventory
Run the configuration assistant roothas.pl to configure Oracle HA Services
Use srvctl to register the listener, ASM instance, and Oracle database

How to Detach an Oracle Home Using the OUI

In the interest of time, I am going to skip the first few steps of copying the virtual machine and changing of the IP address and hostname of the newly created VM. If you would like assistance with these steps, you can ask me directly here: @HoBHannan.

To detach the Grid Infrastructure Home to the Oracle Inventory run the following steps.

JH_1

Next run the clone.pl script located in the Grid Home.

JH_2

As root run root.sh:

JH_3

De-configure the current HA Service Settings as root.

JH_4

Next, run the Oracle HA Service (aka Oracle Restart) configuration script.

Note: This is difficult to tell, but the command below is one command not 4 separate commands.

JH_5

Run the runInstaller.

JH_6

Now add the listener, ASM, and (optionally) a database to Oracle Restart

JH_7

Next, mount ASM disk groups and test services.

JH_8

Now you can restart the virtual machine. Oracle Restart should successfully start the Oracle components. Below are the resources I found helpful in getting this to work.

References

How to Clone an 11.2.0.3 Grid Infrastructure Home and Clusterware [ID 1413846.1]
Oracle Universal Installer (OUI) FAQ [ID 458893.1]
Charles Kim’s blog was very helpful with the roothas.pl piece: http://www.dbaexpert.com/blog/clone-non-rac-grid-infrastructure

Table of Contents

Related Posts