You are on page 1of 92
fle Edt View Terminal Taps Help [oraclegedrsr34p1-orelpray ~15 Ceenercinen nee “Ble Eoit View Terminal Tabs Help [oracle@edrsr34p1-orclpray ~1$ sqlplus / 35 sysdba SQL*Plus: Release 11.2.0.2.0 Production on Fri Aug 28 09:22:33 2009 Copyright (c) 1982, 2699, Oracle. ALL rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production uth the Partitioning, Automatic Storage Managerent, OLAP, Data Mining ‘and Real Application ‘Data Guard roquitos the anmary databace tobe SOL> select force_tog| tuaningin rane LoccrNG meda. This means that ‘statomorts that poo the noLoGeIMS o¢ton wl ‘tll gonorate fe information in oer io propor maintain tne Oata Guatdstandy databases SOL» alter database force toosina:ll CEees iene Edt View Terminal Tabs Help SQL> alter database rorce Logging; Database altered SOL> select + Trow vstog; GROUPH THREAD SEQUENCE BYTES BLOCKSIZE MEMBERS ARC FIAST_CHANGE® FIRST_TIM NEXT, joan” | _Sa0dbr lg os are ecurat store ras reveved a s2azee08 | Jomin paray tata starey voto loge aco 754408 28-AUG-09 atlocct argo sete agact cas a le nro friar dette, The stanchy odo log rst have a 2 s2azeaee | teastane more red ng group han heed log onthe 790844 28-AUG-09 trian dlabase lis recommended thatthe sendy teda og ie ereated onthe priran delanace (end 3 s2azeaoe | mroseaated‘o te sted to sinniy mate's durea 797363 28-AUG 08 2.| wWSubDequeMt stshover orfalevercperatons. SQL> alter database add standby Logfile size SoM, Hie Edt Yew Teminal 2 1 aNACTIVE (04.06_RMAN.create_phYs_sbv CpaneLcuaen ses Tebs Help 2 s2azaee0 512 2 no 799644 28-AUG-09 797363 28-AUG-09 352828800 512 797363 28-AUG-09 2.8147E+14, S0L> alter database Database attered. ISOL> alter database Database altered. ISoL> alter database Datanase altered ISL» alter database Database altered standby logfile size 50M; standby logfile size 50M; standby logfile size SoM; standby logfile size SoM; SL» clear sereenll Four standby redo log groups, have now ceen crested, (0406_RMAN.craate_phy=.zhy Ceenercinen le Esk Mew Terminal Tabs Help S0L> select * fron vstogfite; GROUP STATUS TYPE 3 3 2 2 1 1 7 4 5 5 6 6 7 7 ONLINE ONLINE ONLINE ONLINE ONLINE. ‘ONLINE, STANDBY STANDBY STANDBY STANDRY STANDBY STANDBY STANDBY STANDBY MEMBER +DATA/orclprmy/onlinelog/group_3.263 696057109 +FRA/orcl prmy/ontinelog/group_3.259.696057121 +DATA/orciprny/online1og/group_2.262 090057097 +FRA/orclprmy/onlineLog/ group_2.258.696857383 +DATA/orciprmy /ontinetog/group_1.261.696057883 FRA/orclprmy/ontinotog/aroup 1.257.696857092 “+DATA/orciprmy/onlinelog/group_4.267 ,696072325 +FRA/orclprmy/onLinelog/group_4.260.696072331 +DATA/orclprny/onlinelog/group_5.268 ,696072363 +FRA/orclprmy/onlinelog/group_ 5.261 636872369 +DATR/arciprmy /ontinelog/group_6.269..696072415 +FRAYorclprmy/onLinelog/ group 6.262.696872423 4DATA/orciprmy/onlinelog/group_7.278 696072457 +FRA/orclprmy/onLineLog/ group_7.263.696072463 14 rows selected. sou> Here ae the stancty rada loo. files. Each loa fle is minored by detaul, (04.05 RAN create_phys.sbY Brseegee asap ‘Ble Edt View ermal Taps Help SQL» show parameter db name NaN b_nane string orclpray SQL> show parameter db_unique nase hae a> unique nane string orcipray soL> SOL> alter system set log_archive contig ~ ‘dg_config-(orclprmy, orclsby1] “The nest configuration stage involves salting he ‘fundamental instance parameters fo aia Guere. Fist ‘he Loo_ARCHTYE_COMTTS parametor ic set The setuna ‘rte Parameter includes the DB _UNTQUE NAME 7orhe imary dataoace along win tne DE UNIQUE. MAME that ‘wile usec forthe staneby catsbase, 04_0¢_RNAN_croate_phys_=by 2 Cerrertinenies le Eat View Terminal Tats Help SOL> shew parameter db_nane NAME TYPE VALUE b_name string orcipray SOL> show parameter dh_unique es the pray) database fs corigured to ship tog iormation ane {bine ett be created) stony dolzbase - ‘nhs amale th standby datanase sorice wil be oceisty1. db_unique_nane the log wil be tlanspored esehioncusW andthe soL> 1 _UUTQUE_HaME forthe ctandey wilds oxeLsbva. This eating S0L> alter system set tog arg is onl/valdiwhon tho eurontinetano iozetpra le ehioging ‘online redo leg flee ints eapacty a6 re primary dataoaco, system altered. SOL> alter systen set log_archive_dest_2 2 ‘servicesorclsbyl async valid_for=(online_logtile,primary_role) db_unique_o| ame-orcisby1"; Cecbacsaenio Ble Eoit View Terminal Tabs Help SOL show parameter db_nane NAME ab name oreipray SOL> show parameter db unique nane NAME ab_unique_nane sol> SQL> alter system set tog arc System altered S0L> alter system set 1og_arc 2 ‘servicesarclsbyl async ameeorctsbyl"; system atterea VALUE string aretpray Intis example, caxDByY_FTLE_WaNACENENT Is cotio. “AUTO 69 that when cata tse ro acded oor oppo ‘nom tha primary database, eovresponcing changes are ‘mate in he siancy dalebae wou! maral infenenion This seting is tecommender when using “Gravie Naraged Fies (NF) onthe primar daiabose, -asiste case inins example. S0L> alter system set standby file managenent ~ AUTO; Geenosiaenoe jatabase Log node No Archive Mode "Now tne pray detabace must Senet anette), be piara in zecxivesce meds, Archive destination sia Oldest online tog sequence Current log sequence sol> pieeeee nen ied ‘le Edt View Terminal Taps Help SQL> archive log List Database log node No Archive Node Automatic archival Disabled Archive destination USE_OR_RECOVERY FILE DEST Oldest ontine Log sequence 2 Current 10g sequence a SOL> shutdown immediate Database closed. Database dismounted ORACLE instance shut down. SQL> startup rount ORACLE instance started. Total Systen Global Area 535662502 Fixed Size 1337720 Variable size 343934600 Database Butters 1194549376 Redo Buffers 5040896 Beenerrinenie Ble Edt View Terminal Tabs Help ORACLE instance started Total Systen Global Area 535062502 Fixed Size 1337720 Variable size 343934600 Database Butters 189549376 Redo Butters 5840896 Database mounted. SOL> alter database archivelog: Database altered. SQL> alter database open; ‘The database is now wunning Inapcervmnoc node Database altered. ‘Archive Node ‘Automatic archival Enabled ‘Archive destination USE DB RECOVERY FILE DEST Oldest online log sequence Next log sequence to archive Current log sequence sob> exit CEB eeee ny ere Sees eae ena ise taal Ble Edt View Terminal Tabs Help edo Buffers sedeaa6 bytes Database aounted SOL> alter database archivetog; Database atteres. SOL> alter database open: Database altered. SOL> archive 1g List Database 10g mode Archive Mode Autonatac arcnivat enaptea Archive destination USE_OB RECOVERY FILE DEST Oldest omline log sequence 4 Next log sequence to archive 6 Current tog sequence 6 SOL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.8.1.0 - Pr| eduction With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options [oraclogearsrs4p1-orciprmy ~]$ cd SORACLE HOME/network/aamin [oracle@edrsr34pl-orclprmy admin]$ vi tnsnanes.ora DEceert ene cI Ble Edt View Terminal eps Help # insnanes.ora Network Configuration File: /u®1/app/eracle/preduct/11.2.0/aanone| Joetwork/a0nan/tnsnanos .0ra # Generated by Oracle contiguration toots ‘ORCLPANY (DESCRIPTION [ADDRESS = (PROTOCOL = TCP)(HOST = edrsr34pl.us.oracle.com) (PORT = 1521)) (COMMECT DATA = [SERVER ~ DEDICATED) (SERVICE NAME ~ orcipray.exanple.com) "tnsnanes.ora" 12L, 360C ® BEC Rer en Sern yeaa Metre Ke aerate el Ble Eat Yew Terminal Taps Hep 4 tnsnaner ora Network Contigurstion Fite: /u8/app/oracie/product/11.2.07/ebnone|-| Jnetwork/adtin/tnenanes..ora # Generated by Cracle configuration tools. oRcLPaMY = (DESCRIPTION [ADDRESS - (PROTOCOL ~ TCP) (HOST ~ earsr3apl.us.oracle.com) (PORT ~ 1521)) (CONNECT_OATA = (SERVER = DEDICATED) {SERVICE NAME = orclprny.exanple 1 1 orci saya (DESCATPTION (aooRess: (PROTOCOL = TCF) (HOST = edrsr36pi.us. com) (PORT = 1521)) {CONMECT_OATA ~ {SEAVER = DEDICATED) {SERVICE NAME = orclsby1.example.com) Evite rnmanes, oz le a9c0"aied wih sour pnimaryoracls Database statin so “That ratleNet ences aases east yur “pens database and Goan b createed ‘sland deebace > )JePaeleSear=PS¥pL/UOLSEBORE “Ble Edt View Terminal Tabs Help SQL> alter database archivetog; Database altered. SQL> alter database open; Database altered. S0L> archive log list Database log mode Archive Node Automatic archival Enabled Archive destination USE_DB RECOVERY FILE DEST OLaest ontine Log sequence 4 Noxt log sequence to archive 6 Current Log sequence 6 SQL> exit Disconnected from Oracle (— lease 11.2.0.1.0 - eduction Copy the updated samnanes.oxatie to With the Partitioning, Aq the Oracle Datacase metalation natwl | Data Mining land Real Application Test} bese to mun your standby database, [oractegedrsr3ap1-orctpi in [oractegedrsr3apl-orctpray sonin]s vi thanawes ore loracteezarsrsapiorctpray aonan}s scp tnenanos.ora earsrsep1:/u01/app/oracte/p oduct /11.2.0/ddnone/notwork/adein/tnsnanes.0r3 1. oracle@edrsr34p1:/s01/applorace/product/—.2.0/sbnome/networkiadmin [= )%] le Eot Yew Jermminai Taps Hop loractegedrsr34p1-orcipmny adninis [] See He Eat View Termmal Tabs Hoe loracteeesrsra6p1-orcisbyl -15 Hl Atti poi the primary sere congue andiecusshifs to he standby serer Georse3sp2 inthis earl) 04.DG_ANAN create phys. sby ° [S oraciesearsr34p1:/uot/eppvoracle/product#2.0/dbhomemetworkdadmin |='E/*] Fle Eat Yow Terminal Tabs Help [oractegearsr3api-orciprny aanan)s [) Bineeisecs Fle Edt View Terminal Tabs Help [oractegedrs'36p1-oreLsby1 ~]$ echo SORACLE HONE /us1/app/oracle/proguct/11.2.0/aonone [oractegoarsrsepi-orctsoy1 ~1s I Oracle database binaries have previously bboen inetaied at thi (04_DG_RMAN_create_phys_sby |e 1 oraciepearersspu/uoz/apploraci/produew&32.0/aprome/networkiaamin |= 5] file Edit View Terminal Tabs Help [oracle@edrs+34p1-orcipmy adminls [] Gecoeneeu ee le Edit View Terminal Tabs Help [orecleSedrsr36p1-orclsby] ~1$ echo SORACLE HOME /u91/app/oracte/product/11.2.0/abhone [oraclegedrsr30p1-orclsby1 ~]$ |cho SORACLE STD orclsty1 eGeursr3epl-orctsbyl ~]$ Sie norstendly tease “have orcisny 8 ts 7. 5S tt) 1 oractegedrsr34p1:u01/epp/oracte/produet fle Eat View Jerminal Taps Hep {orsclegedrsrsépi-orctory aamin}s [] EEEpeene ces le Edt View Jermnal Tabs Hep [oracLeeearsrsopl-orcisbyi ~15 ecro SORACLE HOWE J01/app/oracle/product/11.2.6/ébnoxe loractetedrsr3epl-orclsby1 15 echo SORACLE SID orctsbyl Toraclegedrsr3épl-orelsbyl ~15 Usnretl statusll 04.06_RMAN create. phy=_sby je Ble EOL View Terminal Tabs Hepp [oractegedrsr3apl-orcipray adain}s [] | Inthis demonsiteton, Oracle Datskase release Ble Eo Vow Termnal Taps | 11-2!escinausocin conjuncton win Asm an ees "BE | oracla Restart sa resul an Oracle Nelisterer has already been configured 2s shawn here Connecting to (ADDRESS-(PROTA STATUS of the LISTENER Listener TUSLSNR for Linux: Version 12.2.0.2.6 - Production 28-AUG-2000 1:14:28 O dave @ nr. # ain, 28 soc ott ON: Local 05 Authentication ore Listener Paraeter File /1/app/oracte/product/11.2.2/grid/netwark/adein/is [istoner Log Fite /u01/9pp/orac\e/aiag/tns\snr/carsra6ply/ Usstener/atert) og. xnt [Listening Endpoints Sumary. (DESCRTPTTON=(ADDRESSe (PROTOCOL inc) (KEY=EXTPROCIS21))) (DESCRIPTTONo(ANDRESS=(PROTOCEL=t ep) (HOSTeedrsr pl -ws_oracle. con) (PORT=1521)} ) services summary. service "Asi" nas 2. anstance(s)- Instance *vASt", status READY, has 1 nandler|s| for this service The comand completed successfully foractegedrsr3opl-oretsby? 15 Ml ALG RNA eae Le [L_oraciepearsrsep1:/uot/app/oracie/proauctsg2.o/epnomeynetwork/aamin |= (01x) file Edit View Terminal Tabs Help Toracleeedrsr34pl-oretpray adeinis [] Geueeneet ee Fle Edit Viow Terminal Tabs Help Connecting to (ADDRESS~(PROTOCOL-tep) |HOST=) (PORT=1521) ) STATUS of the LISTENER aliss LisTENER Version TNSLSWR for Linux: Version 11.2.0.1.9 - Production start Date 28-aU15-2603 10:14:26 Uptine @ days @ hr. B min. 28 sec Trace Lovet ort security ON: Local 0$ authentication shine orF Listener Paraneter File /U01/app/oracte/product/11.2.0/gri0/network/aamin/ List Listener Log Fite J001/app/oracis/diag/tnsisnr/edrsr36pi/Listener/alert/, Log.xm Listening Endpoints Summary... (OESCATPTION=(ADDRESS=(PROTOCOL=ipc) (KEY=EXTPROCLS21))) (OFSCATPTTON=ADDRESS=(PROTOCOL=tep) (HOST=edrsr36p1.us.oracte.com) (PORT=1521)) ) Sarita Reang Service "+AsH" has 1 instance(s) Instance "ASM", status READY, has 1 hangler(s) tor this service... ‘mo conmand completed successrulty [eractegearsrsep1-orctsty ~|$ vi. /uSl/app/eracte/prequct/11.2.0/grsa/network/a nin/listener.orall 1W_craciegecrersepi:/uot/appjoracieproduct/§3.2.0/abnomemetwork/admin fle Edt View Terminal Tabs Helo loracle@edrsr34pl-orclprny adminis [] Gpnccinens dit View Terminal Tabs Help jer.ora Network Configuration File: /u®l/app/oracle/product/13.2.6/grid/n{-) etwork/adin/Listener.ora # Generated by Oracle conriguration tools. LISTENER = (DESCRIPTION LIST = {BeScRTeTION UaoGRESS = (PROTOCOL = | be configured vita sate seneee (ADDRESS - (PROTOCOL ~ | Sruvortne standby database, con) (PORT = 1522)) ! “The listener on he sana site must 1 ‘STO (TST LISTENER = (S10_LIst isio Desc - {GLOBAL DBNANE ~ orclsbyl.exanple.com) (ORACLE HOME = /u@1/app/oraci e/product/11.2.0/ddhone} {ST0_NANE = oFelsby2) 1 1 ‘ADR_BASE_LISTENER - /u01/app/oracle B_oraciededrsr34p1:/u0t/appioracte/productiA fle Eat View Teminal Tass Help loraclegedrsr34pi-orclprny aaeinis (] ‘Ble Eat) View Terminal Tabs He [oraclegedrsr36p1-orcisbyi ~Js srvctl stop Ustener joractecearsrsepi-orcisbyi ~Is srvetl stort listener (oraclesedrsra6pi-orcisbyl ~1s RResiart the Istenerio enable the new conicuration _oraciegearersapnsuoz/app/oracieproductfi.2.0/smnomemetwerk/aamin =| >] Ble Edt View Terminal Tabs Hep Toractegearsr3ép1-orcipray adnin1s [] Geeeeeieenres Fle Edt View Terminal Tabs Help [oracleQedrsr36p1-oretsby1 ~]$ srvctl stop Listener [oractegedrsr36pl-orctsbyi ~]$ srvctt start lstener loractegearsr36pi-orctsbyi ~]§ tsnrctt status (04_D6_RMAN.create_plns_sby jm B_cracieGesrsr34pt/u0t/app/oracie/praduet/ 4g 2.0/dbhome/netwark/admin file Eo View Jerminal Tabs Help [oractegedrsr34p1-orctpray adnin1s [] Baoan Bile Exit View Terminal Tabs Help STATUS of the LISTENER Alias LISTENER Version THSLSNR for Linux: Version 11.2.8.1.8 - Production Start date 28-AUG-2809 10:30:44 uptime © days © hr. O min. 11 sec Trace Level ort Security (ON: Local OS Authentication snp OFF Listener Paraneter File /u®1/app/oracle/product/11.2.0/grid/network/adein/list| Listener Log Fite /u01/app/oracte/aiag/tnsisnr/edrsr36p1/1istenersatert/| Log. xmt Listening Endpoints summary. . (DESCRIPTTON= (A001 9) | (ESERIPTION ADF ssn yt te Pver art com PDATNSZD) _ecetces Sumary.,,| Bhoweasied hte istre Service "ASH" has Instance “east, stifas AEADY_nas 1 handler(s) for this service. Service: TorelserL crempicicent tas tacemeets Instance *orclsbyi", status UNCON, has 1 handter(s) for this service. THE CORTaNG COND TSCEd SUCCOESTOLUT (oraciededrsr3opl-orcisby1 —15 (04_06_RMAN_creste_phy=_sby 1B oraciededrars4p1:01/app/oracieproduct4i2.0/dbhome/network/admin (= 6x) Fle Edt Yew Jemmnal Taps Help [oraclegearsrsapi-oreiprny saranis [] meaeneen see Ble Edt View Terminal Tabs Help [oracle@edrsr36p1-orclsby1 ~1$ echo SORACLE BASE {u01/app/oracte [oraclegedrsrs6p1-orcisby1 ~]$ mkdir SORACLE BASE/adnin/orcisby2 loractegedrsrsepl-orcisbyi ~]$ mkair SORACLE BASE/adnin/orcisby1/aquzp A crestor is remiresto house mandaiony aug les. By deat these les a sacedin SORACUE_DASE/edain ORACLE eu. Bieter ore reer fle Edt Yew Jetminal Tays Hep [oractegearsrsapl-orcipray adzin}s (] file Edt View Terminal Tabs Help loracle@edrsr36p1-orcisbyl -1$ echo SORACLE_BASE /u21/app/oracte [oractegedrsrs6p1-orcisby1 ~]$ mkdLr SORACLE BASE/adninsorctsby1 [oraclegedrsr36p1-orcisbyl -|$ mkdir SORACLE BASE/adnin/orclsbyl/adunp [oracte@edrsr36p1-orcisbyl ~]$ cd SORACLE_HONE/dbs [oractegedrsr36p1-orcisby1 dbs] echo OB NAME=orclsby1 > initorcisbyl.ora [oractecearsrsep1-orcisby1 abs]s cat initorclsbyi.ora DB_NAME=orclsby1 bss ‘An iitalinstane® parameter fle containing a sinale paramotor epacriestion forpa maggie rsqured. 8 til ah (0406. RMAN create_shys_sby (oracle edrsr34p:/u0/app/oracte/product/Z.2.0/dbhomemetwork/admin |~ [F|x) File Edt View Terminal Tabs Help Toractegedrsr34p1-orctpray adninls [] nano een eee he eee eee le Edit View Terminal Tabs Help Ioracle@edrsr36pl-orclsbyl -1$ echo SORACLE BASE Ju01/app/oracte [oraclegedrsr36p1-orcisbyl ~]$ mkdir SORACLE BASE/admin/orcisbyt loractegedrsrsep1-orcisby1 ~]$ mkdir SORACLE BASE/acnzn/orcisbyi/adump loracle@edrsr36pl-orclsbyl -1$ cd SORACLE HOME/dbs [oracte@edrsr36p1-orcisby1 dbs]$ echo DB NAME-orclsbyl > initorclsbyl.ore [oraclegedrsr36pl-orcisby! dhs}s cat initorcisbyl.ora Da NAME-orclsby2 [oracle@edrsr3bpl-orclsbyl dbs}$ 1s init.ora initorclsbyl.ora [oracle@edrsr36pl-orcisby! dhs}$ sep edrsr34p1:/uS1/app/oracle/product/11.2.0/db} home /abs/orapworcipray orapworetsby1 “The mar cfabase passmardie sb ied the try aytr auhen eno vasgotten stefan ena ef the nscewors te mustba a} sutte stony ntsc. [i oreciesedrar34p:/u01/epp/orect/product Af 2.0/cbnomeinetwork/admin |= (5) ‘Bile Edt View Jerminal Taps Help {oraclecedrsr3épi-orcipray adminis [] nner nee enn eon teen ELE fle Edt View Terminal Tabs Help [oraclegearsrsepl-orcisbyi ~]$ echo SORACLE BASE /u91/app/oracte Toracle@edrsr36p1-orclsby1 ~1$ mkdir SORACLE BASE/admin/orclsby2 Toracte@edrsr36pl-orctsbyi ~]$ mkdir SORACLE_BASE/admin/orclsby1/adump [oracegedrsrs6p1-orctsbyi ~]$ cd ORACLE HONE/abs [oractegearsrsep1-orcisbyi dbs} echo DB NAME-orclsby1 > initorctsbyi.ora [oracle@edrsr36p1-orclsby1 dbs] cat initorclsbyl.ora DB_NAME=orcl shy? [oractegedrsrs6p1-orctsbyi dbs}s 1s anat.ora initorctspyi.ora loracle@edrsr36p1-orclsbyi dbs]s scp edrsr34pl: /u0l/app/oracle/product/11.2.0/db} hone/dbs/orapworclprny orapworcisby 1 oraclagedrsr3ap1's password: orapworcipray pos 1536 © 1.skBys g0:08 [oraclegedrsr36pl-orclsbyl dos}$ 1s init.ora initorclsby1.ora orapworclsby1 Toraclegedrsr36p1-oretsbyi dbs}$ [_oraciegedrsr34pt:/s01/app/oracie/productR2,0/dbhome/network/adinin [=J5)X) Ble Eat Yow Jerminal Tabs Hep [oracle@earsr34p1-orciprmy aamin]s [] Tenens Pee ee Ble Eot View Terminal Tabs Help [oractegedrsr3ép1-arcisby1 dbs]§ sqiplus / as sysaba SQL*Plus: Release 11.2.0.1.6 Proguction on Fra Aug 28 10:44:27 2009 Copyright (c) 1982, 2009, Oracle. ALL rights reserved. Connected to an dle instance. S0L> startup nonount pfilesinitorelsbyl oral Athi pon he standby database instances stared forthe frsttime using the parameter fle creetod ‘moments ago, Note tre Nomounrr starbap mace. [_oracteearsrsept:suox/app/orncie/proauctig2.0/annomernetwork/admin [=|] file Est View Terminal Tabs Help [oraclegedrsr34pl-orclpray adainls [] i Benen neo erence eee eee Ble Est View Jeminal Tabs Help [oracleQedrsr36pl-orclsby? cbs]$ sqlplus / as sysdba SOL*Plus: Release 11.2.0.1.8 Production on Fra Aug 28 19:44:27 2069 Copyright (c) 1982, 2009, Oracte. ALL rights reserved. Connected to an idle instance S0L> startup nomount prile~snitorcisbyl.ora ORACLE instance started. Total System Global Area 146472960 bytes Fixed Size 1335080 bytes varaaple size 2274964 bytes Database Butters 50331648 bytes Redo Butters 2531328 bytes, SOL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr] auction with the Partitioning, OLAP, Uata Mining ang Real Application Testing options [oraclo@edrsr36p1-orclsby2 dbs}s Configuration of the standby: ‘soreri ne emp (08_DG_RMAN create _phys_sby [:@: Cecbccsaeniog Ble Eot View Terminal Tabs Help [oracleQedrs+34p1-oretprny adnin]$ co oraclegedrsridp1-orelpray ~]$ cat create orcisby1 tet altocate channel pray type cisk; allocate channel prmy2 type disk: allocate channel prny3 type disk; allocate channel pray4 type disk: allocate auxiliary channel stby type disk: duplicate target database for standby from active database sprite paraneter_vatue convert. ‘orctprny", ‘orctsby1" set dD unique nane-"orcisbyl" set log archive max pracasses~'S* set fal_client-'orctsbyl* set fal_server='orctpray’ Set standby file_managenent="AUTO" set 1og_archive_config='dg_config=(orelpray,arctsby1) Set log archive dest_?='servicesorctpray ASYNC valld_tor=(ONLIN LOGFILE, PRIMARY ROLE) Ub unique nané=arciprny’ } foractededrsr34pt-orctpray ~15 XN Now this RMAN seit be used io duplicate the current primar dafabace. 108.06.RMAN.create_phys-cby Le Cetecer cies sae file Edit View Terminal Tabs Help [oractegerersap1-orcipray again|s ca loracle@edrsr34p1-orelpray -]5 cat create_orclsbyl.txt run { The main feature ofthe script is the pupxzcare commard. ee auxiliary channel stoy type ausk; duplicate target database for standby Tron active database sprite paraneter_value_convert ‘orctpray’ ,*erctsby2" Set ab unique nano='orcisby1" set log archive max_processes~'5: set fal_client='orctsbyl' set fal server=orctpray’ set standby Tile management" AUTO" set log_archive config='d9_contig=(orclprny,orcisby1)* set log archive dest_2='servicesorelpray ASYNC valid_for=(ONLT LOGFILE, PRIMARY ROLE) Gb unique name-orclprmy ¥ loractegearsrsap1-orctpray ~]$ Fle Edt View Jerminal Tabs loracte@edrsr34pl-orclarmy admin}s ca loracle@edrsr34pl-orclormy ~18_cat_create orcisbyl.txt ‘This valaton ofthe DUPLICATE command can oe usecie create 3 standoy dstatase ‘orn an acbeey running primary datas channel stby type disk: duplicate target database for standby from active database Sprite paraneter_vatue convert ‘erctpeny’, ‘orcisbyt" Set db_unique_name~'orcisby1" set leg_archive_max_processes~'5" set fal_client='orcisbyl" set fal_server='orciprny" Set standby tlle managenent=" AUTO: set tog archive contig-'ag_contig=(orclpray, orcispy)" sot log archive dest 2~'service-orclpray ASYNC valid for~ (ONLINE LOGFILE, PRIMARY ROLE) db_unique_name-orclormy* y loractegedrsrs¢pi-orcipray ~15 fle Eoit View Terminal Tabs Help [oractegedrsr34pl-orclprmy adminis cd [oracteQedrsr34pl-orciprmy ~]$ cat create orclsby.txt run { atiocate enannet orf ddsvapetino asied tiseate chains 1 command also specifies a tule for Tete channe’ Pl corvertns mstance parameter valuos. In thie .ampi9, al eccurtoncos orexclpeur ‘willbe roslaced by aeetateL allocate channel pi allocate channel 91 allocate auxataary duplicate target aa spfite Paraneter_value_convert “orelpray', erclabyl™ ‘Set Gb unique nane—"orclsbyl” set log archive max processes-'5* set fal_client='orcisoyl' set fal_server=orclpray’ set standby T1le managanent=" AUTO" sot log archive contig~'dg_config-(orclprmy orctsbyl) " set log_archive dest_2="service-orclpray ASYNC valid_for=| LLOGETLE, PATMARY ROLE) db_unique nanesorctprny” # Toraclegedrsr3¢p1-orctprny ~15 Cig terol Ste fle Edit View Terminal Taps Help [oracte@edrsr34p [oractegedrsr34p run { attocate allocate allocate allocate allocate duplicate spfite 1-oretprny adein]$ ca sL-oretprny ~]$ cat create orelsbyl_txt channet prny2 type disk, channel prny2 type disk: channet pi ne_disk channet pi ; ; ; auxiliary | Dtrereatametervslues that are speci te fe target oq Me siehycatanese ao also score paraneter_valde convert “aretpray', “orctsbyi" ‘Set db_unique_nane="orclsby™ Set log arenave max processes~'5” set Tal_client~orclsoyl" set fal_server="orclpray' set standby file managenent="AUTO" Set log archive contig~"dg contig-(oretpray, orctsbyL) Set log arcnive dest 2-'servico-orclpray ASYNC valid Tor=|ONLIN! [_LOGFILE, PRIMARY ROLE) db_unique_nane-orclprny’ y [oracle@edrsr34p: -orclpray ~|$ Ble Edt View Terminal Tags Hep [oracle@edrsr34pl-orcipray -1$ rman Recovery Manager: Release 11.2.0.1.0 - Production on Fri Aug 28 10:48:15 2009 ALL rights reserved. Copyright (c) 1982, 2009, Oracle and/or its affiliates rei connect torect sysll Inside RAN, connectio te prenany database a3 ihe sys user. rRce@earer=ap ES Fle Edt View Jerminal Taps Helo loracle@edrsr34pl-orclpray -1$ ran Recovery Manager: Release 11.2.0.1.¢ - Production on Fri Aug 28 10:48:15 2609 Copyright (c) 1982, 2009, Oracle and/or its affiliates. ALL rights reserved. ANAN> connect target sys target database Password: connected to target database: ORCLPAMY (DBID=3434812727) Anais connect auxttiary syseoretsvy lll ‘Now take an auwetaryconneeton ihe stanobyinstance, Euarcises st Fle Edit View Terminal Tabs Help [oraclegedrsr34pl-orclprny ~1$ rman Recovery Manager: Release 11.2.8.1.6 - Proguction on Fri Aug 28 18:48:15 2009 Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved. ANAN> connect target sys target database Password: connected to target database: ORCLPRMY (DRID=3434812727) AMAN> connect auxiliary sys@orclsayl auciliary database Password Connected to auxiliary database: ORCLSBY1 (not mounted) attal> create orctsbyt.txtll Database duceation can now sammence, Ble Edit View Terminal Tabs Help sten.258, 696077455 datafile 2 switched to datafile copy input datafile copy RECID=3 STANP=696077588 Tile nane=+DATA/orclsbyl/datafile/sy| ‘saux.259,696077¢55 datafile 3 switched to datafile copy input datafile copy RECID=4 STANP=596077559 Tile nane=+DATA/orclshyl/datafite/un| datbs1.261,696077455 gatarite 4 switcned to aatarite copy anput datatile copy RECID-5 STAMP=696077509 Tile nane-+DATA/orclsbyl/datatile/us ers.262.696077495, datafile 5 switched to gatarite copy ‘Oupticate DU at 28-ANG-69 Teteased channel: prmyi released channel: prny2 N released channel: pray3 inte RMAN database cuplieaton Feteasea channet: pray _eompletes suctosstuty, You wal released channel: stby ‘936 8 rossage euch a nis one ans ANAN> “*end-of tiles* Nan Ceeee seth Blo Edt View Jerminal Tabs Hop loractegearsrs4pi-orcipray ~]s sqiptus / as sysaba SOL*Plus: Release 11.2.0.1.0 Production on Fri Aug 28 10:58:28 2009 Copyright (c) 1982, 2069, Oracle. AL1 rights reserved Connected to: Oracle Database 11g Enterprise Edition Release 21.2.0.1.0 - Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options sal> atter system swaten togrste/ll ‘or dataoseo dupleation, ono a log ‘Sen onthe primary dacabase to atchve te curetredo log gous 06_DG_RMAN_create_phys_sby [no a eiemecrersan le Edt View Terminal Tabs Help [oraclagearsrs4p1-arciprmy ~]§ sqlplus / as sysaba SQL*Plus: Release 1.2.0.1. Production on Fri Aug 20 1 caagaimerte Brno nen Donan nena ee Icreneens Fle Edit View Terminal Tabs Help Connected to| [0racteGedrsr36pl-orclsty dbs]s sqlplus / as sysdha Oracle Datab] so xpius: Release 11.2.8.1.8 Production on Fri Aug 28 18:59:58 2009 and Real APP copyright (c) 1982, 2609, Oracle. ALL rights reserved. With the Partitioning, Autonatic Storage Managenent, OLAP, Data Mining ‘and Real Application Testing options SOL> alter database recover managed standby database 2 using current Logfile disconnect; N ‘onto standby database, lesue tho ALTER DATABASE [RECOVER MAIAGED STAIDUT DATAPASE cornrnand io tat Roda App, The statomont nclusos tho WSIS [CURRENT LOGFILE clause so that redo can be spolied as ‘302m as thas Geen e22ivec The sttermentincluces the _DISCOMMECT option co tat Hose Apoty runs in 3 bbackoround coscion “04,106. RMANcraate_shyeiaby oraciegearsrsep hg: Ble Edt View Terminal Tabs Help [oracleGedrsr34p1-orcipray -1$ sqlplus / as sysdba SOL*Plus: Release 11.2.0.1.9 Production on Fri Aug 28 10: een eee eee eee Ect View Terminal Tabs Help oracle@earsr36pi-orcisbyl abs]s sqlplus / as sysdba copyright ¢ Oracte Datab) co) eprus: Kiteh-the Pal Release 11.2.0.1.0 Production on Fri Aug 28 10:59:58 2009 and Real ADP| copyright (c} 1982, 2009, Oracle, ALL rights reserved. connected to Gracte Datanase 11g Enterprise Edition Release 11.2.0.1.0 - Production uth the Partituoning, Autonatic Storage Management, OLAP, Data Mining fang Real Application Testing options SQL> alter database recover managed standby database 2 using current Logfile disconnect; Database altered. Atthis point, configuration of the a star cafabase is carncleted are the enveonment i yor usa. Cy oracle@edrsr34pl:~ fle Edt View Terminal Tabs Help [oracle@edrsr34pl-orclpray ~15 sqlplus / as sysdba SQL*Pius: Release 11.2.6.1.6 Production on Fri Aug 28 16:58:28 2069 Copyrignt (¢f Fle Edit View Terminal Tabs Help Connected to] Copyright (¢) 1982, 2009, oracle. ALL rights reserved. Oracte patan) OPYT+NE (€) 1952, 2009, a with the Pal Oracle Database 119 Enterprise Edition Release 11,2.9.1.0 - Production 50L> alter SJqitn tne Partitioning, automatic Storage Managenent, OLAP, Data Mining ‘ang Real Application Testing options SQL> alter database recover managed standby database 2 using current Logfile disconnect; Database altered SQL> select sequence#, first time, applica 2 trom vsarchived_log 3. order by sequenced; SEQUENCES FIRST_TIN APPLIED Noto that ino eurontiog sequensa numbor 28-AUG-89 YES lon ine standby datatase is sever. 29-AUG-09 IN-MEMORY Brace Oeara aap le Eoit View Terminal Taps Help [oractegearsrs4pi-orciprny ~]$ sqlplus / as sysaba SOL*Plus: Release 11.2.0.1.0 Production on Fri Aug 28 10:59:28 261 Copyright (c) 1982, 2909, Oracie. ALL rights reserved. Connected to: Oracte Database 11g Enterprise Edition Release 11.2.0.1.9 - Production With the Partitioning, Autonatic Storage Managenent, OLAP, Data Mining ‘and Real Application Testing options SOL» alter systom switen Logrite; System altered sou> Asa basi eat ofthe neve envianment three additonal Jog switches wall nov 2e performed. Then he stanky dletanase wil pe requaned to very matte log 10s ‘ere ransparied ard applied SEQUENCE# FIAST_TIM APPLIED 6 28-AUG-09 YES 7 28-AUG-09 IN-MEMORY sou J] (04_0G_RMAN create phys sby ByRdeOeararaaPIy. Fle Edit View Terminal Tats Hels SQL*Plus: Release 12.2.6.1.6 Production on Fri Aug 28 10:58:28 2009 Copyright (c) 1982, 2609, Oracle. ALL rights reserved. Connected to: Gracle Database 11g Enterprise Edition Release 11.2.6.1.¢ - Production uth the Partitioning, Autosatic Storage Managenent, OLAP, Data Mining fang Real Application Testing options SOL> alter systen switch logfile: system altered. SOL> alter systen switcn logtite; System altered. SOL> alter systen switch Logfite; system atterea. SOL> alter syston switch logfile: ‘SEOUENCE# FIRST_TIM APPLIED 6 28-AUG-09 YES 7 28-AUG-09 IN-MEMORY so (04_06_RNAN create_phys_sby 3 oracegiedrer3spy= Ble Est Yew Ternna eps Hep Connected to: Ble Eat View ‘Terminal Tabs Help 2 using current Logrite aisconnect; Database altered. SOL> select sequence#, first tine, applied 2 from vsarchived tog 3 order ny sequences; SEQUENCE® FIRST TIM APPLIED 28-AUG-09 YES 28-AUG-09 IN-MEHORY soL> / SEQUENCE® FIRST TIM APPLIED © 28-AUG-09 YES 7 20-AUG-09 YES 8 28-AUG-09 9 28-AUG-09 a Sie Ae “The loas are successfully ‘ransported and spolied. 04.06 RMAN create sivs shy oracinnaeerap fle Edt View Terminal Tabs Helo SQL> alter systen atte S0L> alter systen atte SQL> atter system atte saL> atter systen alte sou> [] In the next par ofthis demonstration, the Dats Ouarel broker nil be configured and ested. Configuring the Data Guarebrokerie oatenalin many 23695 however, is general recommrendeo because t sea simplifies mary Data Guard operations Ble Edt View Terminal Tabs Helo Connected to: Edit View Terminal Tabs Help SOL> show paraneter dg_broker_start dg broker start boolean sal» atter 3/5515. SOL> alter system set dg broker start = TRUE: Thepe snore stant paareter mistbo alto TUE. Erne Rae CHERAB file Edit Yew Terminal Tabs Help connectes to: oracte patap; wath the Pal SOL> show paraneter dg_broker_start Name ag Broker start bootean soL> S0L> alter system set dg broker start ~ TRUE; System altered. SOL> show paraneter dg broker start NAME ag Broker start boolean TRUE SOL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Pr) oduction With the Partitioning, Autonatic Storage Managenent, OLAP, Data Mining and Real Application Testing options [eraclegedrsr36p1-orclsby1 dbs]$ clear a orsctegear3s93;~ ‘He Est View Jermnal Tabs deip connectes to: Fle Edt View Terminal Tes Help ; ; Loracteeearsr3epl-oresby1 abs]$ vi /u81/app/eracie/product/11.2.0/grie/network/ =) advin/Listener. oral a oracte@edrsr34p: Ble Edt View Terminal Taps Holo Connected to Oracle Datab; 2 helen the rae Eres itn due oie had Sees and Real Aps| Ble Edit View Terminal Tabs Help SOL> alter 5|,rreNER = (DESCRIPTION LIST (DESCRIPTION ~ (ADDRESS = (PROTOCOL ~ IPC)(KEY = EXTPROCI521)) (ADDRESS = (PROTOCOL = TCP)(HOST = edrsr36pl.us.crscle.com) (PORT = 1521)) system atter| ) si Last _LisTetiee = eaten The Oracle Net listener must also. LTTE mene "015) be songs vin an agonal s orclsbyl example sae sorvce denier. (ORACLE HONE = /umtvapprovacterpraq S=Iee¥E (st Nie = oretsoyt) 1 (SID_DESC (GLOBAL_DONANE = orcsby1_DGHGRL .exonpte. com) (ORACLE HONE = /u81/app/oracte/product/1i.2.¢/dbhome) (S10. nave = oretsbyt) a oracle@edrsr34pii~ fle Edt View Jerminal Tabs Help Connected to: Oracle Datab; With the Par} (DESCRIPTION_LTST (DESCRIPTION (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROCIS22)) (ADDRESS = (PROTOCOL = TCP) (HOST = earsrsepl-us.oracle.com) (PORT ~ 1521)) SQL> alter 5)crq irst LYSTENER = (io, ist (si best ; (GLOBAL DeNAME - orespy1.exanpte| Teva forthe sioek smn tiie must (ORACLE HOME = /ul/app/oraciesard Seselioaconatenaiong (SID_NAME = orclsbyl) SSNS eS Ea ) (stD_pesc (GLOaAL_BNAME =[oreLsbyi_DGHGRL. example. con] (ORACLE HOME = /uBT7app/oracle/product/Ii-z-6/abnone) (SID MANE = orclsbyl) oracleGedrsr34pii~ We Ble Edt View Terminal Tabs Help connected to: Oracte Databy witn the Pad and eat App fle Edt View Terminal Tas Lelp [oracleBedrsr3ép1-orelsby1 abs]$ vi /u01/app/oracte/product/11.2.0/9r34/network/(>) adnin/istener.ora [oracleQedrsr3ipl-orelsby1 dbs]§ srvett stop Listener [oractegedrsr3ap1-oreisby? dbs]s srvett start Listener [oracteeedrsr3epl-oreisbya abs]s tsnrett statusll soL> atter syster atte sou> [] (04_06_RMAM_create_phy2_sby and Real Apa SQL> alter systen atte SQL> alter systen atte SQL> alter systen atte SQL> alter oracle@edrsr34p! Tebs Help 1 fle Edt View Terminal Tabs Hep STATUS of the LISTENER LasTeneR Version TNSLSNR for Linux: Version 11.2.0.1.8 - Production Start Date 28-AUG-2009 11:30:26 Uptime D days @ hr. @ min. 9 sec Trace Level ofr security ON: Local 0S authentication sNuP OFF Listener parameter File /uBi/app/oracle/proauct/11.2.0/gria/network/admin/ List| Listener Log File /u02/app/oracte/diag/tnstsnr/edrsr36p1/1istener/alert/| og. xa Listening Endpoints Summary. (DESCRIPTION=( ADORESS=(PROTOCOL=ip: ADORESS=(PROTOCOL=tc{ Aferthe Oracle Netistenerls | com) (PORT=1523) ) restate, be new sence entty aivacas. Siaaiaiyi is teaisieted wh the listener. Tanta iraescee arena ants le Edt View Terminal Tabs Heb soo “Tho same Data Gua broker configuration steps must mpl cal he hosts in the confuuraton luctaon ladnin/tist| lnersatert/} lorr=1522))| Service "orclsbyl.exanple.con” has 1 instance(s). Instance "orcisbyi", status UNKNOWN, has 1 handlers) for this service Service "orclsby1 DGMGRL.exanple.con” has 1 instance(s) Instance “orclsby1", status UNKNOWN, has 2 handler(s] Tor this service ‘Tne commana completed successtuLt [oractogearsr3ep1-orcisby1 abs} ‘Bracle@eareraap fle Edt View Terminal Tabs Help SOL> show parameter dg_broker_start ane ag_broker_start sol SQL» alter system sot dg broker start ~ TRUE; Service "orcisbyl.exanple.com™ has 1 instances). Instance “orclsbyl", status UNKNOWN, has 1 handler(s) for this service. Service "orcisby1_DGHGRL.example.con" has 1 instance(s]. ladnin/1ist| lnersatert/} lort=1522) | Instance “orclsbyl", status UNKNOWN, has 1 handler(s] for this service The comand completed succasstutt) [oractegedrsr36p1-orcisby1 dbs}s 04. D6_RMAN-create_shys_sby 5 Cetera sie iss flo Edt View Termnel Tabs Help SQL> show parameter ag broker start NAME dg_broker_start sol> SQL> alter systen set dg broker start = TRUE; System altered. SOL> show parameter dg_broker_start luction NAME ag broker start. boolean SQL> exit Disconnected fron Oracle Database Lig Enterprise Edition Release 11.2.0.1.0 - Pr| eduction With the Partitioning, Autonatic Storage Management, OLAP, Data Mining and Real Application Testing options [oracteQedrsr34p1-orclprny ~1§ clearf ladnin/1ist} Inersatert/} jor=1521)) Service “orclsbyl.exanple.con” has 1 instance(s). Instance "orclsby1", status UNKNOWN, has 1 handler(s) for this service, Service “orclsby1_DGNGRL.exanple.con” has 1 instance(s) Instance "orclsby1", status UNKNOWN, has 1 handler(s) for this service. . ‘he commana completes cuccesstutt} [oracle@edrsr36p1-orclsty1 dbs) AO ee loracleGedrsr34pL-orclpray “15 vi /u01/app/oracle/product/11,2.0/grid/network/ad[*) nin/listener.orall Service “orclebyl, exenple com” has 1 instance(s). Instance “ore\sbyi", status UNKNOM, nas 1 handler(s) Tor this service: service “orcisby2 OGYGRL example. con” nas 1 instance(s)- Instance “orclsbyi", status UMNOW, has 1 handler(s) for this service... ‘he comang conpleted successtully Toractesesrsr3ep2-orctaby2 0215 [) Cennercinens Ble Edt View Terminal Tabs Help = vaowse” ern ~ ro | Regan nese (ADDRESS ~ (PROTOCOL ~ TCP) (! simuarm moce creator at 7 ) ) [SID_LIST_LISTENER = (S1D_LIST (STD_DESC (GLOBAL_DaNaME = orctprny.example.com) (ORACLE HONE = /uo1/app/0/ ac e/product/11.2.¢/avnone) (SID_NANE = orcipray) } jaamin/1ist} (siD_pEsc ~ {GLOBAL DSIANE ~ orcLprmy DGMGRL .example.con) peremeney (ORACLE HONE ~ /u02/app/oracle/product/11.2.0/dbhone) (STD_NANE oretpray) ) ) lonT=1521) | Service “orcisbyi.exanple.con™ nas 1 instance(s). Instance “ercvsbyl", status UNKNOWN, ar 1 handler(s) Tor this service... service "orclsby1 OGHGRL.exanple.con nag 1 anztance|3). Instance “erctabyl", stavus UMKNOW, has 1 handler(s) for this service... The conmand completed successtully Toractegesrsedepl-oretsbyl obsi§ [] Ceacesieen ia a [oraclegedrsr34pl-orciprny ~18 vi /u01/app/oracle/product/11.2.0/grid/network/ad nin/Listener.ora [oraclegedrsr34pt-orclpray ~1$ srvctl stop Listener foraclegedrsr34pl-orciprny ~1s srvctl start Listener foraclegedrsr3épl-orciprny ~15 Isnrett statusll jorr=1521)) Service “orelsbyl. exanple.con” has 1 instance(s). Instance *orclsbyl", status UNKNOWN, has 1 handler(s) for this service... Service "orclsby! OGYGRL exanple.con” has 1 instance(s). Instance "orelsbyl", statue UNKNOAN, hos 1 nandler(s) Tor this service... ‘Tho. commana conpisted’ successtully (oraclegedrsrs6pi-erctsbyl ats] (] Geoenenate Ble Eat view Terminal Tabs Help STATUS of the LISTENER nuas LasTENeR Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production Start Date 28-AUG-2009 11:37:33 Uptine 0 days @ hr. 8 nin. 41 sec Trace Level off Security ON: Local 05 Authentication suse OFF Listener Parameter File /uB1/app/oracle/product/11.2.6/grid/network/admin/ List| Listener Log Fite /u92/app/oracte/aiag/tnstsnr/earsr3api/Listener/atert/| Log. xm Listening Endpoints Summary. (DESCRIPTION~(ADDRESS~(PROTOCOL~ipc) [KE (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp) (HO) ) Services summary Service “orcipray.exanple com” has 1 Instance(s] Instance “orclpray”, status UNKNOWN, nas 1 handler(s) fer thas service. service “orcipray DGNGRL.exanple.con” has 1 instance(s)- Instance “orciprny”, status UNKNOWN, as 1 nandler(s) Tor this service. The comand conpleted successtally [oraclegedrsr34p1-orclprny -1$ ‘nor na brace Net steers retard tha pew sence detriions hesarre wile Service “orclsbyl exanple.com” has 1 instance(s) Instance “arcisbyi", status UNKNOWN, has 1 handler(s) Tor this service Service "orclsby1 DGMGRL.exampLe.con” has 1 instance(s). Instance "orclsbyi", status UNKNOWN, nas 2 handler|s) Tor thas servace.. ‘tha conmand conpleted successfully {oracteaedrsrsepl-orcisbyi absis [| a oracleGedrsr34p3 Fle Edt View Terminal Taps Help Gacnaeieen ee Ble Edt View Terminal Tabs Help [oraclegedrsr34pl-arcipray ~15 dgagrt “Tho Data Guard commana tno inteace {DGWGR) enables uta carl end tora Cata Quaid confauraton using ar bro a file Edt View Jerminal Tabs Help Genoenieenes Ble Edit View Terminal Tabs Help [oraclegedrsr34p1-orclpry ~15 dgngrt DGMGRL for Linux: Version 11.2.0.1.0 - Production Copyright (c) 2086, 2609, Oracle. ALT rights reserved. Welcome to DGMGRL, type "help" for information DGMGRL> connect sys Pascwora connected. OGMGRL~ create configuration ‘DGcontigi’ as > primary aataoase 15 ‘orcipray* > connect 1dentitier 1s orcipray; Before you can monitor anximanage your ‘Data Guard envrsrmen you must ist tteate a broker contiguration and =n Sour primar cetebase. a Seren Ble Eck View Terminal Tabs Help Bacoencen see le Edt View Terminal Tabs Help Welcone to DGMGRL, type "help" for information. DGHGRL> connect sys Password: connected. DaMGRL> create configuration “DGContigi' as > primary aatavase 1s ‘orcipray” > connect identifier 15 orclprny; Configuration "DGContigl" created with primary database “orclpray" DGMGRL> show configuration Configuration - DGContigh Protection Mode: MaxPerrernance Databases orcipray - Primary aatapase Fast-Start Failover: OI: “Not you must aca your Configuration status: | stanebycatenases DISABLED DGNGRL> aad database ‘orcisbyL" as > connect identirier 1s orctsbylill SIA aes ATE fle Edit View Terminal Tabs Hele oract n Ble okt view Terminal Tabs Fast-Start Failover: DISABLED Configuration Status: DISABLED DGMGRL> add database ‘orcisby2" as > connect identitier is orctsbya; Database “orctspy1" aageq DGHGRL> snow contaguration Configuration - DGcontig1 Protection Mode: MaxPerfornance Databases: orclprny - Primary database forcsbyl - Physical standby database Fast-Start Failover: Finally you must enable your Configuration Status DH! sonfguration DISABLED DGHORL> enable configuration nea Lo a oracle@edrsr34pl.~ file Edit View Terminal Tabs Help Bieoeenses Bie Edit View Terminal Tabs Help ‘orcisby1 - Physical standby database Fast-Start Failover: DISABLED conrzguration status DISABLED Here ic the comaleted erfiquation. A ontguraton sats ot success insets DGHGRL> onable confaguration a heat Data Guard eonnguraton Enabled DGHGRL> show configuration [Configuration - DGConfigi Protection Node: MaxPerformance Databases orcipray ~ Primary database orcisbyl - Physical standby database Fast-Start Failover: DISABLED a Seren Ble Eck View Terminal Tabs Help Gaaoeueens le Edt View Terminal Tabs Help orelsbyl - Physical standby database Fast-Start Failover: DISABLED configuration status: DEsABLED DGHGRL> enable configuration Enabled. DGMGRL> ‘show configuration Configuration - DGContigh Protection Mode: MaxPerrernance Databases orcipray - Primary aatapase orclsbyl - Physical standby database Fast-Start Failover: 014. Theney Data Gusts kroker ‘soraguratin wll nah 28 estos 97 _petforming a swthover operation Configuration Status: success DGNGRL> switchover to orctsoy1; § 04 _0G_RMAN_croate_phy=_=by Lo. O oracle@s fle Edt View Terminal Tabs Help Baeoeeenee Ble Edt View Terminal Tabs Help Databases: orcipray - Prinary database foretsbyl - Physical stangby database Fast-Start Failover! DISABLED conrzguratien status SUCCESS DGHGRL> switchover to orclsbyl; Performing switchover NOW, please wait.. New primary database “orcisbyl" is opening... Operation requires shutdown of instance "orclprmy" on database “orclprny* Shutting down instance “orctprmy". ORA-61109: database not open Database disnounted. ORACLE instance shut down Operation requires startup of instance “orelpray” on database “orcipray” Starting instance "erctpray”. ORACLE instance started. Database mounted. Switchover succeeded, now primary is “orclsbyl" DGHERL> 04_0G_RMAN.create_phys_sby a o oracle@edrar34ph— Ble Edt View Terminal Tabs Het EEnoennenas fle Edt View Terminal Tabs Help ORA-01109: database not open Database dismounted. ORACLE instance shut down. Operation requires startup of instance “orclpray" on database “oretprny” Starting instance "orctpray” ORACLE instance started. Uatapase mountea Switchover succeeded, now prinary is "orclsbyl" OGHGAL> show confaguration Follving tne cwtshovoy, he alahaes hava swapped oes. Configuration - DGConfig] Protection Made: MaxPerfarsance wtabases: ‘orclsbyl - Primary database orciprmy - Physical stanapy aatabase Fast-Start Failover: DISABLED Configuration Status: SUCCESS oawaat> 05_0G_RMAM_creste_phye-chy 5 oracegearsp3:= fle Eoe View ermal Tabs Help 7 oracle @edrsr34pi Ble Edt View Terminal Tabs Help Sle Edit View Terminal Tabs Help Oracle Database Lig Enterprise Edition Release 11.2,0.1.0 - Production with the Partitioning, automatic Storage Managenent, OLAP, Data Mining Here is a confirmation ofthe ols ‘wth the former stancky database, ‘a oraclepedrsrsaph;~ Ble Edt View Terminal Tabs Hepp oracle@edrsr34pi:~ Ble Edit View Terminal Tabs Help a Bence mene eee ener rete ne nee es Bile Est View Terminal Tabs Help oracleGedrsr36pl-orclsby] dbs]§ sqiplus / as sysdba Start SQL*Plus: Release 11.2.6.1.9 Production on Fri Aug 28 12:04:22 2090 Copyright (c) 1982, 2609, oracle. ALL rights reserved. connected to: ConfigOracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production ith the Partitioning, Automatic Storage Management, OLAP, Data Mining “ye deakass ie alt compete gina darvosceaparains sich nog sh Fle Edt View Terminal Tabs Help Toracle@edrsr34p1-orclpray -1$ sqlplus / as sysdba SOL*Plus: Release 11.2.0.1.0 Production on Fri Aug 28 12:66:19 2608 Copyright (c) 1982, 2869, Oracle. All rights reserved connectes to: Oracle Database 11g Enterprise Eaition Release 11.2.8.1.0 - Proguction Wath the Partationing, Automatic Storage Management, OLAP, Data Mining ‘and Real Application Testing options SOL> select database role from vSdatabase; DATABASE_ROLE PHYSICAL STANDBY “The farmer primary database cortirns ts role 6s te new orysical stanly database, (04_06_RMAN create shy sby 2 ‘2 ccinman coe fle Edt View Terminal Tabs Help ibracie@edrersapir= Ble Edit View Terminal Tabs Help ORA-01109: database not open Database dismounted. ORACLE instance shut down. Operation requires startup of instance “orcipray" on database “eretpray” starting instance “orcipray”... ORACLE instance started. Database mounted. Switchover succeeded, new primary is "orclsbyl" DGHGRL> show configuration Configuration - 06Contigh Protection Mode: MaxPerfermance Databases: orctspyl - Primary catacase orciprmy - Physical standby database Fast-Start Failover: DISi "note swtenever vl tum the alabases io theirorigina roles, Configuration Status: success DGMGRL> switchover to oretprny: (2 orade@edrer34pli= Ble Eu view Terminal Tabs Help 7 Saunier Fle Edt View Terminal Tabs tielp Database: orcisbyl - Primary database orcipray - Physical standby database Fast-Start Failover: DISABLED contaguration status SUCCESS DGHGRL> switchover to orctpray: Performing switchover NOM, please wait... New primary database “orcipray" is opening. . Operation requires shutdown of instance "orclsby1" on database "orctsbyl" Shutting down instance “erctsbyl"... ORA-€1109: aatabase not open Datavase dismounted. ORACLE instance snut down. Operation requires startup of instance “orclsbyl" on database “orclsbyl” Starting instance "orclsbyl". ORACLE instance started. Database mounted Switchover succeeded, new prinary 1s Torctpray" DGMGRL> ‘a oracleGedrsr3apl;~ fle Edt View Terminal Tabs Hejp Ble Edt View Terminal Tabs Help ORA-61109: database not open Database dismounted. ORACLE instance shut down Operation requires startup of instance “oretsby1” on datanase *orctsby1* Starting instance ‘arcisby1* ORACLE instance started. Database mounted. switchover succeeded, new primary 1 ; DGHGRL> show contaguration Following a second suitehower the sftabasae are performing tne crgnal “oles This conclules he connguration Configuration - DGConfigi tdteatng ofie Data vard baker, Protection Node: MaxPerfornance D orclpray - Primary database orctsbyl - Physical standby database Fast-Start Failover: DISABLED canfiguratien status SUCCESS omeRL> oracteOedrsr34p3 Ble Edt View Terminal Tabs Hep oracieSearsrsapi'~ Fie Esit View Terminal Tabs Help Beenie ee eee cee eee ee fle Edt View Terminal Tabs Help loracle@edrsr36p1-orclsbyl dbs}s “Te fal pat orrs dernnstation shows an optonal ‘onfgurin step that vil be performed io make the pryslalctandey satacace ae errr ae posebi toe Ditmar database twas dered torn The mimarscalebase's caniaued wth an sernix stored in ASM whereas he RAL cafobase aupleation “Saale ale oystornebabe0 STFELE. Now, RUAN Wi De “use copy hestendoy sprue ib ASH. racle@edrsr34pl— Ble Edt View Terminal Tabs Help | Bie Et View Terminal Tabs Hep [oraclegesrsrsep1-orcisby1 abs]s sqlplus / as sysaba Rolease 11.2.0.1.0 Production on Fri Aug 28 12:11:44 2009 ALL rights reserved. vaLue string /u01/app/oracte/product/11.2.6 favnone/dns/spriteorcisbyi.ora | Heres the locaton athe ‘Stancby catabace SPeTLE. foe) 040 RAN cesta nia im a oraciegecrersaph;~ file Edit View Terminal Tabs Help oracie@edrsr34pii= 5 Eat Vey cenit tae Hap See eee “fle Eat View Terminal Tas Help Production Wath the Partitioning, Autoratic Storage Managenent, OLAP, Data Mining and Real Application Testing options S0L> show parameter spfile VALUE string /u91/app/oracte/product/11.2.0 /dbnome/dbs/sprileorctsbyl.ora Disconnectea from oracte Database 11g Enterprise Edition Release 11.2.¢.1.0 - Pr] 3 mining ang Real Application Testing options [oraclo@edrsr36pi-orcisbyl dbs|§ Ls orapworc! dr2orctsbyl.dat initorclsbyl.orapeshm orcilbyi a he orclsbyl.dat TkORCLSBYL spfileorctsbyl.ora [oracle@edrsr36p1-orclsby1 dbsI$ a oracle@edrsrsapii~ file Edit View Terminal Tabs Help: orecleedrsr34phi= fle Edt Yew Jermnal Taps Hep eee ee eee le Edt View Terminal Tabs Help Toreclegedrsr36pl-orclsby1 dbs]$ mean Recovery Manager: Release 11.2.0.1.0 - Praduction on Fri Aug 28 12:22:37 2090 Copyrignt (c) 1982, 2009, Gracle and/or its atriliates. ALL rights reserved RMAN> connect target sys target database Password: Proj connected to target database: ORCLPRMY (OBID-3434812727, not open) “sor tatamous tle sennecea tome etsy sata, Foal ropes ts target dataeso as aveutna. Ts Corasthevause Riss eporing te dbase nara, _nhienis he sare on both calabases and role valve of ‘hem amique nae parameter “inessence, RAN believes itis connected to the primary ‘Eras, seh cong afte recs ars wry pea Staub eaaossebachips sar be Use arse the yee (04_0G_RMAN_creata._phys_cby oO oracie@earsrsapl:~ fle Edt View Terminal Tabs Help oracle@edrsr34p! Ble Edt View Terminal Tabs Help Ble Edt View Terminal Taps Help [eractegearsr3ep1-orclsby1 abs]$ ran RUAN> backup as backupset spfite ‘This command wil make a baci ot the curtenifie system-pased sprzie 04_0G_RMAN_croate_phys_sby [2 a Oraclegedrsraaphi~ file Eat View ermal “aps Help oracie@edrer34pli= Bie Est View Jerminal Tabs Help {Ble Edit View Terminal Tabs Help Copyright (c) 1982, 2089, Oracle and/or its affiliates. All rights reserved RMAN> connect target sys target astabace Passuora: connectea to targot cataoase: ORCLPRNY (OBID-3434812727, not open) RMAN> backup as backupset sprite; Starting backup at 26-AUS-09 {using target database control file instead of recovery catalog allocates channel: ORA_DISK 1 channel ORA_DISK 1: 510-46 device type-DISK channel ORA_DISK 1: starting full datafile backup set Channel ORA_DISK_1: specifying datafite(s] in backup set Sncluding current SPPILE in backup set channel ORA_DISK1: starting piece 1 at 28-AUG-69 Channel ORA_DISK1: Tinished piece 1 at 28-AUG.60 piece nandie=sFRA/orcisbyi/vackupset/2909_o S9608s099 tag~TnG20090576T122450 conment=Ho] This command wl estorethe sprrLe fnannol ORA DISK 1: backup set complete, el] ba:kipto te cesred cston NABH, Finishoa backup at 28-AUS-b9 Rial restore spfile to “sDATA/orclsbyl/spriteorctseyL.ora® ill ‘a oracle@edrer34pi;~ fie Eat View Terminal Tabs lielo ‘ forac n a oracle @edrsr34pi fle Edt View Terminal Tabs Help Geena eee eee ieee eee ecu oractd HE Edt View Terminal Tabs Hep Starting restore at 28-AUG-09 using channel ORA DISK 1 channel ORA DISK 1: starting datafile backup set restore channel ORA_DISK_1: restoring SPFILE output file nane=+DATA/orclsbyl/spfileorctsbyl.ora channel ORA_DTSK_1: reading from backup piece +FRA/orclsbyl/backupset/2609_08_28 Yonsnf6_tag28090828t122459_0.287.690083899 channel ORA_DTSK_1; piece handle=+FRA/orclsbyl/backupset/2009_68_26/nnsnf@_tag20 9902281122459 _9.287.696083099 tag=TAG20000828T122450 channel ORA_DTSK 1: restored backup piece 1 channel ORA_OTSK 1: restore coxplete, elapsed tine: 00:00:01 Finished restore at 22-AUG-09 RMAK> exat Recovery Manager complete. [oraclegedrsr36p1-orclsbyl dbs]$ 15 “The fle system-based srerar drlorclsbyl.dat init.ora ‘canbe deleted dr2orclsbyl.dat initorclsbyl.ora peshn_b he_orctsby1.dat 1kORCLSBY1 snapct_oMisbyi.t [oraclededrsr36pl-orclsby1 dos}$ rm spfiteorcisby1.ora (04_DG_RMAN_create_phys_sby |. a pincness Ie File Eat View Terminal Tabs Help oracle@edrsr34pi-~ fle Edt View Jermminal Tabs Help fle Edit View Terminal Tabs Hel Starting restore at 26-AUG-09 using channel ORA_DTSK_1 channel OR4 O1SK_1: starting datafile backup set restore channel ORA_OISK 2: restoring SPFILE output rile name=+DATA/orcisbyi/spriteorctsby1.ora channel ORA OISK i: reading trom backup piece +FRA/Orcisbyl/backupset/2869 08 28 {nnsnt@ tag26000828t 122459 9.287 .696083000 channel ORA DISK 1: piece handle-+FRA/orclsby1/backupset/2009 08 28/nnsntd tag20 090028t122459_0.287.696083099 tag-TAG20090829T122459 {channel ORA_DISK 1: restored backup piece 1 channel ORA_OTSK 1: restore complete, elapsed time: 60:00:01 Finished restore at 28-AUG-09 @ RMAN> exit Recovery Hanager complete. Teraclegedrsr36p1-orctstyl dbsis ts drioresbyl.dat init.ora erapworelsbyl __spfileorclsbyl.ore dr2orelsby.dat initorcisby1.ora_peshm_orctsby1_6 hecorelaby1 dat TKORCLSBYt Ennpet mretabyl [oraclegedrsr3epl-orctsuy} abs)$ rm spriteoretseyt ora [oraclegedrsr3epl-orctseyl abs]$ vi anttorctsey?. ora 04_D6_RMAN.create_pivs_aby 2 a oracle@edrsr34pli~ Ble Eat View Terminal Tabs Hep oracle@edreraaphi~ file Edt View Terminal Tabs Help Eiunnneeoneereree | Ble Edt View Terminal Tas Help SPFILE="+DATA/arcisbyi/spriteorcisby1 ora ‘The standby instarce parameter ‘ie canbe adjustes to pomntic the ASWLOs6e0 STILE. DG_RMAN create phYe_ startup mount ORACLE instance started. fo] Total system Glopal Area 535662502 nytes of Faxea size 1357728 oytes Variable size 369100424 bytes {database Burters 159383552 bytes Redo Buffers 584i Config Database mounted. ‘SUCCE4 SOL> show parameter spfile ‘Toe agit hased srrinis nowbeing used sprite string _sDATA/orclsuyi/spriteorctsby1. SoU (04.06 _RMAN_croate_phye_=by ES a oreclegearsr3epi:= fle Eat Yew ermnal TaBe Helo Ble Edt View Terminal Tebs Help [oraclegedrsr34p1-orclprmy -]$ danart DGHGRL for Linux: Version 11.2.0.1.0 - Production Copyright (c) 2000, 2009, Oracle. ALL rights reserved. ieLcone to DGNGRL, type "help" for information. DGHGRL> connect sys Password: Connected. DGHGRL> show configuration Configuration - pGConfigl Protection Node: MaxPertornance Databases orclprny - Primary database orclsbyl - Physical standby database Fast-Start Failover: DISABLED Configuration Status SUCCESS “a final check confirns the ‘calus offre sertiguration -04_Dc_RMAN_croate_phye_ connect sys Passuora: connectea. DGHGRL> show contaguration Configuration - DGContigi Protection Mode: MaxPertormance Databases: orclprmy - Primary database orclsby1 - Physical standby database Fast-Start Failover: DI The stale ofeach ncivaual Contiguration status: | database can alsa te checked. SUCCESS DGNGRL> show database orcispy2 a Ee pcos ae stt fle Eat view Jermmal Tabs Hep Caeuenaeenaae Fle Eat View Terminal Tabs Help orclprny - Primary database orclsbyl - Physical standby database Fast-Start Failover: DISABLED this case, the physical Configuration Status: stendy unctionia es SUCCESS export, DGMGRL> show database orclsby1 natavase - orctspyt Role: PHYSICAL STANDBY Intendes State: APPLY-ON Transport Lag: © secends apply Lag: 8 seconas Real Time Query: OFF Anstance|s): DGMGRL> 04_DG_RMAN create_phy=_sby Sceeeineen View Terminal Tabs Help le Edit View Terminal Tabs Help orelsbyl - Physical standby database Fast-Start Failover: DISABLED contguration status: SUCCESS DGHGRL> show database orcisbyl Database - orclsbyl Rote PHYSICAL STANDBY Intendes state: APPLY-oN Transport Lag: 9 seconds eat Tine very: OFF te arrnae tons no como, You nave sean rewio toate 3 Dale Gute ieee ye ahysical standby database using RMAN active orcLsbyl ddetzhase cupliceton, You have also seen wi conigue tha Date Guar voter and Database Status: how itcan ba used to monitor and managea SUCCESS Baia Guard configuration DGMGRL> exit [oracleedrsr34p1-orcloray ~1S,

You might also like