You are on page 1of 9

STEP 1Login as Applications file user & run the environment file.

STEP 2 We need to check certain software component versions: (i) Check the version of perl, it should be atleast 5. 5 or above. !o check perl version, !"pe the following command# $ perl #v %ake sure that perl is included in the &A!' (environment variable of user) echo $&A!'*. (ii)Check the version of +,- & +./ which should be atleast 0.0.1 & 0.2.0 or above respectivel". for this t"pe: $ 3ava #version (iii) Check the version of 4ip which should be atleast 5.2 or above.for this t"pe : $ 4ip 6f "ou don7t have following versions, upgrade these software components as per the operating s"stem. STEP 3: 6t is recommendedto appl" the latest A. %inipack & the latest AutoConfig !emplate patch as mentioned in the metalink note 230672.1 but not necessary. STEP 4: !hen we check whether latest ,apid Clone patch is there or not, for this we 8uer" the database whether latest ,apid Clone patch and other prere8uisite patches as mentioned in the metalink document 230672.1 as follows: $ select 9 from A.:;<=> where bug:number?7&patch number7) 6f it shows @ no rows selected @ that means "ou need to appl" the patch. .o ensure that "ou appl" all the patches as per the re8uirement. STEP 5: ,un s"stem configuration on the Application tier: $ $COMMON_TOP/admin/scripts/<SID>/adautocfg.sh <se the A&&> password when prompted. STEP 6: ,un s"stem configuration on the database tier: $ $O !C"#_$OM#/appsuti%/<SID>/scripts/adautocfg.sh <se the A&&> password when prompted. STEP 7: Cop" AutoConfig to the ,.;%> A,ACL-:'A%-: Appl" patch 5B552CB to ac8uire adchkcfg utilit". Create appsutil.4ip file b": $ perl $A.:!A&DbinDadmkappsutil.pl. Autput is located in $A&&L:!A&DadminDoutDappsutil.4ip) cop" appsutil.4ip file to the $A,ACL-:'A%un4ip #o appsutil.4ip STEP 8: =enerate the database conteEt file: $ cd $O !C"#_$OM#/appsuti%/&in ad&%d'm%.sh ti(r)data&as( appsus(r)<!PPSus(r> appspass*d)<!PPSp*d> Autput log is written to: $O !C"#_$OM#/appsuti/out/<SID>/cfgch(c+.t't

STEP 9: =enerate and appl" AutoConfig configuration file: cd $O !C"#_$OM#/appsuti%/&in adconfig.sh cont('tfi%()<CONT#,T> appspass)<!PPSp*d> STEP 10: &repare for source database clone: cd $O !C"#_$OM#/appsuti%/scrips/<SID> ./p(r% adpr(c%on(.p% d&Ti(r STEP 11: &repare for source application clone: cd $COMMON_TOP/admin/scripts/<SID> ./p(r% adpr(c%on(.p% appsTi(r STEP 12: Cop" the application tier file s"stem: Logon to the source s"stem as A&&L%=, and shut down the server processes. Cop" the following application directories from the source to the target nodeDfile s"stem: -!../ Inc. 0 http1//***.2agg3.com $!PP"_TOP $O!_$TM" $O!_-!4! $COMMON_TOP/uti% $COMMON_TOP/c%on( $567 O !C"#_$OM# $i!S O !C"#_$OM# >hut down the source database and cop" it to the target nodeDfile s"stem. ,estart the source database and source application server processes. STEP 13: Configure the target s"stem database sever: cd $O !C"#_$OM#/appsuti%/c%on/&in ./p(r% adcfgc%on(.p% d&Ti(r STEP 14: Configure the target s"stem application tier: cd $COMMON_TOP/c%on(/&in ./p(r% adcfgc%on(.p% appsTi(r ote: !hese steps are for a single node install. 6f "ou are using Aracle Workflow, "ou must update wf:notification:attributes and wf:item:attribute:values.

!"#ti ode $#onin% Pre&c#onin% ste's (so"rce) 0. >etup ,apid Clone appsutil on the .atabase tier p(r% $!D_TOP/&in/adm+appsuti%.p% 5. Autput file is located in $A&&L:!A&DadminDoutDappsutil.4ip 2. Login as A,ACL- user, and cop" the appsutil.4ip file to the $A,ACL-:'A%- director" $ su 8 orac%( (>ource the ,.;%> environment file*

$.A!A:!A&DFCAG!-H!:GA%-I.env (Du 0DoracleDproddbDB.5. D&,A.:apps.env $ cd $O !C"#_$OM# 9 D:MS; $ cp $!PP"_TOP/admin/out/appsuti%.<ip ./ $ un<ip =o appsuti%.<ip J. ,un AutoConfig on the .; tier $O !C"#_$OM#/appsuti%/scripts/<CONT#,T_N!M#>/adautocfg.sh 5. ,un preclone script on the .; tier cd $O !C"#_$OM#/appsuti%/script/<CONT#,T_N!M#>/ p(r% adpr(c%on(.p% d&Ti(r (check log file for errors: $O !C"#_$OM#/appsuti%/%og/<CONT#,T_N!M#>/Stag(D:Ti(r_MMDD,,,,.%og; C. ,un preclone script on the Apps!ier (make sure all Apps services are shutdown* cd $COMMON_TOP/admin/scripts/<CONT#,T_N!M#>/ p(r% adpr(c%on(.p% appsTi(r -!../ Inc. 0 http1//***.2agg3.com (check log file errors: $!PP"_TOP/admin/<CONT#,T_N!M#>/%og/Stag(!ppsTi(r_MMDD,,,,.%og; $#onin% Ste's K. Cop" the following application directories from the source to the target nodeDfile s"stem: $A&&L:!A& $CA%%AG:!A& $A'1 C $A'iA> 1. Login as A,ACL- user, and shutdown database and listener first cd $O !C"#_$OM#/appsuti%/script/<CONT#,T_N!M#>/ add&ct%.sh stop imm(diat( add%nct%.sh stop <"IST#N# _N!M#> 9n((d to supp%3 a %ist(n(r nam(> (?(n th( nam( is 2ust d(fau%t "IST#N# ; Cop" $.A!A:!A& from source to target Cop" $A,ACL-:'A%$#onin% tas( ) Ste's to r"n on t*e tar%et 0. Log on as A,ACL- user on target, and .A GA! source the environment files 5. cd F&A!':!A:G-W:A,ACL-:'A%-IDappsutilDcloneDbin 2. run the clone configuration script $ perl adcfgclone.pl db!ier (P#ease re+ie, t*e T-. i/ recei+ed $0.E 12!P ,*en r"nnin% t*e 'er# scri't) ote:262269.1: 3##e%a# 3nstr"ction ($0.E12!P) 1"rin% adc/%c#one.'# 14tier 0. &lease delete directories: DappDoracleDtestDtestdbDB.5. DappsutilDcloneD3reD3reDlib DappDoracleDtestDtestdbDB.5. DappsutilDcloneD3reD3reDbin 5. &lease create directories lib and bin inside DappDoracleDtestDtestdbDB.5. DappsutilDcloneD3reD3re as s"mbolic links to lib to DappDoracleDtestDtestdbDB.5. DappsutilDcloneD3reDlib bin to DappDoracleDtestDtestdbDB.5. DappsutilDcloneD3reDbin ln Ls ..Dbin bin ln Ls ..Dlib lib

M virtual hostname ? G M target s"stem database name ? !->! M ,AC ? G M !arget A,ACL-:'A%- ? DappDoracleDtestDtestdbDB.5. M !arget s"stem <!L:N6L- ? DusrDtmp M O of .A!A:!A& ? 0 M .A!A:!A& director" ? DappDoracleDtestDtestdata M &reserve displa" O ? P M &ort pool number ? 0 J. After the .; cloning is completed, check the Appl".;!ier:%%..HHHH.log located in the $N#@_O !C"#_$OM#/appsuti%/%og/<CONT#,T_N!M#>/ 5. Apen a clean shell, and login as appltest to >teverogers C. cd F&A!':!A:G-W:CA%%AG:!A&IDcloneDbin -!../ Inc. 0 http1//***.2agg3.com K. ,un cloning script $ p(r% adcfgc%on(.p% appsTi(r A&&> password ? apps Qirtual hostname ? G !arget s"stem >6. ? A,CL !arget s"stem database node ? FnodenameI !arget s"stem domain name ? Fcompan"I.com %ore than 0 apps tier ? G A&&L:!A& divided into multiple mount points ? G A&&L:!A& mount point ? DappDoracleDtestDtestappl CA%%AG:!A& mount point ? DappDoracleDtestDtestcomn 1. .C A,ACL-:'A%- ? DappDoracleDtestDtestoraD1. .C iA> home ? DappDoracleDtestDtestoraDiA> &ort pool number ? <!L:N6L- director" for A&&L!%& ? 0 Post&insta##ation tas(s M &urge and flush 8ueues # list of programs for purging, initiate data purge programs from the Concurrent ,e8uest M <pdate profile options L onl" site level profile options will be cloned, user level needs to be ad3usted L Change >ite Game profile value M %ust manuall" set the node name as this is a single node to multi#node clone M %ust run .e#in( -''#ication Pro%rams after clone L shutdown all services first, then start all services after relinking. Atherwise, concurrent manager will not start

!his article describes step b" step approach to clone Aracle ,AC databases using an ,%AG hot backup. Ste's to 4e cond"cted on So"rce 15 Ste' 1: 6dentif" number of online redo log groups available with the database using: SQL> SELECT * FROM GV$LOGFILE; !his step is re8uired to switch logs those man" times before starting hot backup (>tep 2*. !his will make sure that all the online redo logs are archived. Nor eEample, if "ou have J online redo log groups, switch logs J times. Anline redo logs can be switched using: SQL> ALTER SYSTEM SWITCH LOGFILE; Ste' 2: Gote the latest archive log file name from archive destination director". Ste' 3: !ake hot backup tablespace b" tablespace, cop"ing datafiles to desired location. -Eecute following script to get a spool file (hotbackup.s8l*, which in turn can be used to take hot backup. OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO spool hotbac !p"s#l $ECLARE C%RSOR &'(l)s IS SELECT tabl)spac)*+a,)-'(l)*+a,) FROM &ba*&ata*'(l)s OR$ER .Y b/t)s $ESC; .EGI0 $.MS*O%T1%T"E0A.LE234444445; FOR ( I0 &'(l)s LOO1 $.MS*O%T1%T"1%T*LI0E 26alt)7 tabl)spac) 688 ("tabl)spac)*+a,) 886 b)9(+ bac !p;65; $.MS*O%T1%T"1%T*LI0E 26:cp 6 88 ("'(l)*+a,) 88 6;!<<;o7a&ata;clo+)65; $.MS*O%T1%T"1%T*LI0E 26alt)7 tabl)spac) 6 88 ("tabl)spac)*+a,) 88 6 )+& bac !p;65; E0$ LOO1; E0$; spool o'' OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO

Gote: Change hot backup location RDuBBDoradataDcloneR used in the script as re8uired. !ake hot backup b" eEecuting the spool file. SQL> =hotbac !p"s#l Ste' 4: Ance hot backup is complete, again switch logfiles as man" number of times as those online redo log groups (same as >tep 0*. Ste' 5: Again, note the latest archive log file name from archive destination director". %ove all archive log files created during hot backup to destination .; Rdb:recover":file:destR parameter location. Ste' 6: !ake backup of control file to trace and move it to destination .; location. !his trace file contents will be used to generate new control files at destination. SQL> ALTER $ATA.ASE .AC>%1 CO0TROLFILE TO TRACE;

Ste's to 4e cond"cted on 1estination 15


Ste' 7: -dit control file b" removing all the statements eEcept RC,-A!- CAG!,AL N6L- ... ,->-!LA=>R statement.

Change

R,-<>-

.A!A;A>-R

to

R>-!

.A!A;A>-R

Change .;GA%- (>ource database name to appropriate .estination .; name* ,etain entries related to online redo log groups for the first instance and remove all other redo log groups.

Change .atafileD,edo log locations and cop" those files from hot backup to the location specified in controlfile. After making above changes, the control file should look something like this. OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO CREATE CO0TROLFILE SET $ATA.ASE ?1RE1RO$? RESETLOGS ARCHIVELOG MA@LOGFILES 3<A MA@LOGMEM.ERS B MA@$ATAFILES 34AC MA@I0STA0CES BA MA@LOGHISTORY <BCC LOGFILE GRO%1 3 2 6;!<<;o7a&ata;clo+);7)&o3*43a"7&o6

6;!<<;o7a&ata;clo+);7)&o3*43b"7&o6 5 SIDE C44MGRO%1 A 2 6;!<<;o7a&ata;clo+);7)&o3*4Aa"7&o66;!<<;o7a&ata;clo+);7)&o3*4Ab"7&o6 5 SIDE C44MGRO%1 B 2 6;!<<;o7a&ata;clo+);7)&o3*4Ba"7&o66;!<<;o7a&ata;clo+);7)&o3*4Bb"7&o6 5 SIDE C44MGRO%1 C 2 6;!<<;o7a&ata;clo+);7)&o3*Ca"7&o66;!<<;o7a&ata;clo+);7)&o3*Cb"7&o6 5 SIDE C44M $ATAFILE 6;!<<;o7a&ata;clo+);s/st),43"&b'66;!<<;o7a&ata;clo+);!+&otbs43"&b'6 6;!<<;o7a&ata;clo+);s/sa!E43"&b'66;!<<;o7a&ata;clo+);!+&otbs4A"&b'66;!<<;o7a&ata;clo+);!+&otbs4B"&b'66;!<<;o7a&ata;clo+);!+&otbs4C"&b'66;!<<;o7a&ata;clo+);a!&(t*&ata"&b'66;!<<;o7a&ata;clo+);a!&(t*(+&)E"&b'66;!<<;o7a&ata;clo+);c!st*&ata"&b'66;!<<;o7a&ata;clo+);c!st*(+&)E"&b'66;!<<;o7a&ata;clo+);app*&ata"&b'66;!<<;o7a&ata;clo+);app*(+&)E"&b'66;!<<;o7a&ata;clo+);app*h(st*&ata"&b'66;!<<;o7a&ata;clo+);app*h(st*(+&)E"&b'66;!<<;o7a&ata;clo+);blob*&ataBA*a,h"&b'66;!<<;o7a&ata;clo+);blob*&ataBA*och"&b'66;!<<;o7a&ata;clo+);+ot)*&ata"&b'66;!<<;o7a&ata;clo+);+ot)*(+&)E"&b'66;!<<;o7a&ata;clo+);loo !p*&ata"&b'66;!<<;o7a&ata;clo+);loo !p*(+&)E"&b'66;!<<;o7a&ata;clo+);7!l)*&ata"&b'66;!<<;o7a&ata;clo+);7!l)*(+&)E"&b'66;!<<;o7a&ata;clo+);#!)!)*&ata"&b'66;!<<;o7a&ata;clo+);#!)!)*(+&)E"&b'6 CHARACTER SET WEFISOFFG<13; OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO Ste' 8: =et eEisting pfile from destination .; b" using: SQL> CREATE 1FILEH6;!<<;p'(l)*&b+a,)"o7a6 FROM S1FILE;

-dit this parameter file b" changing CL<>!-,:.A!A;A>- parameter to NAL>-. C,-A!CAG!,ALN6L- command needs the database to be mounted eEclusivel" and b" setting CL<>!-,:.A!A;A>-?NAL>-, database can be mounted eEclusivel". Ste' 9: >hutdown destination database (all nodes* and take a cold backup of datafiles, redo logfiles, controlfiles, etc., if re8uired. >hutdown database b" shutting each instance b" using following command. SQL> SH%T$OW0 IMME$IATE; Atherwise, use following command from A> s7Ictl stop &atabas) J& K&b+a,)> Ste' 10: >tart the database in nomount stage using pfile created in step 1 using: SQL> START%1 0OMO%0T 1FILEH6;!<<;p'(l)*&b+a,)"o7a6; Ste' 11: 6n nomount stage, create controlfile using edited backup controlfile (from >tep K*. !his step creates control files as mentioned in pfile Rcontrol:filesR parameter. Ste' 12: Gow, recover database using: SQL> RECOVER $ATA.ASE %SI0G .AC>%1 CO0TROLFILE %0TIL CA0CEL; >tart feeding archive logs one b" one using: SQL> SELECT * FROM GV$ARCHIVE$*LOG WHERE KCHA0GE*0%M.ER> .ETWEE0 FIRST*CHA0GEL A0$ 0E@T*CHA0GEL A0$ THREA$LHKTHREA$*0%M.ER> Ste' 13: Ance recover" is complete, open the database using resetlogs to start with new redologs. SQL> ALTER $ATA.ASE O1E0 RESETLOGS; Gow the database should be up and running and read" to use. Ste' 14: Create as man" temporar" tablespaces as the" are in source .; with destination .;. !hose temporar" tablespace metadata entries would be present in destination .;, but temp files wouldn7t be present under those temporar" tablespaces. Nor eEample, tempfiles can be created using: SQL> ALTER TA.LES1ACE Ktabl)spac)*+a,)> M;!<<;o7a&ata;clo+);t),po7a7/43"&b'N s(O) A4G A$$ TEM1FILE

Ste' 15: While creating control files (in >tep K*, online redo log groups and members were created onl" for the first instance in the database. Anline redo logs has to be created for other instances also. Create as man" online redo log files as the" are on source .; in destination .;. Nor eEample: SQL> ALTER $ATA.ASE A$$ LOGFILE THREA$ 26;!<<;o7a&ata;clo+);7)&oA*Ga"7&o66;!<<;o7a&ata;clo+);7)&oA*Gb"7&o65 SIDE C44M; A GRO%1 G

Ste' 16: >hutdown the instance (onl" one node is up as of now*, edit pfile with cluster:database?true parameter and start the database (all nodes*. Ste' 17: >hutdown the database and take a cold backup if re8uired.

You might also like