Applies To:: Purpose
Applies To:: Purpose
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.
-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.
(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-!
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-!
-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.
O'161-!
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.
O'161-!
-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.
O'161-!
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.
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-!
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
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.
O'161-!
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-!
!!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
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-!
!!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-!
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. [email protected]. 3 =-.0. 1) "ere O!AC+E("O,E(NA,E $ill be Ora b0/g(home0
12
O'161-!