You are on page 1of 30

Yahoo!

White Paper

Oracle 11g RMAN Active Database Feature

By, Vishal Thammali Joseprakash Vincent Y!DATA Team

Yahoo! White Paper

Introduction Oracle 11g offers new features for creating a hysical !tan"#y "ata#ase an" clone or refresh from the acti$e pro"uction "ata#ase% This can #e accomplishe" using &'A()s D* +,-AT. /&O' A-T,V. DATABA!. feature%

An enhancement to the "uplicate "ata#ase feature is that the physical stan"#y or clone "ata#ase has a "ifferent "ata#ase i"entifier 0DB,D1 from the source "ata#ase which remo$es the hassle of registering this "ata#ase in &'A( catalog% 2e can "uplicate a "ata#ase in two ways3 1% Acti$e "ata#ase "uplication 4% Backup5#ase" "uplication Acti$e "ata#ase "uplication copies the li$e target "ata#ase o$er the network to the au6iliary "estination an" creates the "uplicate "ata#ase% The "ifference is that we "on7t nee" to ha$e the pre5e6isting &'A( #ackups since the files of the acti$e "ata#ase are copie" o$er the network% The "uplication is performe" #y the au6iliary channel%
+et)s "iscuss in "etail a#out the two features of Acti$e "ata#ase "uplication%

Yahoo! White Paper


Part I !reating Ph"sical #tandb" $sing RMAN D$P%I!A&' FROM A!&I(' DA&A)A#'* 'nviron+ent rimary DB8*(,9*.8(A'.3 #fora:4t8#f1 !tan"#y DB8*(,9*.8(A'.3 #fora:4t8sp184 Data#ase (ame3 #fora:4t rimary host3 #f15ora"#5::;<5=>%"ata%corp%#f1%yahoo%com !tan"#y host3 sp15ora"#5::?%"ata%corp%sp1%yahoo%com Oracle software $ersion3 Oracle Data#ase 11g .nterprise ."ition &elease 11%4%:%4%: Note This "ocument is prepare" #ase" on the fact that primary "ata#ase is using spfile an" (OT pfile% Overvie, 1% 'ake the necessary changes to the primary "ata#ase% a1 .na#le force logging@archi$elog mo"e% b) -reating the passwor" file an" copy to stan"#y if one "oes not e6ist% c1 -reate stan"#y re"ologs% 4% .nsure that the sAlBnet connecti$ity is working fine% a1 -onfigure tnsnames%ora on rimary an" hysical !tan"#y "ata#ases% #1 -onfigure listener%ora on stan"#y "ata#ase an" start@restart the listener% c1 !et the ser$ice8names parameter an" check the connecti$ity C% -reate the stan"#y "ata#ase o$er the network using the acti$e 0primary1 "ata#ase files% a1 -reate the initialiDation parameter file for the stan"#y "ata#ase 0au6iliary "ata#ase1 #1 -reate the necessary mount points or the fol"ers for the "ata#ase files c1 !et the en$ an" startup nomount on stan"#y% "1 -reate the input file with the reAuire" parameters to #e set on physical stan"#y in a config file% e1 &un the stan"#y creation O( !TA(DBY #y connecting to primary as target "ata#ase% 0The actual &'A( D* +,-AT. /&O' A-T,V. DATABA!. comman"%1 <% !tart the 'anage" &eco$ery rocess 0'& 1, check for the log shipping an" apply%

Yahoo! White Paper


#tep b" #tep procedure 1% repare the pro"uction "ata#ase to #e the primary "ata#ase a% .nsure that the "ata#ase is in archi$elog mo"e an" /orce +ogging .na#le"% ,f not set those $alues appropriately% The e6pecte" O@ shoul" #e3 !9+E select log8mo"e from $F"ata#aseG A&-H,V.+OI !9+E select force8logging from $F"ata#aseG Y.! #% -reate the passwor" file on the rimary an" !tan"#y host -opy the passwor" file from the primary FO&A-+.8HO'.@"#s an" rename it to the stan"#y "ata#ase name% The username is reAuire" to #e !Y! an" the passwor" nee"s to #e the same on the rimary an" !tan"#y% The #est practice for this is to copy the passwor" file as suggeste"% The passwor" file name must match the instance name@!,D use" at the stan"#y site, not the DB8(A'.% orapw" passwor"JKsyspasw"E fileJorapw#fora:4t1 forceJy ignorecaseJy Note .nsure that the same passwor" is use" as the on stan"#y use" while creating the passwor" file on the rimary host% -reate stan"#y re"o logs appropriately as reAuire", if not alrea"y present on primary DB% 4% .nsure that the sAlBnet connecti$ity is working fine% a% A"" the following entries to the tnsnames%ora file on #oth rimary as well as !tan"#y hosts%

Yahoo! White Paper


#fora:4t8#f1 J 0D.!-&, T,O( J 0ADD&.!! J 0 &OTO-O+ J T- 10HO!T J #f15ora"#5::<5 $%"ata%corp%#f1%yahoo%com10 O&T J 1=4111 0ADD&.!! J 0 &OTO-O+ J T- 10HO!T J #f15ora"#5::=5 $%"ata%corp%#f1%yahoo%com10 O&T J 1=4111 0+OAD8BA+A(-. J on10-O((.-T8DATA J0!.&V.& J D.D,-AT.D1 0!.&V,-.8(A'. J #fora:4t%"ata%corp%#f1%yahoo%com111 #fora:4t8sp184 J 0D.!-&, T,O( J 0ADD&.!! J 0 &OTO-O+ J T- 10HO!T J sp15ora"#5 ::?%"ata%corp%sp1%yahoo%com10 O&T J 1=4111 0+OAD8BA+A(-. J on10-O((.-T8DATA J0!.&V.& J D.D,-AT.D1 0!.&V,-.8(A'. J #fora:4t%"ata%corp%sp1%yahoo%com111 #% On the !tan"#y host, a"" a static entry in the listener%ora file an" reloa" or restart the listener% +,!T.(.& J 0D.!-&, T,O(8+,!T J 0D.!-&, T,O( J 0ADD&.!! J 0 &OTO-O+ J T- 10HO!T J sp15ora"#5 ::?%"ata%corp%sp1%yahoo%com10 O&T J 1=411111 !,D8+,!T8+,!T.(.& J 0!,D8+,!T J 0!,D8D.!- J 0I+OBA+8DB(A'. J #fora:4t8sp1841 0O&A-+.8HO'. J @home@oracle@pro"uct@11%41 0!,D8(A'. J #fora:4t1111 c% The "ata#ase initially ha" a ser$ice8names $alue of 7#fora:4t8sp1847% 2e ha$e "efine" the network configuration files using "istinct ser$ice names to match the "#8uniAue8name $alues on #oth rimary as well as !tan"#y locations% 2e now nee" to change the ser$ice8names parameter an" then we can test connecti$ity from the stan"#y using the T(! aliases that we set up in the earlier step% !9+E alter system set ser$ice8namesJ7#fora:4t8sp1847 scopeJ#othG !ystem altere"% !9+E show parameter ser$ice ser$ice8names string #fora:4t8sp184

Yahoo! White Paper


On sp15ora"#5::?%"ata%corp%sp1%yahoo%com 3 5#ash5C%4F sAlplus sys@BBBBL#fora:4t8#f1 as sys"#a !9+B lus3 &elease 11%4%:%4%: ro"uction on 2e" Oct 1M 4131C3<N 4:11 -opyright 0c1 1MO4, 4:1:, Oracle% All rights reser$e"% -onnecte" to3 Oracle Data#ase 11g .nterprise ."ition &elease 11%4%:%4%: 5 ?<#it ro"uction 2ith the artitioning, &eal Application -lusters, O+A , Data 'ining an" &eal Application Testing options !9+E select host8name from $FinstanceG #f15ora"#5::<%"ata%corp%#f1%yahoo%com C% -reate the stan"#y "ata#ase o$er the network using the acti$e 0primary1 "ata#ase files% a% -reate an initialiDation parameter with only one parameter DB8(A'. On !tan"#y DB Host3 c" FO&A-+.8HO'.@"#s $i init#fora:4t1%ora DB8(A'. J #fora:4t ,nsert this parameter #% -reate the necessary "irectories in the stan"#y location to place the "atafiles an" the trace files in the FAD&8HO'.% c% !et the en$ironment $aria#le O&A-+.8!,D to the stan"#y an" startup (O'O*(T the stan"#y5instance%

Yahoo! White Paper


5#ash5C%4F e6port O&A-+.8!,DJ#fora:4t1 5#ash5C%4F sAlplus @ as sys"#a !9+B lus3 &elease 11%4%:%4%: ro"uction on 2e" Oct 1M 4131N34N 4:11 -opyright 0c1 1MO4, 4:1:, Oracle% All rights reser$e"% -onnecte" to an i"le instance% !9+E startup nomount O&A-+. instance starte"% Total !ystem Ilo#al Area 41N1=N?C4 #ytes /i6e" !iDe 444=:?< #ytes Varia#le !iDe 1=MCO?N14 #ytes Data#ase Buffers =:CC1?<O #ytes &e"o Buffers =41<4:O #ytes "% -reate the input file 0acti$e8stan"#y%rc$13 ;oracleL#f15ora"#5::<>PQ cat acti$e8stan"#y%rc$ D* +,-AT. TA&I.T DATABA!. /O& !TA(DBY /&O' A-T,V. DATABA!. DO&.-OV.& DB8/,+.8(A'.8-O(V.&T J 7@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@#fora:4t@7 ! /,+. !.T DB8*(,9*.8(A'.J7#fora:4t8sp1847 !.T +OI8A&-H,V.8D.!T84J7ser$iceJ#fora:4t8#f1 +I2& !Y(- &.I,!T.& VA+,D8/O&J0online8logfile,primary8role17 !et !TA(DBY8/,+.8'A(AI.'.(TJ7A*TO7 !.T /A+8!.&V.&J7#fora:4t8#f17 !.T /A+8-+,.(TJ7#fora:4t8sp1847 !.T -O(T&O+8/,+.!J7@u:1@ora"ata@#fora:4t@control:1%ctl7,7@u:4@ora"ata@#fora:4t@control:4% ctl7 !.T -+*!T.&8DATABA!.J7/A+!.7 !.T +OI8/,+.8(A'.8-O(V.&T J 7@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@#fora:4t@7 (O/,+.(A'.-H.-R G

Yahoo! White Paper


e% /rom the rimary host, run the following &'A( comman" to create the !tan"#y Data#ase3 ;oracleL#f15ora"#5::<>PQ r+an target s"s-...../b0ora12t3b01 au4iliar" s"s-...../b0ora12t3sp132 c+d0ile5-ho+e-oracle-active3standb"*rcv log5cre3actv3stndb"*log '4a+ple Output The #elow is the log file generate" #y the a#o$e comman", which shows all the acti$ity "one #y the &'A(3 ;oracleL#f15ora"#5::<>PQ cat cre8act$8stn"#y%log &eco$ery 'anager3 &elease 11%4%:%4%: 5 ro"uction on 2e" Oct 1M 1?3:434M 4:11 -opyright 0c1 1MO4, 4::M, Oracle an"@or its affiliates% All rights reser$e"% connecte" to target "ata#ase3 B/O&A:4T 0DB,DJ4O?:1O4N411 connecte" to au6iliary "ata#ase3 B/O&A:4T 0not mounte"1 &'A(E D* +,-AT. TA&I.T DATABA!. 4E /O& !TA(DBY CE /&O' A-T,V. DATABA!. <E DO&.-OV.& =E DB8/,+.8(A'.8-O(V.&T J 7@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@#fora:4t@7 ?E ! /,+. NE !.T DB8*(,9*.8(A'.J7#fora:4t8sp1847 OE !.T +OI8A&-H,V.8D.!T84J7ser$iceJ#fora:4t8#f1 +I2& !Y(- &.I,!T.& VA+,D8/O&J0online8logfile,primary8role17 ME !et !TA(DBY8/,+.8'A(AI.'.(TJ7A*TO7 1:E !.T /A+8!.&V.&J7#fora:4t8#f17 11E !.T /A+8-+,.(TJ7#fora:4t8sp1847 14E !.T -O(T&O+8/,+.!J7@u:1@ora"ata@#fora:4t@control:1%ctl7,7@u:4@ora"ata@#fora:4t@control:4% ctl7 1CE !.T -+*!T.&8DATABA!.J7/A+!.7 1<E !.T +OI8/,+.8(A'.8-O(V.&T J 7@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@#fora:4t@7 1=E (O/,+.(A'.-H.-R 1?E G 1NE !tarting Duplicate D# at 1M5O-T511 using target "ata#ase control file instea" of reco$ery catalog allocate" channel3 O&A8A*S8D,!R81 channel O&A8A*S8D,!R813 !,DJ1C= "e$ice typeJD,!R

Yahoo! White Paper


contents of 'emory !cript3 T #ackup as copy reuse targetfile 7@home@oracle@pro"uct@11%4@"#s@orapw#fora:4t17 au6iliary format 7@home@oracle@pro"uct@11%4@"#s@orapw#fora:4t17 targetfile 7@u:=@ora8"#s@spfile#fora:4t%ora7 au6iliary format 7@home@oracle@pro"uct@11%4@"#s@spfile#fora:4t1%ora7 G sAl clone Ualter system set spfileJ 77@home@oracle@pro"uct@11%4@"#s@spfile#fora:4t1%ora77UG V e6ecuting 'emory !cript !tarting #ackup at 1M5O-T511 allocate" channel3 O&A8D,!R81 channel O&A8D,!R813 !,DJ1C<= instanceJ#fora:4t1 "e$ice typeJD,!R /inishe" #ackup at 1M5O-T511 sAl statement3 alter system set spfileJ 77@home@oracle@pro"uct@11%4@"#s@spfile#fora:4t1%ora77 contents of 'emory !cript3 T sAl clone Ualter system set "#8uniAue8name J 77#fora:4t8sp18477 commentJ 7777 scopeJspfileUG sAl clone Ualter system set +OI8A&-H,V.8D.!T84 J 77ser$iceJ#fora:4t8#f1 +I2& !Y(- &.I,!T.& VA+,D8/O&J0online8logfile,primary8role177 commentJ 7777 scopeJspfileUG sAl clone Ualter system set !TA(DBY8/,+.8'A(AI.'.(T J 77A*TO77 commentJ 7777 scopeJspfileUG sAl clone Ualter system set /A+8!.&V.& J 77#fora:4t8#f177 commentJ 7777 scopeJspfileUG sAl clone Ualter system set /A+8-+,.(T J 77#fora:4t8sp18477 commentJ 7777 scopeJspfileUG sAl clone Ualter system set -O(T&O+8/,+.! J 77@u:1@ora"ata@#fora:4t@control:1%ctl77, 77@u:4@ora"ata@#fora:4t@control:4%ctl77 commentJ 7777 scopeJspfileUG sAl clone Ualter system set -+*!T.&8DATABA!. J /A+!. commentJ 7777 scopeJspfileUG sAl clone Ualter system set +OI8/,+.8(A'.8-O(V.&T J

Yahoo! White Paper


77@u:O@ora"ata@#fora:4t@77, 77@u:4@ora"ata@#fora:4t@77 commentJ 7777 scopeJspfileUG shut"own clone imme"iateG startup clone nomountG V e6ecuting 'emory !cript sAl statement3 alter system set "#8uniAue8name J 77#fora:4t8sp18477 commentJ 7777 scopeJspfile sAl statement3 alter system set +OI8A&-H,V.8D.!T84 J 77ser$iceJ#fora:4t8#f1 +I2& !Y(- &.I,!T.& VA+,D8/O&J0online8logfile,primary8role177 commentJ 7777 scopeJspfile sAl statement3 alter system set !TA(DBY8/,+.8'A(AI.'.(T J 77A*TO77 commentJ 7777 scopeJspfile sAl statement3 alter system set /A+8!.&V.& J 77#fora:4t8#f177 commentJ 7777 scopeJspfile sAl statement3 alter system set /A+8-+,.(T J 77#fora:4t8sp18477 commentJ 7777 scopeJspfile sAl statement3 alter system set -O(T&O+8/,+.! J 77@u:1@ora"ata@#fora:4t@control:1%ctl77, 77@u:4@ora"ata@#fora:4t@control:4%ctl77 commentJ 7777 scopeJspfile sAl statement3 alter system set -+*!T.&8DATABA!. J /A+!. commentJ 7777 scopeJspfile sAl statement3 alter system set +OI8/,+.8(A'.8-O(V.&T J 77@u:O@ora"ata@#fora:4t@77, 77@u:4@ora"ata@#fora:4t@77 commentJ 7777 scopeJspfile Oracle instance shut "own connecte" to au6iliary "ata#ase 0not starte"1 Oracle instance starte" Total !ystem Ilo#al Area /i6e" !iDe Varia#le !iDe Data#ase Buffers &e"o Buffers 4NCMC1ONO< #ytes

444M=?: #ytes 41O1:<:O<: #ytes =C?ON:M14 #ytes 1M1NN<N4 #ytes

contents of 'emory !cript3 T

Yahoo! White Paper


#ackup as copy current controlfile for stan"#y au6iliary format 7@u:1@ora"ata@#fora:4t@control:1%ctl7G restore clone controlfile to 7@u:O@ora"ata@#fora:4t@control:4%ctl7 from 7@u:1@ora"ata@#fora:4t@control:1%ctl7G V e6ecuting 'emory !cript !tarting #ackup at 1M5O-T511 using channel O&A8D,!R81 channel O&A8D,!R813 starting "atafile copy copying stan"#y control file output file nameJ@u:1@ora"ata@#fora:4t@snapcf8#fora:4t1%f tagJTAI4:111:1MT4C:C44 &.-,DJC !TA' JN?<MO44:O channel O&A8D,!R813 "atafile copy complete, elapse" time3 ::3::31= /inishe" #ackup at 1M5O-T511 !tarting restore at 1M5O-T511 allocate" channel3 O&A8A*S8D,!R81 channel O&A8A*S8D,!R813 !,DJ11<M "e$ice typeJD,!R channel O&A8A*S8D,!R813 copie" control file copy /inishe" restore at 1M5O-T511 contents of 'emory !cript3 T sAl clone 7alter "ata#ase mount stan"#y "ata#ase7G V e6ecuting 'emory !cript sAl statement3 alter "ata#ase mount stan"#y "ata#ase contents of 'emory !cript3 T set newname for tempfile 1 to U@u:<@ora"ata@#fora:4t@temp::1%"#fUG set newname for tempfile 4 to U@u:<@ora"ata@#fora:4t@temp::4%"#fUG set newname for tempfile C to U@u:<@ora"ata@#fora:4t@temp::C%"#fUG set newname for tempfile < to U@u:<@ora"ata@#fora:4t@temp::<%"#fUG switch clone tempfile allG set newname for "atafile 1 to U@u:<@ora"ata@#fora:4t@system::1%"#fUG set newname for "atafile 4 to U@u:<@ora"ata@#fora:4t@sysau6::1%"#fUG

Yahoo! White Paper


set newname for "atafile C to % % % set newname for "atafile 4C to U@u:<@ora"ata@#fora:4t@#r8::=%"#fUG #ackup as copy reuse "atafile 1 au6iliary format U@u:<@ora"ata@#fora:4t@system::1%"#fU "atafile 4 au6iliary format U@u:<@ora"ata@#fora:4t@sysau6::1%"#fU "atafile C au6iliary format U@u:<@ora"ata@#fora:4t@e6pt#s%"#fU "atafile < au6iliary format U@u:<@ora"ata@#fora:4t@impt#s%"#fU "atafile % % % 44 au6iliary format U@u:<@ora"ata@#fora:4t@#r8::<%"#fU "atafile 4C au6iliary format U@u:<@ora"ata@#fora:4t@#r8::=%"#fU G sAl 7alter system archi$e log current7G V e6ecuting 'emory !cript e6ecuting comman"3 !.T (.2(A'. rename" tempfile 1 to @u:<@ora"ata@#fora:4t@temp::1%"#f in control file rename" tempfile 4 to @u:<@ora"ata@#fora:4t@temp::4%"#f in control file rename" tempfile C to @u:<@ora"ata@#fora:4t@temp::C%"#f in control file rename" tempfile < to @u:<@ora"ata@#fora:4t@temp::<%"#f in control file e6ecuting comman"3 !.T (.2(A'. % % e6ecuting comman"3 !.T (.2(A'. e6ecuting comman"3 !.T (.2(A'. !tarting #ackup at 1M5O-T511 using channel O&A8D,!R81 channel O&A8D,!R813 starting "atafile copy input "atafile file num#erJ::::4 nameJ@u:<@ora"ata@#fora:4t@sysau6::1%"#f output file nameJ@u:<@ora"ata@#fora:4t@sysau6::1%"#f tagJTAI4:111:1MT4C:<:? channel O&A8D,!R813 "atafile copy complete, elapse" time3 ::3:C3=<

Yahoo! White Paper


channel O&A8D,!R813 starting "atafile copy input "atafile file num#erJ::::1 nameJ@u:<@ora"ata@#fora:4t@system::1%"#f output file nameJ@u:<@ora"ata@#fora:4t@system::1%"#f tagJTAI4:111:1MT4C:<:? channel O&A8D,!R813 "atafile copy complete, elapse" time3 ::3::34? channel O&A8D,!R813 starting "atafile copy % % % input "atafile file num#erJ:::44 nameJ@u:<@ora"ata@#fora:4t@#r8::<%"#f output file nameJ@u:<@ora"ata@#fora:4t@#r8::<%"#f tagJTAI4:111:1MT4C:<:? channel O&A8D,!R813 "atafile copy complete, elapse" time3 ::3::3:N channel O&A8D,!R813 starting "atafile copy input "atafile file num#erJ:::4C nameJ@u:<@ora"ata@#fora:4t@#r8::=%"#f output file nameJ@u:<@ora"ata@#fora:4t@#r8::=%"#f tagJTAI4:111:1MT4C:<:? channel O&A8D,!R813 "atafile copy complete, elapse" time3 ::3::3:C /inishe" #ackup at 1M5O-T511 sAl statement3 alter system archi$e log current contents of 'emory !cript3 T #ackup as copy reuse archi$elog like U@u:C@ora"ata@#fora:4t@arch@18CO:8N=4OM?=:=%arcU au6iliary format U@u:C@ora"ata@#fora:4t@arch@18CO:8N=4OM?=:=%arcU archi$elog like U@u:C@ora"ata@#fora:4t@arch@18CO18N=4OM?=:=%arcU au6iliary format U@u:C@ora"ata@#fora:4t@arch@18CO18N=4OM?=:=%arcU archi$elog like U@u:C@ora"ata@#fora:4t@arch@484<18N=4OM?=:=%arcU au6iliary format U@u:C@ora"ata@#fora:4t@arch@484<18N=4OM?=:=%arcU G catalog clone archi$elog U@u:C@ora"ata@#fora:4t@arch@18CO:8N=4OM?=:=%arcUG catalog clone archi$elog U@u:C@ora"ata@#fora:4t@arch@18CO18N=4OM?=:=%arcUG catalog clone archi$elog U@u:C@ora"ata@#fora:4t@arch@484<18N=4OM?=:=%arcUG switch clone "atafile allG V e6ecuting 'emory !cript !tarting #ackup at 1M5O-T511 using channel O&A8D,!R81 channel O&A8D,!R813 starting archi$e" log copy input archi$e" log threa"J1 seAuenceJCO: &.-,DJ4O? !TA' JN?<MNO44C output file nameJ@u:C@ora"ata@#fora:4t@arch@18CO:8N=4OM?=:=%arc &.-,DJ: !TA' J: channel O&A8D,!R813 archi$e" log copy complete, elapse" time3 ::3::3:N channel O&A8D,!R813 starting archi$e" log copy input archi$e" log threa"J1 seAuenceJCO1 &.-,DJ4OM !TA' JN?<MO4NO? output file nameJ@u:C@ora"ata@#fora:4t@arch@18CO18N=4OM?=:=%arc &.-,DJ: !TA' J: channel O&A8D,!R813 archi$e" log copy complete, elapse" time3 ::3::3:N channel O&A8D,!R813 starting archi$e" log copy

Yahoo! White Paper


input archi$e" log threa"J4 seAuenceJ4<1 &.-,DJ4M1 !TA' JN?<MO4NOM output file nameJ@u:C@ora"ata@#fora:4t@arch@484<18N=4OM?=:=%arc &.-,DJ: !TA' J: channel O&A8D,!R813 archi$e" log copy complete, elapse" time3 ::3::3:N /inishe" #ackup at 1M5O-T511 cataloge" archi$e" log archi$e" log file nameJ@u:C@ora"ata@#fora:4t@arch@18CO:8N=4OM?=:=%arc &.-,DJ1 !TA' JN?<MO4O1? cataloge" archi$e" log archi$e" log file nameJ@u:C@ora"ata@#fora:4t@arch@18CO18N=4OM?=:=%arc &.-,DJ4 !TA' JN?<MO4O1N cataloge" archi$e" log archi$e" log file nameJ@u:C@ora"ata@#fora:4t@arch@484<18N=4OM?=:=%arc &.-,DJC !TA' JN?<MO4O1O "atafile 1 switche" to "atafile copy input "atafile copy &.-,DJC !TA' JN?<MO4O1M file nameJ@u:<@ora"ata@#fora:4t@system::1%"#f "atafile 4 switche" to "atafile copy input "atafile copy &.-,DJ< !TA' JN?<MO4O1M file nameJ@u:<@ora"ata@#fora:4t@sysau6::1%"#f % % % "atafile 4C switche" to "atafile copy input "atafile copy &.-,DJ4= !TA' JN?<MO4O4? file nameJ@u:<@ora"ata@#fora:4t@#r8::=%"#f contents of 'emory !cript3 T set until scn ?ONMO:ONG reco$er stan"#y clone "ata#ase "elete archi$elog G V e6ecuting 'emory !cript e6ecuting comman"3 !.T until clause !tarting reco$er at 1M5O-T511 using channel O&A8A*S8D,!R81

Yahoo! White Paper


starting me"ia reco$ery archi$e" log for threa" 1 with seAuence CO1 is alrea"y on "isk as file @u:C@ora"ata@#fora:4t@arch@18CO18N=4OM?=:=%arc archi$e" log for threa" 4 with seAuence 4<1 is alrea"y on "isk as file @u:C@ora"ata@#fora:4t@arch@484<18N=4OM?=:=%arc archi$e" log file nameJ@u:C@ora"ata@#fora:4t@arch@18CO18N=4OM?=:=%arc threa"J1 seAuenceJCO1 archi$e" log file nameJ@u:C@ora"ata@#fora:4t@arch@484<18N=4OM?=:=%arc threa"J4 seAuenceJ4<1 me"ia reco$ery complete, elapse" time3 ::3::311 /inishe" reco$er at 1M5O-T511 /inishe" Duplicate D# at 1M5O-T511 &eco$ery 'anager complete% ;oracleL#f15ora"#5::<>PQ This en"s the logfile% (ow the physical stan"#y "ata#ase has #een create" an" mounte"% Post #teps On Pri+ar" !et the log8archi$e8"est84 $alue as #elow accor"ingly3 !9+E alter system set log8archi$e8"est84J7!.&V,-.J#fora:4t8sp184 +I2& A!Y(-J4:<O: reopenJ?: VA+,D8/O&J0O(+,(.8+OI/,+.!, &,'A&Y8&O+.1 DB8*(,9*.8(A'.J#fora:4t8sp1847 scopeJ#oth si"J7B7G !ystem altere"% Do a Auick sys"#a through the connect string for $erifying the primary sAlplus connection to the physical stan"#y% On #tandb" !tart the '& on the newly create" hysical !tan"#y3 !9+E alter "ata#ase reco$er manage" stan"#y "ata#ase using current logfile "isconnect from sessionG Data#ase altere"%

Yahoo! White Paper


!9+E select ,(!TA(-.8(A'.,HO!T8(A'.,V.&!,O(,!TAT*! from $FinstanceG #fora:4t1 'O*(T.D sp15ora"#5::?%"ata%corp%sp1%yahoo%com 11%4%:%4%:

!9+E select process,status,threa"W,seAuenceW, #lockW from $Fmanage"8stan"#y where process like 7'& Q7G '& : A +Y,(I8+OI 4 4=< :

2e ha$e create" a hysical !tan"#y Data#ase *sing &'A( D* +,-AT. from the acti$e pro"uction #y copying@transferring the files@"ata o$er the network through the tns connect string% Fe, o0 the RMAN Duplicate 0eatures ,hich are o0 interest are as belo, Duplicating a !u#set of the !ource Data#ase Ta#lespaces3 '4cluding Read6Onl" &ablespaces D* +,-AT. TA&I.T DATABA!. TO "up"# /&O' A-T,V. DATABA!. !R, &.ADO(+Y (O/,+.(A'.-H.-RG '4cluding #peci0ied &ablespaces D* +,-AT. TA&I.T DATABA!. TO "up"# /&O' A-T,V. DATABA!. !R, TAB+.! A-. tools (O/,+.(A'.-H.-RG Including #peci0ied &ablespaces D* +,-AT. TA&I.T DATABA!. TO "up"# /&O' A-T,V. DATABA!. TAB+.! A-. users (O/,+.(A'.-H.-RG

Yahoo! White Paper


PAR& II !loning-Re0reshing the active production using RMAN 7Duplicate Fro+
Active Database7 Feature in 118* As part of the "uplicating operation, &'A( automates the following steps3 1% reparing the au6iliary instance3 4% !tart the Au6iliary instance in nomount state using the newly create" pfile% C% -reate the necessary oracle (.T files% <% -reate the input file with the parameters as reAuire"% =% !tart the &'A( D* +,-AT. "ata#ase comman"% Note 2e can "o the refresh from &A- to (O(5&A- as well #y setting the $alue X !.T -+*!T.&8DATABA!.J)/A+!.) X in the input file% 'nviron+ent rimary Data#ase DB8*(,9*.8(A'.3 #fora:4t (ew -lone@&efresh Data#ase DB8*(,9*.8(A'.3 spora:1t ,nstance (ame3 spora:1t1 rimary hostname3 #f15ora"#5::;<5=>%"ata%corp%#f1%yahoo%com -lone DB hostname3 #f15ora"#5::?%"ata%corp%#f1%yahoo%com On which we are refreshing@-loning the DB from pro"uction% Oracle software $ersion3 Oracle Data#ase 11g .nterprise ."ition &elease 11%4%:%4%: 5 ?<#it Note This "ocument is prepare" #ase" on the fact that primary "ata#ase is using spfile an" (OT pfile% #tep b" #tep procedure 1% reparing the au6iliary instance3 a% -reating initialiDation arameter file for the Au6iliary instance ,f you are using ! /,+. then the only parameter reAuire" for the "uplicate "ata#ase is DB8(A'. % &est other parameters can #e set in the D* +,-AT. comman" itself% ,f you are not using the ! /,+. techniAue, then you nee" to set initialiDation parameters to set in the initialiDation parameter file% &eAuire" parameters are 3

Yahoo! White Paper


DB8(A'. -O(T&O+8/,+.! DB8B+O-R8!,Y. DB8/,+.8(A'.8-O(V.&T +OI8/,+.8(A'.8-O(V.&T DB8&.-OV.&Y8/,+.8D.!T As in this test case, we are using primary with spfile, hence create a pfile on au6iliary instance with the #elow parameters3 0*sing XDB8/,+.8(A'.8-O(V.&TZ an" X+OI8/,+.8(A'.8-O(V.&TZ as the source an" "estination mounts are "ifferent 1 ;oracleL#f15ora"#5::?>P@pro"uct@11%4@"#sQ cat initspora:1t1%ora "#8nameJspora:1t DB8/,+.8(A'.8-O(V.&T J 07@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@spora:1t@7,7@u:1@ora"ata@#fora:4t7,7@u:1@ora"ata@sp ora:1t7,7@u:4@ora"ata@#fora:4t7,7@u:4@ora"ata@spora:1t7,7@u:C@ora"ata@#fora:4t7,7@u:C@ora"a ta@spora:1t7,7@u:<@ora"ata@#fora:4t7,7@u:<@ora"ata@spora:1t71 +OI8/,+.8(A'.8-O(V.&T J 07@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@spora:1t@7,7@u:1@ora"ata@#fora:4t7,7@u:1@ora"ata@sp ora:1t71 ;oracleL#f15ora"#5::?>P@pro"uct@11%4@"#sQ #% -reate an Oracle asswor" /ile for the Au6iliary ,nstance3 orapw" passwor"JKsyspasw"E fileJorapwspora:1t1 forceJy ignorecaseJy 4% !tart the Au6iliary instance in nomount state using the newly create" pfile 0initspora:1t1%ora1 ;oracleL#f15ora"#5::?>P@pro"uct@11%4@"#sQ e6port O&A-+.8!,DJ spora:1t1 ;oracleL#f15ora"#5::?>P@pro"uct@11%4@"#sQ sAlplus 7@ as sys"#a7 !9+B lus3 &elease 11%4%:%4%: ro"uction on Tue Oct 4= :13CN3:O 4:11 -opyright 0c1 1MO4, 4:1:, Oracle% All rights reser$e"% -onnecte" to an i"le instance% !9+E startup nomount O&A-+. instance starte"% Total !ystem Ilo#al Area 1=:??N4?< #ytes /i6e" !iDe 1CC1NC4 #ytes Varia#le !iDe M44NO4=4 #ytes Data#ase Buffers =:CC1?<O #ytes &e"o Buffers ?N4=?C4 #ytes

Yahoo! White Paper


C% -reate the necessary oracle (.T connecti$ity in the listener%ora an" the tnsnames%ora file% T(!(A'.!%O&A3 0,n the TA&I.T an" A*S,+,A&Y host1 #fora:4t8#f1 J 0D.!-&, T,O( J 0ADD&.!! J 0 &OTO-O+ J T- 10HO!T J #f15ora"#5::<5 $%"ata%corp%#f1%yahoo%com10 O&T J 1=4111 0ADD&.!! J 0 &OTO-O+ J T- 10HO!T J #f15ora"#5::=5 $%"ata%corp%#f1%yahoo%com10 O&T J 1=4111 0+OAD8BA+A(-. J on10-O((.-T8DATA J0!.&V.& J D.D,-AT.D1 0!.&V,-.8(A'. J #fora:4t%"ata%corp%#f1%yahoo%com111 spora:1t J 0D.!-&, T,O( J 0ADD&.!! J 0 &OTO-O+ J T- 10HO!T J #f15ora"#5 ::?%"ata%corp%#f1%yahoo%com10 O&T J 1=4111 0+OAD8BA+A(-. J on10-O((.-T8DATA J0!.&V.& J D.D,-AT.D1 0!.&V,-.8(A'. J spora:1t%"ata%corp%sp1%yahoo%com111

+,!T.(.&%O&A3 0on the A*S,+,A&Y host @ On the host were we are refreshing it from pro"uction1 +,!T.(.& J 0D.!-&, T,O(8+,!T J 0D.!-&, T,O( J 0ADD&.!! J 0 &OTO-O+ J , -10R.Y J .ST &O-1=4111 0ADD&.!! J 0 &OTO-O+ J T- 10HO!T J #f15ora"#5 ::?%"ata%corp%#f1%yahoo%com10 O&T J 1=411111 !,D8+,!T8+,!T.(.& J 0!,D8+,!T J 0!,D8D.!- J 0I+OBA+8DB(A'. J spora:1t1 0O&A-+.8HO'. J @oracle@pro"uct@11%41 0!,D8(A'. J spora:1t1111 -onfirm the connection to #oth the target an" the au6iliary instance using sAlplus%

Yahoo! White Paper


<% -reate the input file with the parameters as reAuire", e6ample as shown #elow3 ;oracleL#f15ora"#5::<>PQ cat acti$e8"#8refresh%rc$ D* +,-AT. TA&I.T DATABA!. TO spora:1t /&O' A-T,V. DATABA!. DB8/,+.8(A'.8-O(V.&T 07@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@spora:1t@7,7@u:1@ora"ata@#fora:4t7,7@u:1@ora"ata@sp ora:1t7,7@u:4@ora"ata@#fora:4t7,7@u:4@ora"ata@spora:1t7,7@u:C@ora"ata@#fora:4t7,7@u:C@ora"a ta@spora:1t7,7@u:<@ora"ata@#fora:4t7,7@u:<@ora"ata@spora:1t71 ! /,+. !.T DB8(A'.J7spora:1t7 !.T DB8*(,9*.8(A'.J7spora:1t7 !.T +OI8/,+.8(A'.8-O(V.&T J 7@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@spora:1t@7,7@u:1@ora"ata@#fora:4t7,7@u:1@ora"ata@spo ra:1t7 !.T -+*!T.&8DATABA!.J7/A+!.7 G ;oracleL#f15ora"#5::<>PQ =% !tart the &'A( D* +,-AT. "ata#ase comman"3 !tart &'A( an" connect to the source "ata#ase as TA&I.T, the "uplicate "ata#ase instance as A*S,+,A&Y% You can start the &'A( client on any host so long as it can connect to all of the "ata#ase instances% ;oracleL#f15ora"#5::<>PQ r+an target s"s-..../b0ora12t3b01 au4iliar" s"s-..../spora11t c+d0ile5-ho+e-oracle-active3db3re0resh*rcv log5cre3actv3db3re0resh*log The #elow is the log showing the acti$ity "one #y the &'A( "uplicate target "ata#ase comman"3 ;oracleL#f15ora"#5::<>PQ cat cre8act$8"#8refresh%log &eco$ery 'anager3 &elease 11%4%:%4%: 5 ro"uction on /ri Oct 41 4131=3CM 4:11 -opyright 0c1 1MO4, 4::M, Oracle an"@or its affiliates% All rights reser$e"% connecte" to target "ata#ase3 B/O&A:4T 0DB,DJ4O?:1O4N411 connecte" to au6iliary "ata#ase3 ! O&A:1T 0not mounte"1 &'A(E D* +,-AT. TA&I.T DATABA!. 4E TO spora:1t CE /&O' A-T,V. DATABA!. <E DB8/,+.8(A'.8-O(V.&T 07@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@spora:1t@7,7@u:1@ora"ata@#fora:4t7,7@u:1@ora"ata@sp

Yahoo! White Paper


ora:1t7,7@u:4@ora"ata@#fora:4t7,7@u:4@ora"ata@spora:1t7,7@u:C@ora"ata@#fora:4t7,7@u:C@ora"a ta@spora:1t7,7@u:<@ora"ata@#fora:4t7,7@u:<@ora"ata@spora:1t71 =E W /,+. 7@home@oracle@pro"uct@11%4@"#s@initspora:1t1%ora7G ?E ! /,+. NE !.T DB8(A'.J7spora:1t7 OE !.T DB8*(,9*.8(A'.J7spora:1t7 ME !.T +OI8/,+.8(A'.8-O(V.&T J 7@u:O@ora"ata@#fora:4t@7,7@u:4@ora"ata@spora:1t@7,7@u:1@ora"ata@#fora:4t7,7@u:1@ora"ata@spo ra:1t7 1:E !.T -+*!T.&8DATABA!.J7/A+!.7 11E G 14E !tarting Duplicate D# at 415O-T511 using target "ata#ase control file instea" of reco$ery catalog allocate" channel3 O&A8A*S8D,!R81 channel O&A8A*S8D,!R813 !,DJ1C= "e$ice typeJD,!R contents of 'emory !cript3 T #ackup as copy reuse targetfile 7@u:=@ora8"#s@spfile#fora:4t%ora7 au6iliary format 7@oracle@pro"uct@11%4@"#s@spfilespora:1t1%ora7 G sAl clone Ualter system set spfileJ 77@oracle@pro"uct@11%4@"#s@spfilespora:1t1%ora77UG V e6ecuting 'emory !cript !tarting #ackup at 415O-T511 allocate" channel3 O&A8D,!R81 channel O&A8D,!R813 !,DJM?C instanceJ#fora:4t1 "e$ice typeJD,!R /inishe" #ackup at 415O-T511 sAl statement3 alter system set spfileJ 77@oracle@pro"uct@11%4@"#s@spfilespora:1t1%ora77 contents of 'emory !cript3 T sAl clone Ualter system set 77! O&A:1T77 commentJ 77"uplicate77 scopeJspfileUG sAl clone Ualter system set 77! O&A:1T77 commentJ 77"uplicate77 scopeJspfileUG sAl clone Ualter system set 77spora:1t77 commentJ 7777 scopeJspfileUG sAl clone Ualter system set 77spora:1t77 commentJ

"#8name J "#8uniAue8name J "#8name J "#8uniAue8name J

Yahoo! White Paper


7777 scopeJspfileUG sAl clone Ualter system set +OI8/,+.8(A'.8-O(V.&T J 77@u:O@ora"ata@#fora:4t@77, 77@u:4@ora"ata@spora:1t@77, 77@u:1@ora"ata@#fora:4t77, 77@u:1@ora"ata@spora:1t77 commentJ 7777 scopeJspfileUG sAl clone Ualter system set -+*!T.&8DATABA!. J /A+!. commentJ 7777 scopeJspfileUG shut"own clone imme"iateG startup clone nomountG V e6ecuting 'emory !cript sAl statement3 alter system set "#8name J 77! O&A:1T77 commentJ 77"uplicate77 scopeJspfile sAl statement3 alter system set "#8uniAue8name J 77! O&A:1T77 commentJ 77"uplicate77 scopeJspfile sAl statement3 alter system set "#8name J 77spora:1t77 commentJ 7777 scopeJspfile sAl statement3 alter system set "#8uniAue8name J 77spora:1t77 commentJ 7777 scopeJspfile sAl statement3 alter system set +OI8/,+.8(A'.8-O(V.&T J 77@u:O@ora"ata@#fora:4t@77, 77@u:4@ora"ata@spora:1t@77, 77@u:1@ora"ata@#fora:4t77, 77@u:1@ora"ata@spora:1t77 commentJ 7777 scopeJspfile sAl statement3 alter system set -+*!T.&8DATABA!. J /A+!. commentJ 7777 scopeJspfile Oracle instance shut "own connecte" to au6iliary "ata#ase 0not starte"1 Oracle instance starte" Total !ystem Ilo#al Area /i6e" !iDe Varia#le !iDe Data#ase Buffers &e"o Buffers 4NCMC1ONO< #ytes

444M=?: #ytes 41O1:<:O<: #ytes =C?ON:M14 #ytes 1M1NN<N4 #ytes

contents of 'emory !cript3 T

Yahoo! White Paper


sAl clone Ualter system set "#8name J 77B/O&A:4T77 commentJ 77'o"ifie" #y &'A( "uplicate77 scopeJspfileUG sAl clone Ualter system set "#8uniAue8name J 77! O&A:1T77 commentJ 77'o"ifie" #y &'A( "uplicate77 scopeJspfileUG shut"own clone imme"iateG startup clone force nomount #ackup as copy current controlfile au6iliary format 7@oracle@pro"uct@11%4@"#s@cntrlspora:1t1%"#f7G alter clone "ata#ase mountG V e6ecuting 'emory !cript sAl statement3 alter system set "#8name J 77B/O&A:4T77 commentJ 77'o"ifie" #y &'A( "uplicate77 scopeJspfile sAl statement3 alter system set "#8uniAue8name J 77! O&A:1T77 commentJ 77'o"ifie" #y &'A( "uplicate77 scopeJspfile Oracle instance shut "own Oracle instance starte" Total !ystem Ilo#al Area /i6e" !iDe Varia#le !iDe Data#ase Buffers &e"o Buffers 4NCMC1ONO< #ytes

444M=?: #ytes 41O1:<:O<: #ytes =C?ON:M14 #ytes 1M1NN<N4 #ytes

!tarting #ackup at 415O-T511 using channel O&A8D,!R81 channel O&A8D,!R813 starting "atafile copy copying current control file output file nameJ@u:1@ora"ata@#fora:4t@snapcf8#fora:4t1%f tagJTAI4:111:44T:<1?:? &.-,DJ4< !TA' JN?=1NCNN4 channel O&A8D,!R813 "atafile copy complete, elapse" time3 ::3::31= /inishe" #ackup at 415O-T511 "ata#ase mounte" contents of 'emory !cript3 T set newname for "atafile 1 to U@u:<@ora"ata@spora:1t@system::1%"#fUG

Yahoo! White Paper


set newname for "atafile 4 to U@u:<@ora"ata@spora:1t@sysau6::1%"#fUG set newname for "atafile C to U@u:<@ora"ata@spora:1t@e6pt#s%"#fUG set newname for "atafile < to U@u:<@ora"ata@spora:1t@impt#s%"#fUG set newname for "atafile = to % % % 44 au6iliary format U@u:<@ora"ata@spora:1t@#r8::<%"#fU "atafile 4C au6iliary format U@u:<@ora"ata@spora:1t@#r8::=%"#fU G sAl 7alter system archi$e log current7G V e6ecuting 'emory !cript e6ecuting comman"3 !.T (.2(A'. % % e6ecuting comman"3 !.T (.2(A'. !tarting #ackup at 415O-T511 using channel O&A8D,!R81 channel O&A8D,!R813 starting "atafile copy input "atafile file num#erJ::::4 nameJ@u:<@ora"ata@#fora:4t@sysau6::1%"#f output file nameJ@u:<@ora"ata@spora:1t@sysau6::1%"#f tagJTAI4:111:44T:<1?C: channel O&A8D,!R813 "atafile copy complete, elapse" time3 ::3:43== channel O&A8D,!R813 starting "atafile copy input "atafile file num#erJ::::1 nameJ@u:<@ora"ata@#fora:4t@system::1%"#f output file nameJ@u:<@ora"ata@spora:1t@system::1%"#f tagJTAI4:111:44T:<1?C: channel O&A8D,!R813 "atafile copy complete, elapse" time3 ::3::31= channel O&A8D,!R813 starting "atafile copy % % input "atafile file num#erJ:::4C nameJ@u:<@ora"ata@#fora:4t@#r8::=%"#f output file nameJ@u:<@ora"ata@spora:1t@#r8::=%"#f tagJTAI4:111:44T:<1?C: channel O&A8D,!R813 "atafile copy complete, elapse" time3 ::3::3:C /inishe" #ackup at 415O-T511 sAl statement3 alter system archi$e log current contents of 'emory !cript3 T #ackup as copy reuse

Yahoo! White Paper


archi$elog like U@u:C@ora"ata@#fora:4t@arch@18<118N=4OM?=:=%arcU au6iliary format U@oracle@pro"uct@11%4@"#s@arch18<118N=4OM?=:=%arcU archi$elog like U@u:C@ora"ata@#fora:4t@arch@18<148N=4OM?=:=%arcU au6iliary format U@oracle@pro"uct@11%4@"#s@arch18<148N=4OM?=:=%arcU archi$elog like U@u:C@ora"ata@#fora:4t@arch@484?M8N=4OM?=:=%arcU au6iliary format U@oracle@pro"uct@11%4@"#s@arch484?M8N=4OM?=:=%arcU G catalog clone archi$elog U@oracle@pro"uct@11%4@"#s@arch18<118N=4OM?=:=%arcUG catalog clone archi$elog U@oracle@pro"uct@11%4@"#s@arch18<148N=4OM?=:=%arcUG catalog clone archi$elog U@oracle@pro"uct@11%4@"#s@arch484?M8N=4OM?=:=%arcUG switch clone "atafile allG V e6ecuting 'emory !cript !tarting #ackup at 415O-T511 using channel O&A8D,!R81 channel O&A8D,!R813 starting archi$e" log copy input archi$e" log threa"J1 seAuenceJ<11 &.-,DJ<4N !TA' JN?=1NC4M= output file nameJ@oracle@pro"uct@11%4@"#s@arch18<118N=4OM?=:=%arc &.-,DJ: !TA' J: channel O&A8D,!R813 archi$e" log copy complete, elapse" time3 ::3::3:1 channel O&A8D,!R813 starting archi$e" log copy input archi$e" log threa"J1 seAuenceJ<14 &.-,DJ<C4 !TA' JN?=1N<1<C output file nameJ@oracle@pro"uct@11%4@"#s@arch18<148N=4OM?=:=%arc &.-,DJ: !TA' J: channel O&A8D,!R813 archi$e" log copy complete, elapse" time3 ::3::3:1 channel O&A8D,!R813 starting archi$e" log copy input archi$e" log threa"J4 seAuenceJ4?M &.-,DJ<C< !TA' JN?=1N<1<= output file nameJ@oracle@pro"uct@11%4@"#s@arch484?M8N=4OM?=:=%arc &.-,DJ: !TA' J: channel O&A8D,!R813 archi$e" log copy complete, elapse" time3 ::3::3:1 /inishe" #ackup at 415O-T511 cataloge" archi$e" log archi$e" log file nameJ@oracle@pro"uct@11%4@"#s@arch18<118N=4OM?=:=%arc &.-,DJ<C4 !TA' JN?=1N<1=N cataloge" archi$e" log archi$e" log file nameJ@oracle@pro"uct@11%4@"#s@arch18<148N=4OM?=:=%arc &.-,DJ<CC !TA' JN?=1N<1=N cataloge" archi$e" log archi$e" log file nameJ@oracle@pro"uct@11%4@"#s@arch484?M8N=4OM?=:=%arc &.-,DJ<C< !TA' JN?=1N<1=N "atafile 1 switche" to "atafile copy

Yahoo! White Paper


input "atafile copy &.-,DJ4< !TA' JN?=1N<1=N file nameJ@u:<@ora"ata@spora:1t@system::1%"#f "atafile 4 switche" to "atafile copy input "atafile copy &.-,DJ4= !TA' JN?=1N<1=N file nameJ@u:<@ora"ata@spora:1t@sysau6::1%"#f "atafile C switche" to "atafile copy % % "atafile 4C switche" to "atafile copy input "atafile copy &.-,DJ<? !TA' JN?=1N<1=M file nameJ@u:<@ora"ata@spora:1t@#r8::=%"#f contents of 'emory !cript3 T set until scn ?MO1NO1<G reco$er clone "ata#ase "elete archi$elog G V e6ecuting 'emory !cript e6ecuting comman"3 !.T until clause !tarting reco$er at 415O-T511 allocate" channel3 O&A8A*S8D,!R81 channel O&A8A*S8D,!R813 !,DJ11<M "e$ice typeJD,!R starting me"ia reco$ery archi$e" log for threa" 1 with seAuence <14 is alrea"y on "isk as file @oracle@pro"uct@11%4@"#s@arch18<148N=4OM?=:=%arc archi$e" log for threa" 4 with seAuence 4?M is alrea"y on "isk as file @oracle@pro"uct@11%4@"#s@arch484?M8N=4OM?=:=%arc archi$e" log file nameJ@oracle@pro"uct@11%4@"#s@arch18<148N=4OM?=:=%arc threa"J1 seAuenceJ<14 archi$e" log file nameJ@oracle@pro"uct@11%4@"#s@arch484?M8N=4OM?=:=%arc threa"J4 seAuenceJ4?M me"ia reco$ery complete, elapse" time3 ::3::3:4 /inishe" reco$er at 415O-T511 Oracle instance starte" Total !ystem Ilo#al Area /i6e" !iDe Varia#le !iDe 4NCMC1ONO< #ytes

444M=?: #ytes 41O1:<:O<: #ytes

Yahoo! White Paper


Data#ase Buffers &e"o Buffers =C?ON:M14 #ytes 1M1NN<N4 #ytes

contents of 'emory !cript3 T sAl clone Ualter system set "#8name J 77! O&A:1T77 commentJ 77&eset to original $alue #y &'A(77 scopeJspfileUG sAl clone Ualter system reset "#8uniAue8name scopeJspfileUG shut"own clone imme"iateG startup clone nomountG V e6ecuting 'emory !cript sAl statement3 alter system set "#8name J 77! O&A:1T77 commentJ 77&eset to original $alue #y &'A(77 scopeJspfile sAl statement3 alter system reset "#8uniAue8name scopeJspfile Oracle instance shut "own connecte" to au6iliary "ata#ase 0not starte"1 Oracle instance starte" Total !ystem Ilo#al Area 4NCMC1ONO< #ytes

/i6e" !iDe 444M=?: #ytes Varia#le !iDe 41O1:<:O<: #ytes Data#ase Buffers =C?ON:M14 #ytes &e"o Buffers 1M1NN<N4 #ytes sAl statement3 -&.AT. -O(T&O+/,+. &.*!. !.T DATABA!. U! O&A:1TU &.!.T+OI! A&-H,V.+OI 'AS+OI/,+.! 4== 'AS+OI'.'B.&! 4 'ASDATA/,+.! ?==C< 'AS,(!TA(-.! C4 'AS+OIH,!TO&Y C41C +OI/,+. I&O* 4 0 7@u:1@ora"ata@spora:1t@re"o:4a%log7, 7@u:4@ora"ata@spora:1t@re"o:4#%log7 1 !,Y. 1 I &.*!., I&O* 11 0 7@u:1@ora"ata@spora:1t@re"o11a%log7, 7@u:4@ora"ata@spora:1t@re"o11#%log7 1 !,Y. 1 I &.*!., I&O* 14 0 7@u:1@ora"ata@spora:1t@re"o14a%log7, 7@u:4@ora"ata@spora:1t@re"o14#%log7 1 !,Y. 1 I &.*!., I&O* 1C 0 7@u:1@ora"ata@spora:1t@re"o1Ca%log7, 7@u:4@ora"ata@spora:1t@re"o1C#%log7 1 !,Y. 1 I &.*!.,

Yahoo! White Paper


I&O* 1< 0 7@u:1@ora"ata@spora:1t@re"o1<a%log7, 7@u:4@ora"ata@spora:1t@re"o1<#%log7 1 !,Y. 1 I &.*!. DATA/,+. 7@u:<@ora"ata@spora:1t@system::1%"#f7 -HA&A-T.& !.T A+C4*T/O sAl statement3 A+T.& DATABA!. ADD +OI/,+. ,(!TA(-. 7i47 I&O* 41 0 7@u:1@ora"ata@spora:1t@re"o41a%log7, 7@u:4@ora"ata@spora:1t@re"o41#%log7 1 !,Y. 1 I &.*!., I&O* 44 0 7@u:1@ora"ata@spora:1t@re"o44a%log7, 7@u:4@ora"ata@spora:1t@re"o44#%log7 1 !,Y. 1 I &.*!., I&O* 4C 0 7@u:1@ora"ata@spora:1t@re"o4Ca%log7, 7@u:4@ora"ata@spora:1t@re"o4C#%log7 1 !,Y. 1 I &.*!., I&O* 4< 0 7@u:1@ora"ata@spora:1t@re"o4<a%log7, 7@u:4@ora"ata@spora:1t@re"o4<#%log7 1 !,Y. 1 I &.*!. contents of 'emory !cript3 T set newname for tempfile 1 to U@u:<@ora"ata@spora:1t@temp::1%"#fUG set newname for tempfile 4 to U@u:<@ora"ata@spora:1t@temp::4%"#fUG set newname for tempfile C to U@u:<@ora"ata@spora:1t@temp::C%"#fUG set newname for tempfile < to U@u:<@ora"ata@spora:1t@temp::<%"#fUG switch clone tempfile allG catalog clone "atafilecopy U@u:<@ora"ata@spora:1t@sysau6::1%"#fU, U@u:<@ora"ata@spora:1t@e6pt#s%"#fU, U@u:<@ora"ata@spora:1t@impt#s%"#fU, U@u:<@ora"ata@spora:1t@#r8::1%"#fU, U@u:<@ora"ata@spora:1t@#r8::4%"#fU, U@u:<@ora"ata@spora:1t@users::1%"#fU, U@u:<@ora"ata@spora:1t@perf8"ata::1%"#fU, U@u:<@ora"ata@spora:1t@un"ot#s18::1%"#fU, U@u:<@ora"ata@spora:1t@un"ot#s18::4%"#fU, U@u:<@ora"ata@spora:1t@un"ot#s18::C%"#fU, U@u:<@ora"ata@spora:1t@un"ot#s18::<%"#fU, U@u:<@ora"ata@spora:1t@un"ot#s48::1%"#fU, U@u:<@ora"ata@spora:1t@un"ot#s48::4%"#fU, U@u:<@ora"ata@spora:1t@un"ot#s48::C%"#fU, U@u:<@ora"ata@spora:1t@un"ot#s48::<%"#fU, U@u:<@ora"ata@spora:1t@un"ot#sC8::1%"#fU, U@u:<@ora"ata@spora:1t@un"ot#sC8::4%"#fU, U@u:<@ora"ata@spora:1t@un"ot#sC8::C%"#fU, U@u:<@ora"ata@spora:1t@un"ot#sC8::<%"#fU,

Yahoo! White Paper


U@u:<@ora"ata@spora:1t@#r8::C%"#fU, U@u:<@ora"ata@spora:1t@#r8::<%"#fU, U@u:<@ora"ata@spora:1t@#r8::=%"#fUG switch clone "atafile allG V e6ecuting 'emory !cript e6ecuting comman"3 !.T (.2(A'. e6ecuting comman"3 !.T (.2(A'. e6ecuting comman"3 !.T (.2(A'. e6ecuting comman"3 !.T (.2(A'. rename" tempfile 1 to @u:<@ora"ata@spora:1t@temp::1%"#f in control file rename" tempfile 4 to @u:<@ora"ata@spora:1t@temp::4%"#f in control file rename" tempfile C to @u:<@ora"ata@spora:1t@temp::C%"#f in control file rename" tempfile < to @u:<@ora"ata@spora:1t@temp::<%"#f in control file cataloge" "atafile copy "atafile copy file nameJ@u:<@ora"ata@spora:1t@sysau6::1%"#f &.-,DJ1 !TA' JN?=1N<4O? cataloge" "atafile copy "atafile copy file nameJ@u:<@ora"ata@spora:1t@e6pt#s%"#f &.-,DJ4 !TA' JN?=1N<4O? cataloge" "atafile copy % % cataloge" "atafile copy "atafile copy file nameJ@u:<@ora"ata@spora:1t@un"ot#sC8::C%"#f &.-,DJ1O !TA' JN?=1N<4O? cataloge" "atafile copy "atafile copy file nameJ@u:<@ora"ata@spora:1t@un"ot#sC8::<%"#f &.-,DJ1M !TA' JN?=1N<4O? cataloge" "atafile copy % % input "atafile copy &.-,DJ44 !TA' JN?=1N<4O? file nameJ@u:<@ora"ata@spora:1t@#r8::=%"#f &eena#ling controlfile options for au6iliary "ata#ase .6ecuting3 alter "ata#ase force logging contents of 'emory !cript3 T Alter clone "ata#ase open resetlogsG V

Yahoo! White Paper


e6ecuting 'emory !cript "ata#ase opene" /inishe" Duplicate D# at 415O-T511 &eco$ery 'anager complete% ;oracleL#f15ora"#5::<>PQ This completes the logfile of the &'A( "uplicate target "ata#ase comman"% !9+E select name,"ata#ase8role,open8mo"e from $F"ata#aseG ! O&A:1T &,'A&Y &.AD 2&,T.

Our newly refreshe"@clone"@"uplicate DB Xspora:1tZ from the pro"uction X#fora:4tZ is rea"y for our testing@reporting purposes%

Re0erence Metalin9 Docu+ents -reating hysical !tan"#y *sing &'A( D* +,-AT. /&O' A-T,V. DATABA!. ;'+ ,D 1:N=M:O%1> &'A( 7Duplicate /rom Acti$e Data#ase7 /eature in 11I ;'+ ,D <=4O?O%1>

You might also like