You are on page 1of 12

ORACLE DATABASE CLONING FAQ's Applies to:

Oracle Server - Enterprise Edition - Version: 9.2.0.1.0 to 11.1.0.6.0 Information in this document applies to an platform.

Purpose
!his note e"plains a#out the fre$uentl as%ed $uestions related to clonin& '()*S Oracle +ome usin& O,I.

Questions and Answers What is cloning and how does it work?

-lonin& is the process of cop in& an e"istin& Oracle installation to a different location and updatin& the copied Oracle +ome to .or% in the ne. environment. (urin& clonin&/ O,I repla s the actions that .ere performed durin& the actual installation of the home. -lonin& is similar to installation e"cept that O,I runs the actions in a special mode that is referred to as clone mode.

What are the different phases of cloning?


!he clonin& process has t.o phases: 1. Source Preparation Phase

(urin& this phase/ prepare0clone.pl parses files in the source Oracle +ome to e"tract and store the re$uired values. 1t the source/ run a script called prepare0clone.pl. !his is a 2erl script that prepares the source for clonin& # recordin& the information re$uired for clonin&. !his script is &enerall found in the follo.in& location: 3O'1-4E0+O*E5clone5#in5prepare0clone.pl

O'161-!

ORACLE DATABASE CLONING FAQ's

NOTE: The need to perform the preparation phase depends on the Oracle product you are installing. This script needs to be executed only for the Application Server Cloning. and C!S Oracle "ome cloning do not re#uire this. atabase

1rchive and compress the source Oracle +ome usin& our preferred archivin& tool. 6or e"ample: 7ou can use 8in9ip on *icrosoft 8indo.s s stem computers and tar or &:ip on ,;I<. *a%e sure that the tool that ou use preserves the permissions and file timestamps.

8hen archivin& the home/ also ensure that ou s%ip the =.lo&/ =.d#f/ listener.ora/ s$lnet.ora/ and tnsnames.ora for archivin&.

2. Cloning Phase

On the destination s stem/ ou unarchive the Oracle +ome and run the clone.pl script. !his 2erl script performs all parts of the clonin& operation automaticall # runnin& O,I and various other utilities. !his script uses the clonin& functionalit in O,I. 8hen ou run the clone.pl script/ it handles the specifics that O,I ma have missed. !he -entral Inventor of the #o" .here the home is #ein& cloned is updated as is the Oracle +ome inventor >3O'1-4E0+O*E5inventor ?. Note: The cloned home and source home $ill not be identical in si%e& because the cloned home $ill have additional files created during the cloning operation.

O'161-!

ORACLE DATABASE CLONING FAQ's

Why is cloning required?


-lonin& is re$uired .hen ou .ant to deplo multiple Oracle +ome>s? from an e"istin& Oracle +ome.

Advantages and disadvantages of cloning?


Advantages

-reatin& an installation that is a cop of a production/ test/ or development installation. -lonin& ena#les ou to create a ne. installation .ith all patches applied to it in a sin&le step. !his contrasts .ith &oin& throu&h the installation process # performin& separate steps to install/ confi&ure/ and patch the installation.

'apidl deplo in& an instance and the applications that it hosts. 2reparin& an Oracle +ome and deplo in& it to man hosts. 7ou can also customi:e various aspects of clonin&/ for e"ample/ to specif custom port assi&nments/ or to preserve custom settin&s.

Disadvantages

!he clonin& process copies all of the files from the source Oracle +ome to the destination Oracle +ome. !hus/ an files used # the source instance located outside the source Oracle +ome@s director structure are not copied to the destination location.

-lonin& is not possi#le across platforms

O'161-!

ORACLE DATABASE CLONING FAQ's

Where to find the cloning log files?


1ll the lo&s can #e found in B-entral0Inventor C5lo&s folder and BO'1-4E0+O*EC5clone5lo&s. 6or more detailed information refer the ;ote D0A212.1 >4ocation Of 4o&s 6or 2atch 1nd O,I? .hich contains detailed information a#out the location of the lo& files for each command.

Is cloning faster than the actual installation?


7es/ clonin& is much faster than the actual installation. 8hen clonin& a source Oracle +ome/ all source home patches and settin&s are seamlessl cloned to the ne. home. -lonin& is much faster than manuall creatin& ne. homes and appl in& all source home patches and settin&s.

Is it required to copy the Central Inventory for cloning the Oracle Home?
-op in& -entral Inventor is not re$uired #ecause:

If it is not the first Oracle +ome on the tar&et Server: -lonin& .ill update the central inventor .ith the information re&ardin& the ne. home.

If it is the first oracle home on the tar&et Server: -lonin& .ill create a central inventor .ith the information re&ardin& the ne. home.

Do you need erl in your environment for cloning to work?


7es/ 2erl is re$uired. Since clonin& is done usin& the clone.pl script/ .hich is a 2erl script. ;O!E : 2erl E.6 or hi&her is re$uired for clonin& and should #e set in the environment.

O'161-!

ORACLE DATABASE CLONING FAQ's

What is the difference !etween cloning and copying an Oracle Home ?

-lonin& re-pla s all the actions that .ere performed durin& the installation of the Oracle +ome li%e relin%in&/ updatin& the inventor / etc./ and hence the cloned home can #e patched usin& O2atch/ patchsets can #e installed to it/ etc./ other than e"tractin& files from the soft.are %it.

) cop in& the Oracle +ome from one server to another/ all the a#ove mentioned actions are not performed and also it is not possi#le to appl patches or patchsets to copied Oracle +ome.

Simpl cop in& the Oracle +ome is not supported. If the Oracle +ome has to #e deplo ed to multiple destinations .ith the same confi&uration/ clonin& is the onl supported method.

What are the different options availa!le for clone"pl ?


-O : If ou use this ar&ument/ an thin& follo.in& it is passed to the O,I clone command line. 6or e"ample/ ou can use this option to pass the location of the oraparam.ini file to #e used # O,I: E&: -O -param6ile -:FOra+ome01FouiForaparam.ini -debug : If ou use this ar&ument/ the script runs in de#u& mode. -help : If ou use this ar&ument/ the script prints the help for the clone script.

What are the mandatory parameters for cloning #clone"pl$?


O'1-4E0+O*EGHB2ath to the Oracle0+ome #ein&0clonedCH O'1-4E0+O*E0;1*EGHBOracle0+ome0;ame for the Oracle0+ome #ein& clonedCH O'1-4E0)1SEGHB2ath 0to 0the 0Oracle0)aseCH (Only applicable to 11g)

O'161-!

ORACLE DATABASE CLONING FAQ's

E&: 8indo.s : perl 'Oracle("ome)*clone*bin*clone.pl O!AC+E("O,E-.C:*u/0*app*product*oracle*clone(home. O!AC+E("O,E(NA,E-.C+ONE. 4inu"-#ased and ,;I<-#ased s stems: perl 'Oracle("ome)1clone1bin1clone.pl O!AC+E("O,E-.1u/01app1product1oracle1clone(home. O!AC+E("O,E(NA,E-.C+ONE.

Why do you require cloner stage patches for %"&?


-loner sta&e patches are re$uired .hile clonin& 9i'2 installations #ecause in 9i'2 certain products .ere installed outside the Oracle +ome/ for e"ample/ oui/ Ire etc./ as opposed to 10& .here ever thin& is installed inside the Oracle +ome.

Can you use 'ar utility for archiving and compressing the Oracle Home ?
(o not use the Iar utilit for archivin& and compressin& the Oracle +ome/ as this causes the file permissions to #ecome lost.

Do the source and the destination path #of the Oracle Home to !e cloned$ need to !e the same ?
!he source and the destination path >of the Oracle +ome to #e cloned? need not #e the same.

O'161-!

ORACLE DATABASE CLONING FAQ's Are the changes made !y applying one(off patches on the source Oracle Home also present after the clone operation?
7es/ all the chan&es made # appl in& one-off patches on the source Oracle +ome are also present after the clone operation.

Can you use the cloned Oracle Home as the source for another cloning operation ?
7es/ ou can also use the cloned Oracle +ome as the source for another clonin& operation. !he cloned installation #ehaves the same as the source installation. 6or e"ample/ the cloned Oracle +ome can #e removed usin& O,I or patched usin& O2atch.

Does the si)e of the !inaries at the source and the destination differ ?
7es/ the si:e of the #inaries at the source and the destination ma differ #ecause these are relin%ed as part of the clone operation/ and the operatin& s stem patch levels ma also differ #et.een these t.o source and destination servers. 1dditionall / the num#er of files in the cloned home .ould increase #ecause several files copied from the source/ specificall those #ein& instantiated/ are #ac%ed up as part of the clone operation.

Is it necessary to shutdown data!ase#s$ and stop all processes running out of the Oracle Home !efore copying it for cloning?
7es/ it is recommended that the data#ase>s?/ listeners and an processes in the source home are shutdo.n so that .e have a clean #ac%up of the installation to create the tar&et home.

What is the significance of the inventory pointer file #oraInst"loc$ while cloning?
If the oraInst.loc file is present in a non-default location >default location is 5var5opt5oracle5oraInst.loc or 5etc5oraInst.loc? then edit the cs.properties file and add the follo.in& to the clone0command0line and preclone0command0line:

O'161-!

ORACLE DATABASE CLONING FAQ's


-i&noreS s2rere$s -inv2tr4oc Bpath0to0oraInst.locC5oraInst.loc

Can you clone the Oracle Home across platforms?


;o/ clonin& across platforms is not possi#le #ecause the #inaries across platforms are different E& : )inar for Solaris cannot #e used on 4inu".

Can you clone with a different operating system user and group?
7es/ ou can clone .ith a different operatin& s stem user and &roup. 'efer *etalin% ;ote EEKDJK.1 -lonin& 1 (ata#ase +ome 1nd -han&in& !he ,ser5Lroup !hat O.ns It

What is the difference !etween attachhome and cloning?


(urin& clonin& O,I repla s the actions that are performed durin& the actual installation of the home/ .hereas attachhome attaches an Oracle +ome to the -entral Inventor or to re&ister an e"istin& Oracle +ome .ith the -entral Inventor .hen it is lost or corrupted.

Is the preparation phase #*O+AC,-.HO/-0clone0!in0prepare.clone"pl$ required for Data!ase and C+1 Oracle Home cloning ?
;o/ data#ase and -'S Oracle +ome clonin& does not re$uire the script >3O'1-4E0+O*E5clone5 #in5prepare0clone.pl? durin& preparation phase.

What is the *O+AC,-.HO/-0clone0config0cs"properties file used for ?


3O'1-4E0+O*E5clone5confi&5cs.properties file can #e used for passin& values in the command line to O,I for clonin&. 7ou can enter values in the line clone(command(line-'value). !he values entered here are appended to the O,I command line/ .hich is run to perform the clone operation. 6or e"ample/ to specif a non-default location for the Oracle Inventor file on ,;I< s stem computers/ ou can add the follo.in& line to the cs.properties file:

O'161-!

ORACLE DATABASE CLONING FAQ's


clone(command(line- 2invptrloc 1private1oracle1ora3nst.loc ;ote: !o specif multiple ar&uements/ separate each ar&uement .ith a space.

Is it required to run root"sh after cloning?


7es/ on ,;I<54inu" installations/ after the clonin& operation is completed/ it is mandator to run root.sh >as root? in the cloned Oracle +ome.

2he following error#s$ occurred when doing a cloning " What is the reason0solution ?
!!O!: >Onl applica#le to 11&? Values for the follo.in& varia#les could not #e o#tained from the command line or response file>s?: O'1-4E0)1SE -lonin& cannot continue !eason: O!AC+E(4ASE is a mandatory variable for 00g cloning. As the variable O!AC+E(4ASE is not set& O53 thro$s the above error. Solution: Option 1: Specify the variable $hen invo6ing the O53 or clone.pl. perl 'Oracle("ome)*clone*bin*clone.pl O!AC+E("O,E-.'7ath to the Oracle("ome being(cloned). O!AC+E("O,E(NA,E-.'Oracle("ome(Name for the Oracle("ome being cloned). O!AC+E(4ASE-.'7ath to the Oracle(4ase). setup.exe 2clone 2silent 2noconfig O!AC+E("O,E-.'7ath to the Oracle("ome being(cloned). O!AC+E("O,E(NA,E-.'Oracle("ome(Name for the Oracle("ome being cloned). O!AC+E(4ASE-.'7ath to the Oracle(4ase).

O'161-!

ORACLE DATABASE CLONING FAQ's


.1run3nstaller 2clone 2silent 2noconfig O!AC+E("O,E-.'7ath to the Oracle("ome being(cloned). O!AC+E("O,E(NA,E-.'Oracle("ome(Name for the Oracle("ome being cloned). O!AC+E(4ASE-.'7ath to the Oracle(4ase). 8or more details On O!AC+E(4ASE in 00g : !efer ,etalin6 ;ote DEDDD2.1 00g 3nstall : 5nderstanding about Oracle 4ase& Oracle "ome and Oracle 3nventory locations Option 2: Set the variable O!AC+E(4ASE in the environment: set O!AC+E(4ASE-'7ath to the Oracle(4ase) 9 :indo$s ; export O!AC+E(4ASE-'7ath to the Oracle(4ase) 9 5nix ; Then restart the cloning

!!O!: !he home at BO'1-4E0+O*E0pathCis invalid or corrupt. ,na#le to continue clonin& !eason: The target O!AC+E("O,E variable supplied1passed for cloning

Solution" 7ass a valid target O!AC+E("O,E variable for cloning

E''O': Oracle +ome has not #een specified. 1#ortin& the clone operation. E''O': Values for the follo.in& varia#les could not #e o#tained from the command line or response file>s?: O'1-4E0+O*E0;1*E -lonin& cannot continue 10 O'161-!

ORACLE DATABASE CLONING FAQ's


!eason: The mandatory variables re#uired 9passed; for cloning are: O!AC+E("O,E O!AC+E("O,E(NA,E 3f any of the above variables are not passed& then O53 thro$s the above error. Solution: 7ass the mandatory variables O!AC+E("O,E < O!AC+E("O,E(NA,E 93n 00g O!AC+E(4ASE is also mandatory; Eg: .1run3nstaller 2clone 2silent 2noconfig O!AC+E("O,E-.'7ath to the Oracle("ome being(cloned). O!AC+E("O,E(NA,E-.'Oracle("ome(Name for the Oracle("ome being cloned).

!!O!: O,I-1019K: ,na#le to create a ne. Oracle +ome .ith name Bhome0nameC. 1n Oracle +ome .ith this name alread e"ists. 2lease select another name. SEVE'E:O,I-1019K: ,na#le to create a ne. Oracle +ome .ith name Bhome0nameC. 1n Oracle +ome .ith this name alread e"ists. 2lease select another name. Iava.io.IOE"ception: O,I-1019K: ,na#le to create a ne. Oracle +ome .ith name Bhome0nameC. 1n Oracle +ome .ith this name alread e"ists. 2lease select another name. !eason: The O!AC+E("O,E(NA,E is the name of the Oracle "ome directory in $hich Oracle products are installed. This should be uni#ue in a server1node. Cloning re#uires an O!AC+E("O,E(NA,E 9for the ne$ Oracle "ome; $hich is not present in the server already. The above error mentions that the value of the variable passed by the O!AC+E("O,E(NA,E is already existing on the server. 11 O'161-!

ORACLE DATABASE CLONING FAQ's

Solution: Specify another O!AC+E("O,E(NA,E $hich is not present already. The O!AC+E("O,E(NA,E can be found in the file patch to central inventor 1Contents=,+1inventory.xml :indo$s : .C:*7rogram 8iles*Oracle*3nventory*Contents=,+*inventory.xml 9 by default; 5nix : +ocate the ora3nst.loc file 91var1opt1oracle or 1etc; and hence the location of Central 3nventory 8or example the entry $ill be : '"O,E NA,E-.Ora b0/g(home0. +OC-. :*0/>!?*db(0. T@7E-.O. 3 =-.0. 1) "ere O!AC+E("O,E(NA,E $ill be Ora b0/g(home0

12

O'161-!

You might also like