8/10/2019 Headstrong Cloning Steps Using RMAN-1
1/15
HeadStrong DB cloning Steps using RMAN
1. Before starting the cloning backup the following files:
Make a cop of the e!isting !"l file for D#$% instnace.
&op both !"l files 'apps and db tiers( to the )H*M#+clone dirs of the users. (Create clone dir if it doesnt exist)
As oradev2 user on production2 server:
$ cd /d1/oradev2/clone$ cp /d1/oradev2/dev2db/10.2.0/appsutil/D!2"production2.x#l .
$cd /d1/oradev2/dev2db/10.2.0/netor%/ad#in/D!2"production2$ cp & /d1/oradev2/clone
As appldev2 user on erptest server:
$cd /d2/erptest"b%p/clone$ cp /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l .
$cd /d1/appldev2/dev2co#n/ad#in/scripts/D!2"erptest$ cp adstpall.s' adstrtal.s' adapcctl.s' /d2/erptest"b%p/clone
$cd /d1/appldev2/dev2co#n/portal/D!2"erptest$ cp index.'t#l /d2/erptest"b%p/clone
$cd /d1/appldev2/dev2ora/.0./netor%/ad#in/D!2"erptest$ cp tnsna#es.ora listener.ora /d2/erptest"b%p/clone
SS,-Related-iles:
*e need to ta%e t'e bac%up of t'e files pointed b+ folloin, variables:
s"eb"ssl"director+ - /d1/appldev2/dev2co#n/ad#in/certs/apac'es"eb"ssl"%e+file- /d1/appldev2/dev2ora/iA/Apac'e/Apac'e/conf/ssl.%e+/server.%e+s"eb"ssl"certfile- /d1/appldev2/dev2ora/iA/Apac'e/Apac'e/conf/ssl.crt/server.crts"eb"ssl"certc'ainfile- /d1/appldev2/dev2ora/iA/Apac'e/Apac'e/conf/ssl.crt/ca bundle.crt
$ cd /d2/erptest"b%p/clone$ #%dir p Apac'e/conf$cd /d2/erptest"b%p/clone/Apac'e/conf$cp /d1/appldev2/dev2ora/iA/Apac'e/Apac'e/conf/&.
8/10/2019 Headstrong Cloning Steps Using RMAN-1
2/15
$cd /d2/erptest"b%p/clone$ #%dir p certs/apac'e$ cd /d2/erptest"b%p/clone/certs/apac'e$ cp /d1/appldev2/dev2co#n/ad#in/certs/apac'e/& .
%. Bring down the ser/ices:
1. rin, t'e istner and Apps tier services of D!2 instance don on erptest server.2. rin, t'e 3D!23 Database don.
ource: D!1 instance on production1.'eadstron,.co#4ar,et: D!2 D instance on production2.'eadstron,.co# D!2 apps instance on erptest.'eadstron,.co#
Application Restoration on erptest ser/er:
4a%e t'e bac%up of t'e Application as #entioned in custo#er operatin, ,uide.
1. o,in to production1.'eadstron, server as appldev1 user.
2. Delete t'e last bac%up present in t'e bac%up location /prod1"data/idba/coldb%p/Apps5. 4a%e t'e bac%up of existin, clone dir on Apps4ier usin, appldev1 user.
6. 7un adpreclone.pl
8. 7un t'e Application 4ier bac%up script fro# folloin, location.
ac%up cript location /prod1"data/idba/scripts cript Apps%p.s'
ac%up ocation /prod1"data/idba/coldb%p/Apps
. C'ec% for an+ errors in t'e lo, file and bac%up co#pleted successfull+.
9. After bac%up is co#pleted in ac%up ocation e need to ftp t'e created 4A7 files to erptest server in /d1/appldev2 dir.
;ote: et t'e bac%up of application 4ier runnin, #ean'ile +ou can start restorin, t'eDatabase on production2.'eadstron,.co#.
8/10/2019 Headstrong Cloning Steps Using RMAN-1
3/15
Start the Restoration using R"an *n 0roduction%.headstrong.co"
as 2orade/%2 user3:
Database:
Database files are present in folloin, to directories.Datafile location /d2/dev2data//prod2"data/production2/dev2data
o,file location /d2/dev2data/
4e#p roduction sid.(D!1)
xport @7AC"?D-D!1?nitora file /d1/oradev2/dev2db/10.2.0/dbs/initD!1.ora
$ slplus 3/as s+sdba3
B startup no#ountBexit
Set the DB4D on 0roduction%.headstrong.co" 5A6 ser/er:
4'e D?D can be found fro# D?D fro# t'e production?n t'is Case t'e D?D is 3244810689
$ r#an tar,et /7=A; set D?D-3244810689
Restoring the &ontrol ile on 5A6 ser/er:
4'e
8/10/2019 Headstrong Cloning Steps Using RMAN-1
4/15
4a%e t'e bac%up of t'ese files and put t'e entr+ for control"files in initD!1.ora on A4server as #entioned above.7un t'e folloin, co##and.
7=A; restore controlfile fro# 3/EF>">A4G /D!1"data"control"2H1"1"r6%ddib3I
Start with the RMAN restore database on 5A6 ser/er as orade/% user3:
*e need to rena#e t'e location 'ere t'e datafiles s'ould be restored as t'e director+structure is all to,et'er different fro# t'e >roduction for A4 serverJ
8/10/2019 Headstrong Cloning Steps Using RMAN-1
5/15
#nable the following entr in the initD#$%.ora para"eter file on 5A6 ser/er:
lo,"arc'ive"start - true L if +ou ant auto#atic arc'ivin,
Rena"e the #!isting controlfiles on 5A6 ser/er:
*e need to rena#e t'e existin, Control files as e 'ad alread+ restored t'e control filesearlier.
>revious restored control files.
/d2/dev2data/cntrl01.dbf/prod2"data/production2/dev2data/cntrl02.dbf
/d2/dev2data/cntrl05.dbf
#v /d2/dev2data/cntrl01.dbf /d2/dev2data/cntrl01.dbf"old
#v /prod2"data/production2/dev2data/cntrl02.dbf/prod2"data/production2/dev2data/cntrl02.dbf"old
#v /d2/dev2data/cntrl05.dbf /d2/dev2data/cntrl05.dbf "old
;@4: efore runnin, t'e recreation of controlfile please c'ec% if an+ additionaldatafile 'as been added. ?f so follo step 1) else i,nore it.
J1( 6ake backup of controlfile on 0roduction1 %7%.1%8.%19.1713:
B alter database bac%up controlfile to traceI
An+ ne datafile or ot'er c'an,es please edit t'e script
/r#an"b%p/bac%up /createControl4est.slM
Re&reate the &ontrol ile and Setting the S4D to 2D#$%2 on 5A6 ser/er:
$ export @7AC"?D- D!2$ export @7AC"?D-/d1/oradev2/dev2db/10.2.0
$ cd /d1/oradev2
8/10/2019 Headstrong Cloning Steps Using RMAN-1
6/15
$ slplus 3/as s+sdba3
Bstartup no#ountI
B ;+d1+orade/%+idba +create&ontrolD#$%.sroduction) is #ounted on A4 server(production2.'eadstron,.co#)
*'ile recoverin, t'e D!2 database on A4 server (production2) e can set lo,source.
4 @N@7C O/prod1"data/arc'ivePI
B recover database ;4? CA;C usin, bac%up controlfileI*pen the D#$% Database on 5A6 ser/er with Resetlogs:
B alter database open resetlo,sI
B s'utdon i##ediate
Disable the following entr in the initD#$%.ora para"eter file on 5A6 ser/er:
Llo,"arc'ive"start - true L if +ou ant auto#atic arc'ivin,
Disable the Archi/ing on 5A6 ser/er:
B startup #ountI
B alter database noarc'ivelo,I
B alter database openI
Add 6e"p file in D#$% instance on 5A6 ser/er:
B alter tablespace 4=> add te#pfile 3 /d2/dev2data/ te#p01.dbf 3 siQe 2000#IB alter tablespace 4=> add te#pfile 3 /d2/dev2data/ te#p02.dbf 3 siQe 2000#IB alter tablespace 4=> add te#pfile 3 /d2/dev2data/ te#p05.dbf 3 siQe 2000#IB alter tablespace 4=> add te#pfile 3 /d2/dev2data/ te#p06.dbf 3 siQe 2000#IB alter tablespace 4=> add te#pfile 3 /d2/dev2data/ te#p08.dbf 3 siQe 2000#I
8/10/2019 Headstrong Cloning Steps Using RMAN-1
7/15
Bexit
Start ,istener for D#$% instance on 5A6 ser/er:
$ lsnrctl start D!2
&hange the =,*BA, NAM# of the database:
elect N@A";A= fro# N@A";A=IA47 DA4AA 7;A= N@A";A= 4@ OD!2.GAD47@;N.C@=PI
Run adconfig.pl on DB tier after backing up !"l file >orade/%? user3 on 5A6
ser/er:
Cop+ over t'e DEV2_production2.xmlfile fro# t'e /d1/oradev2/clone to
$@7AC"G@=/appsutil dir in case binaries 'ave also been re#oved fro#@7AC"G@=.
cd $@7AC"G@=/appsutil/bin$perl adconfi,.pl
nter t'e full pat' to t'e Context file:/d1/oradev2/dev2db/10.2.0/appsutil/D!2"production2.x#l
HeadStrong A00S cloning Steps:
1. o,in to erptest.'eadstron,.co# server as appldev2 user.2. >lease c'ec% t'at +ou 'ave t'e bac%up t'e confi,uation files before startin, t'e
clonin,.
ac%up of folloin, files:
C@;4R4"
8/10/2019 Headstrong Cloning Steps Using RMAN-1
8/15
0repare the sste" for cloning on 5A6 ser/er'erptest as applde/% user(:
Re"o/e the filesste" on erptest ser/er:
7e#ove t'e folloin, directories fro# erptest server usin, appldev2 users.
/d1/appldev2/dev2appl/d1/appldev2/dev2co#n/d1/appldev2/dev2ora
After bac%up is co#plete ftp t'e tar files to /d1/appldev2 dir on erptest server fro#/prod1"data/idba/coldb%p/Apps on production1 server.
4'ere ill be four tar files li%e #entioned belo:
rrr 1 appldev1 dba 8HH008662 Apr 12 1:5 appltop"12060H.tar.,Qrrr 1 appldev1 dba 16H891262 Apr 12 1H:6 co##ontop"12060H.tar.,Qrrr 1 appldev1 dba 15690668HH Apr 12 1H:82 0oracletop"12060H.tar.,Qrrr 1 appldev1 dba 16956H669 Apr 12 20:52 iasoracle'o#e"12060H.tar.,Q
*'ile extractin, please note t'at e need to create dir dev2ora and t'en #ove t'e filesO0oracletop& and iasoracle'o#e&P to dev2ora and extract t'e#.
7ena#e t'ese directories as per t'e A4 A>> 4ier (erptest):
$ cd /d1/appldev2#v dev1appl dev2appl#v dev1co#n dev2co#n#v dev1ora dev2ora
C'an,in, t'e oner for t'e above#entioned files:
c'on 7 appldev2:dba dev2appl dev2co#n dev2ora
in%in, t'e application files:
cd /d1/appldev2/dev2ora/iAln s /d1/appldev2/dev2ora/.0. iserver
cd /data1/oraapps/appltest/prodora/iA/Apac'eln s /usr/Sd%/Sd%1.8.0"0 Sd%
8/10/2019 Headstrong Cloning Steps Using RMAN-1
9/15
cd /d1/appldev2/dev2ora/iA/libln s libclnts'.so..0 libclnts'.so
Run adcfgclone.pl on 5A6 ser/er 'erptest( 2applde/%2 user3:
Cop+ t'e x#l file present in /d2/erptest"b%p/clone(D!2"erptest.x#l) to$A>>"4@>/ad#in. (/d1/appldev2/dev2appl/ad#in)
$ cd $C@==@;"4@>/clone/bin
$ perl adcf,clone.pl apps4ier /d1/appldev2/dev2appl/ ad#in/D!2"erptest.x#lor$ perl adcf,clone.pl apps4ier $A>>"4@>/ad#in/D!2"erptest.x#l
Bring Apps ser/ices down on 5A6 ser/er:
$ cd $C@==@;"4@>/ad#in/scripts/$C@;4R4";A=$ ./adstpall.s' apps/Eapps >assord
;ote:top apac'e usin, root user usin, adapcctl.s'.
&heck the following entries in respecti/e files:
Make sure the following file is set with the APPLTMP setting
bas'5.00$ cd $?A"@7AC"G@=/Apac'e/Apac'e/confbas'5.00$ ,rep A>>4=> apps.confetnv A>>4=> /d1/appldev2/dev2co#n/te#p
&op back all files backed up using applde/% user on erptest fro"
+d%+erptest-bkp+clone dir:
$ cd $C@==@;"4@>/ad#in/scripts/D!2"erptest$ 4a%e t'e bac%up of t'e folloin, files.( adstpall.s' adstrtal.s' adapcctl.s' )$ Cop+ t'e file adstpall.s' adstrtal.s' and adapcctl.s' fro# /d2/erptest"b%p/clone to
$C@==@;"4@>/ad#in/scripts/D!2"erptest.$ cd /d1/appldev2/dev2co#n/portal/D!2"erptest$ 4a%e t'e bac%up of t'e existin, index.'t#l.$cp /d2/erptest"b%p/clone/index.'t#l to /d1/appldev2/dev2co#n/portal/D!2"erptest.
$cd /d1/appldev2/dev2ora/.0./netor%/ad#in/D!2"erptest
8/10/2019 Headstrong Cloning Steps Using RMAN-1
10/15
$ cp tnsna#es.ora listener.ora fro# /d2/erptest"b%p/clone to/d1/appldev2/dev2ora/.0./netor%/ad#in/D!2"erptest
No to t'e /d1/appldev2/dev2ora/iA/Apac'e/Apac'e dir.4a%e t'e bac%up of t'e files present in t'e dir as #entioned in t'e sectionSS,-Related-iles.
Cop+ t'e files 'ose bac%up 'as been ta%en in section SS,-Related-iles.
1. set t'e Ts"url"protocol variable to 'ttps2. set t'e Ts"local"url"protocol variable to 'ttps5. set t'e Ts"ebentr+urlprotocol variable to 'ttps6. set t'e Ts"fr#Connect=ode variable to 'ttps8. set t'e Ts"ebssl"port variable to t'e Apac'e port reuired
. set t'e Ts"active"ebport variable to t'e sa#e value as t'at for t'e Ts"ebssl"portvariable.9. set t'e Ts"ebport variable to t'e sa#e value as t'at for t'e Ts"ebssl"port variable. set t'e Ts"eb"ssl"director+ variable to point to t'e full director+ pat' of t'e
director+ t'at is to contain t'e .crt and .%e+ files t'at +ou are usin, for Apac'e e,E$C@==@;"4@>/ad#in/certs/apac'e
H. set Ts"apps"portal"url variable to 'ttps10. et s"for#s"servlet"serverurl to /for#s/for#servlet
Reference:bas'5.00$ ,rep s"url"protocol /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eurl"protocol oa"var-Ks"url"protocolK'ttpsE/url"protocolbas'5.00$ ,rep s"local"url"protocol /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Elocal"url"protocoloa"var-Ks"local"url"protocolK'ttpsE/local"url"protocolbas'5.00$ ,rep s"ebentr+urlprotocol /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eebentr+urlprotocoloa"var-Ks"ebentr+urlprotocolK'ttpsE/ebentr+urlprotocolbas'5.00$ ,rep s"fr#Connect=ode /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Efor#s"connect oa"var-Ks"fr#Connect=odeKsoc%etE/for#s"connectbas'5.00$ ,rep s"ebssl"port /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eeb"ssl"port oa"var-Ks"ebssl"portKoa"t+pe-K>@74K665E/eb"ssl"portbas'5.00$ ,rep s"active"ebport /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eactiveebport oa"var-Ks"active"ebportKoa"t+pe-K>@74K665E/activeebportbas'5.00$ ,rep s"ebport /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eeb"port oa"var-Ks"ebportK oa"t+pe-K>@74K665E/eb"port Eeb"port"pls oa"var-Ks"ebport"plsKoa"t+pe-K>@74K200E/eb"port"pls
8/10/2019 Headstrong Cloning Steps Using RMAN-1
11/15
bas'5.00$ ,rep s"eb"ssl"director+ /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eeb"ssl"director+oa"var-Ks"eb"ssl"director+K/d1/appldev2/dev2co#n/ad#in/certs/apac'eE/eb"ssl"director+bas'5.00$ ,rep s"apps"portal"url /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l
Eapps"portal"urloa"var-Ks"apps"portal"urlK'ttps://erptest.'eadstron,.co#:665/pls/D!2"portal50/portal50.'o#eE/apps"portal"urlbas'5.00$ ,rep s"for#s"servlet"serverurl/d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eserver"urloa"var-Ks"for#s"servlet"serverurlK/for#s/for#servletE/server"url
5sing a SS, Accelerator:
1. et t'e Ts"ebentr+'ost variable to t'e Accelerator 'ostna#e.2. et t'e Ts"ebentr+do#ain variable to t'e Accelerator do#ain na#e5. et t'e Ts"ebentr+urlprotocol variable to K'ttpsK.6. et t'e Ts"active"ebport variable to t'e value of t'e Accelerator3s external
interfacin, port.8. et t'e Ts"ebssl"port variable to t'e sa#e value as t'e KActive *eb >ortK.. et t'e Ts"lo,in"pa,e variable to K'ttps://E3*eb Gost entr+ point3.E3*eb do#ain
entr+ point3:E3Active *eb >ort3K
Reference:
bas'5.00$ ,rep s"ebentr+do#ain /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eebentr+do#ainoa"var-Ks"ebentr+do#ainK'eadstron,.co#E/ebentr+do#ainbas'5.00$ ,rep s"ebentr+'ost /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eebentr+'ost oa"var-Ks"ebentr+'ostKerptestE/ebentr+'ostbas'5.00$ ,rep s"ebentr+urlprotocol /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eebentr+urlprotocoloa"var-Ks"ebentr+urlprotocolK'ttpsE/ebentr+urlprotocolbas'5.00$ ,rep s"active"ebport /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eactiveebport oa"var-Ks"active"ebportKoa"t+pe-K>@74K665E/activeebportbas'5.00$ ,rep s"ebssl"port /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l Eeb"ssl"port oa"var-Ks"ebssl"portKoa"t+pe-K>@74K665E/eb"ssl"portbas'5.00$ ,rep s"lo,in"pa,e /d1/appldev2/dev2appl/ad#in/D!2"erptest.x#l
8/10/2019 Headstrong Cloning Steps Using RMAN-1
12/15
Elo,in"pa,eoa"var-Ks"lo,in"pa,eK'ttps://erptest.'eadstron,.co#:665/@A"G4=//?CR?;DR"D!2"erptest.'t#E/lo,in"pa,e
,ogin to the database as apps user and run c"clean.s7@DC4?@;13I
pdate fnd"concurrent"processes set D"?;4A;C-3D!23*'ere D"?;4A;C-3D!13I
pdate fnd"concurrent"ueues set ;@D";A=-3 7>443*'ere ;@D";A=-3 >7@DC4?@;13I
8/10/2019 Headstrong Cloning Steps Using RMAN-1
13/15
>DA4 fnd"concurrent"reuests 4 p'ase"code - 3C3 status"code -UR *G7 status"code -343 @7 p'ase"code - 373I>DA4 fnd"concurrent"reuests 4 'old"fla, - 3V3 *G7>'ase"code - U> A;D status"code in (3B33?3)I
Start the ser/ices on A00S 6ier as appltest user:
pdate t'e V4= profile and perfor# a 'ealt' c'ec% b+ sub#ittin,Active users reuest.
;ote:Apac'e needs to be started it' root user.
Reference:
7eference: 9H8512.1 Case tud+: ?#ple#entin, for business uite 11i usin,;e !ersi,n Nlobal Certificates
12591.1 Nuide to nderstandin, and ?#ple#entin, for @racleApplications
ac%up of D!2"production2.x#l 'as been ta%en in t'e /d1/oradev2/idba/ac%up.rrr 1 oradev2 dba 128 Apr 2 12:28 D!2"production2.x#l
Additional 7eference:
ac%up of 4;"AD=?; 'as been ta%en in /d1/oradev2/idba/ac%up/tnsad#in.
rrr 1 oradev2 dba 12 Apr 2 12:1H listener.orarrr 1 oradev2 dba 2 Apr 2 12:1H listener"ifile.ora
rrr 1 oradev2 dba 2 Apr 2 12:1H slnet"ifile.orarrr 1 oradev2 dba 250 Apr 2 12:1H tnsna#es.ora
Additional 7eference:ac%up of folloin, files 'as been in t'e belo #entioned pat'.
C@;4R4"
8/10/2019 Headstrong Cloning Steps Using RMAN-1
14/15
ac%up dir /d2/erptest"b%p/D!2"erptest.x#l
4;"AD=?;- /d1/appldev2/dev2ora/.0./netor%/ad#in/D!2"erptestac%up dir- /d2/erptest"b%p/tns"ad#in/d2/erptest"b%p/tns"ad#in
bas'5.00$ ls lrttotal 10rrr 1 appldev2 dba 198H Apr 28 10:8 listener.orarrr 1 appldev2 dba 22 Apr 28 10:8 tnsna#es.ora;! files: ac%up dir - +d2/erptest"b%p/envbas'5.00$ ls lrttotal 19rrr 1 appldev2 dba 1001 Apr 2 12:09 A>>@7A.envrrr 1 appldev2 dba 1066 Apr 2 12:09 D!2"erptest.envdrxrxrx 2 appldev2 dba 812 Apr 2 12:0 .0.rrr 1 appldev2 dba 915 Apr 2 12:0 D!2"erptest.x#l
related files: ac%up dir - /d2/erptest"b%p/sslbas'5.00$ ls lrttotal 6drxrxrx 6 appldev2 dba 812 Apr 28 10:2 apac'edrxrxrx 9 appldev2 dba 1026 Apr 28 10:2 conf
&loning SS, 4nstance
?f +ou are clonin, alread+ confi,ured to 4ar,et ?nstanceVou need to create ne Certificates on 4ar,et ?nstance.?f tar,et ?nstance as previousl+ confi,ured it' before clonin, ta%e a bac%up of certificates (+ Default certificates are in$?A"@7AC"G@=/Apac'e/Apac'e/certs/apac'e ssl.crt W ssl.%e+) and replace t'e#after clonin,.
?f +ou are not sure about location of Certificates c'ec% folloin, directives in Context
8/10/2019 Headstrong Cloning Steps Using RMAN-1
15/15
s"eb"ssl"certfileK/d1/appldev2/dev2ora/iA/Apac'e/Apac'e/conf/ssl.crt/server.crts"eb"ssl"certc'ainfileK/d1/appldev2/dev2ora/iA/Apac'e/Apac'e/conf/ssl.crt/cabundle.crtbac%up of t'e above files 'as been ta%en in folloin, pat' as #entioned above.
/d2/erptest"b%p/ssl/apac'e/d2/erptest"b%p/ssl/conf
Top Related