Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

How to Clone an Oracle11g ASM and Database

home
Author Lokesh Krishnaswamy Oracle DBA Consultant
Document purpose
The purpose of this document is to explain cloning of an RAC RDB! home in
Oracle""g R"# $e at ran into a situation where we ha%e to mo%e the current homes for
the following purposes
"# $ith crs& asm and d' all contri'uting the three times the regular 'inary si(e&
we had to come up with ways to clone the RAC homes& primarily to o%ercome
the )*+' limitation of internal storage of the ser%ers
)# !ome of the Oracle""g R" RAC 'undles can dou'le the si(e of the 'inaries
,# -a%e the a'ility to apply patches to the 'inaries much earlier than during
scheduled patch outage windows and switch the patched 'inaries during the
actual downtime if the patches cannot applied in a rolling fashion or perhaps if
the actual patching time takes longer for each node#
Introduction
The current en%ironment we ha%e is a . node cluster with Oracle""g R" %ersion ""#"#*#/
on !un !parc01 .*** ser%ers& with ,)+' memory and "0C23# That4s lot of power5
First hurdle
3ntil Oracle6i& we had the luxury of 7ust copying the 'inaries and using them# !tarting
Oracle"*g& we ha%e to use the run8nstaller 'ut in Oracle""g& the significant change is& the
copy has to 'e done 'y the root user# Refere note9 559305.1. I did encounter some issues in
copying the links with the command suggested by oracle
cp Rp /u00/app/oracle/product/11.1/asm /u01/app/oracle/product/11.1/asm
Instead I used the following as root and worked fantastic. Great many thanks to our unix admins
ikram !ingh and "o !hafi.
Local:
tar #cf # asm $ %cd /u01/app/oracle/product/11.1/&tar #xf # '
Register with Inventor ! Did this "or both asm and db home
cd :ORACL;<-O;=clone='in
perl clone#pl ORACL;<-O;>?=u*"=app=oracle=product=""#"=asm?
ORACL;<-O;<@A;>?OraA!""g<home)? ORACL;<BA!;>?=u**=app=oracle?
Apply all the patches to the asm and d' 'inaries# After application of patches on
one propagate the 'inaries to the remaining nodes in the cluster using the following
command#
remote:
tar #cf # db $ ssh root(adcracdb)* +cd /u01/app/oracle/product/11.1/&tar #xf # +
On each node perform the following to register the new 'inaries to 'e a %alid
Oracle home
perl clone#pl ORACL;<-O;>?=u*"=app=oracle=product=""#"=asm?
ORACL;<-O;<@A;>?OraA!""g<home)? ORACL;<BA!;>?=u**=app=oracle?
OCR Changes
Change ASM Home
8dentify the current location for asm OCR
AoracleBadcracd'p1C sr%ctl config asm Dn adcracd'p1
EA!" =u**=app=oracle=product=""#"=asm
Change A! home to new home
AoracleBadcracd'p1C sr%ctl modify asm Fn adcracd'p1 Fo =u*"=app=oracle=product=""#"=asm
AoracleBadcracd'p1C sr%ctl modify asm Fn adcracd'p. Fo =u*"=app=oracle=product=""#"=asm
AoracleBadcracd'p1C sr%ctl modify asm Fn adcracd'p0 Fo =u*"=app=oracle=product=""#"=asm
AoracleBadcracd'p1C sr%ctl modify asm Fn adcracd'p/ Fo =u*"=app=oracle=product=""#"=asm
AoracleBadcracd'p1C sr%ctl modify asm Fn adcracd'pG Fo =u*"=app=oracle=product=""#"=asm
#alidate changes
AoracleBadcracd'p1C sr%ctl config asm Dn adcracd'p1
EA!" =u*"=app=oracle=product=""#"=asm
AoracleBadcracd'p1C sr%ctl config asm Dn adcracd'p.
EA!" =u*"=app=oracle=product=""#"=asm
AoracleBadcracd'p1C sr%ctl config asm Dn adcracd'p0
EA!" =u*"=app=oracle=product=""#"=asm
AoracleBadcracd'p1C sr%ctl config asm Dn adcracd'p/
EA!" =u*"=app=oracle=product=""#"=asm
AoracleBadcracd'p1C sr%ctl config asm Dn adcracd'pG
EA!" =u*"=app=oracle=product=""#"=asm
Change D$ Home
8dentify the current location for data'ase in OCR
AoracleBadcracd'p1C sr%ctl config data'ase Dd +-2 Da
adcracd'p. +-2) =u**=app=oracle=product=""#"=d'
adcracd'p1 +-2" =u**=app=oracle=product=""#"=d'
adcracd'p0 +-2, =u**=app=oracle=product=""#"=d'
adcracd'p/ +-20 =u**=app=oracle=product=""#"=d'
adcracd'pG +-2. =u**=app=oracle=product=""#"=d'
DB<3@8H3;<@A;9 +-2
DB<@A;9 +-2
ORACL;<-O;9 =u**=app=oracle=product=""#"=d'
!2I8L;9 E+-2<DATA=+-2=spfile+-2#ora
DOA8@9 null
DB<ROL;9 null
!TART<O2T8O@!9 null
2OL8CJ9 A3TOAT8C
;@ABL; ILA+9 DB ;@ABL;D
Let us change the homes to the new homes
AoracleBadcracd'p1C sr%ctl modify data'ase Fd +-2 Fo =u*"=app=oracle=product=""#"=d' Fs open
#alidate changes
AoracleBadcracd'p1C sr%ctl config data'ase Dd +-2 Da
adcracd'p. +-2) =u*"=app=oracle=product=""#"=d'
adcracd'p1 +-2" =u*"=app=oracle=product=""#"=d'
adcracd'p0 +-2, =u*"=app=oracle=product=""#"=d'
adcracd'p/ +-20 =u*"=app=oracle=product=""#"=d'
adcracd'pG +-2. =u*"=app=oracle=product=""#"=d'
DB<3@8H3;<@A;9 +-2
DB<@A;9 +-2
ORACL;<-O;9 =u*"=app=oracle=product=""#"=d'
!2I8L;9 E+-2<DATA=+-2=spfile+-2#ora
DOA8@9 null
DB<ROL;9 null
!TART<O2T8O@!9 open
2OL8CJ9 A3TOAT8C
;@ABL; ILA+9 DB ;@ABL;D
Change Database %istener Home
sr%ctl modify listener Dn adcracd'p1 Do =u*"=app=oracle=product=""#"=asm Dl
KL8!T;@;R<ADCRACDB21K
sr%ctl modify listener Dn adcracd'p. Do =u*"=app=oracle=product=""#"=asm Dl
KL8!T;@;R<ADCRACDB2.K
sr%ctl modify listener Dn adcracd'p0 Do =u*"=app=oracle=product=""#"=asm Dl
KL8!T;@;R<ADCRACDB20K
sr%ctl modify listener Dn adcracd'p/ Do =u*"=app=oracle=product=""#"=asm Dl
KL8!T;@;R<ADCRACDB2/K
sr%ctl modify listener Dn adcracd'pG Do =u*"=app=oracle=product=""#"=asm Dl
KL8!T;@;R<ADCRACDB2GK
Change log "ile director "or %istener
Change T@!<AD8@ directory location in #profile to point to the correct T@!<AD8@
directory# 8t is =u*"=app=oracle=product=""#"=asm=network=admin in this situation# This has to 'e
done on all the nodes#
cd :T@!<AD8@
%i listener#ora
include the following on each node in the listener#ora file
ADR<BA!;<L8!T;@;R<LnodenameM>=u*"=app=oracle
eg
ADR<BA!;<L8!T;@;R<ADCRACDB21>=u*"=app=oracle
AoracleBadcracd'p1C sr%ctl seten% data'ase Fd +-H Ft
NT@!<AD8@>=u*"=app=oracle=product=""#"=asm=network=admin?
sr%ctl seten% nodeapps Fn adcracd'O, Ft
NT@!<AD8@>=u*"=app=oracle=product=""#"=asm=network=admin?
The a'o%e sr%ctl commands ha%e to 'e run for all the data'ases and nodes if needed#
Change the entries in listener#ora for the oracle home
L8!T;@;R<ADCRACDB21 >
PD;!CR82T8O@<L8!T >
PD;!CR82T8O@ >
PADDR;!! > P2ROTOCOL > TC2QP-O!T > adcracd'21Drac%ipQP2ORT > ".)"QP82 >
I8R!TQQ
R PADDR;!! > P2ROTOCOL > TC2QP-O!T > "*#"0,#01#6,QP2ORT > ".)"QP82 > I8R!TQQ
PADDR;!! > P2ROTOCOL > TC2QP-O!T > "*#"0,#).1#6,QP2ORT > ".)"QP82 > I8R!TQQ
PADDR;!! > P2ROTOCOL > 82CQPK;J > ;ST2ROCQQ
Q
Q
!8D<L8!T<L8!T;@;R<ADCRACDB21 >
P!8D<L8!T >
P!8D<D;!C >
P!8D<@A; > 2L!;xt2rocQ
PORACL;<-O; > &u'1&app&oracle&product&11(1&asmQ
P2RO+RA > extprocQ
P;@T! >
K;ST2ROC<DLL!>A@J&LD<L8BRARJ<2AT->=u*"=app=oracle=product=""#"=asm=li'9=usr=li'9=
apps=nu'ridge=xp<nuencryption<
ora<solaris=)#/=li'9=usr=sfw=li'=01&2C8<CO@I8+<2AT->=apps=nu'ridge=resources&@3<LO++8@
+<CI+>=apps=nu'ridge=xp<nuencryption<or
a<solaris=)#/=config=samples=logging#cfg&LO+@A;>oracleKQ
Q
Q
Iurther to the changes a'o%e& the 'ackup scripts and other scripts running from cronta' should
also 'e changed#
Ior further Ouestions& you can email me anytime at lokesh#krishnaswamyBihg#com or
lokeshBa%idts#com#

You might also like