On the primary database, Log Writer Network Server (LNS) process capture redo data being written by Log Writer and synchronously or asynchronously transmit the redo data to the standby database. he LNS process isolates Log Writer !rom the overhead o! transmission and !rom network disruptions. Synchronous redo transport (S"N#) re$uires the Log Writer on the primary database to wait !or acknowledgement !rom LNS that the standby has received the redo data and written it to a standby redo log be!ore it can acknowledge the commit to the client application. his insures all committed transactions are on disk and protected at the standby location. %synchronous redo transport (%S"N#) does not re$uire the Log Writer on the primary to wait !or acknowledgment !rom the standby database that redo has been written to disk& commits are acknowledged to the client application asynchronous o! redo transport. Physical Standby Database Backup / Reports Oracle Net FAL Primary Databas e Transaction s LGWR Online Redo Logs Archived Redo Logs ARCH RFS Standb y Redo Logs Archived Redo Logs ARCH MRP LS Real !ime A""ly
'etch %rchive Log ('%L) provides client(server mechanism !or shipping archived logs to standby !ollowing a communication loss between the primary and standby, !or automatic gap resolution and resynchroni)ation. %rchiver (%*#n) processes are always utili)ed to ship log !iles that are needed to resolve gaps. he !al+server and !al+client parameters are used !or the gap resolution. When ,*- !inds that an archive log is missing during media recovery, it sends the !al+client in!ormation to the server identi!ied by !al+server and re$uests !al+server to resend the !ile again. Standby database uses one or more *emote 'ile Server (*'S) processes on the standby database to receive redo data and write it to a !ile called a Standby *edo Log (S*L). he ,anaged *ecovery -rocess (,*-) is used to coordinate the application o! redo data to a physical standby database. .! the /ata 0uard 1roker is enabled, /ata 0uard also uses the /ata 0uard 1roker ,onitor (/,ON) and other process to manage and monitor the primary and standby databases as a uni!ied con!iguration. Creating physical standby database using new DUPLICATE FROM ACTIE DATA!A"E RMA# c$%%and #onventional backup(based standby db 2. #reate backup on primary 3. ,ove backup to standby site 4. *estore backup and recover Network(based standby 5 directly creates image copies on standby site New 6'*O, %#.78 /%%1%S89 clause ( #reates image copies o! !iles on the standby site over the network using parallel channels. ( No interim storage needed !or a copy o! the backup !ile. ( Simple steps per!ormed on the Standby server /o a so!tware(only install on the standby database system. Setup OracleNet. #reate a static listener entry !or the standby, start the listener. #reate Oracle Net connect descriptors !or the Standby at the -rimary site and !or the -rimary at the Standby site. #reate an init.ora !ile with only the /1N%,8 in it. #reate a password !ile with the same S"S password. #reate any necessary directories. Startup nomount the standby instance. 8:ecute the new duplicate command On primary db O*#L (Sp!ile S;L< S=OW -%*%,88* S-'.L8 .! not using S-'.L8 S;L<#*8%8 S-'.L8 '*O, -'.L8 S;L<S=>/OWN .,,8/.%8& S;L<S%*>-& (%rchivelog mode S;L<%*#=.78 LO0 L.S 5 i! not in archivelog mode S;L<S=>/OWN .,,8/.%8& S;L<S%*>- ,O>N& S;L<%L8* /%%1%S8 %*#=.78LO0& S;L<%L8* /%%1%S8 O-8N& S;L<%L8* /%%1%S8 'O*#8 LO00.N0& S;L< S8L8# LO0+,O/8,'O*#8+LO00.N0,O-8N+,O/8,/%%1%S8+*OL8 '*O, 7?/%%1%S8& ('orce logging @ nologging, append hint are ignored #reate standby redo log!iles 5 si)e @must be same as online redo log !iles 5 number 5 one more than the number o! online redo log groups 5 can be multiple:ed 5 created on primary (!or role reversal) 5 *,%N will create on standby db S;L< S8L8# 1"8SA2B3CA2B3C '*O, 7?LO0 5 DB, S;L<%L8* /%%1%S8 %// S%N/1" LO0'.L8 E8@F%--F7.G%"8HFO*%/%%FO*#LFS*LB2.LO0I S.J8 DB,& S;L<%L8* /%%1%S8 %// S%N/1" LO0'.L8 E8@F%--F7.G%"8HFO*%/%%FO*#LFS*LB3.LO0I S.J8 DB,& S;L<%L8* /%%1%S8 %// S%N/1" LO0'.L8 E8@F%--F7.G%"8HFO*%/%%FO*#LFS*LB4.LO0I S.J8 DB,& S;L<%L8* /%%1%S8 %// S%N/1" LO0'.L8 E8@F%--F7.G%"8HFO*%/%%FO*#LFS*LBC.LO0I S.J8 DB,& S;L< S8L8# 0*O>-K,1"8SA2B3CA2B3C '*O, 7?S%N/1"+LO0& S;L<S8L8# 0*O>-K,,8,18* '*O, 7?LO0'.L8 W=8*8 "-8LMS%N/1"M& "-8 @ ONL.N8 O* S%N/1" S;L<%L8* S"S8, S8 LO0+%*#=.78+#ON'.0LI/0+#ON'.0L(O*#L,O*#LS1")I S#O-8L1O=& >ses the DG_CONFIG attribute to list the DB_UNIQUE_NAME o! the primary and standby databases. S;L< %L8* S"S8, S8 LO0+%*#=.78+/8S+3LIS8*7.#8LO*#LS1" L0W* %S"N# 7%L./+'O*L(ONL.N8+LO0'.L8,-*.,%*"+*OL8) /1+>N.;>8+N%,8LO*#LS1"I S#O-8L1O=& 7alid only !or the primary role, this destination transmits redo data to the remote physical standby destination orclsby. S;L< S=OW -%*%,88* LO0+%*#=.78+/8S+3 S;L<%L8* S"S8, S8 LO0+%*#=.78+/8S+S%8+3LI8N%1L8I S#O-8L1O=I& ((/e!ault is enable S;L< S=OW -%*%,88* LO0+%*#=.78+/8S+S%8+3 N select dest+id,dest+name,status, type,destination !rom v?archive+dest& When primary is in standby role S;L< %L8* S"S8, S8 /1+'.L8+N%,8+#ON78*LMFO*#LS1"FM,MFO*#LFM S#O-8LS-'.L8& S;L< %L8* S"S8, S8 LO0+'.L8+N%,8+#ON78*LMFO*#LS1"FM,MFO*#LFM S#O-8LS-'.L8& S;L< %L8* S"S8, S8 S%N/1"+'.L8+,%N%08,8NLM%>OM S#O-8L1O=& When new tablespaces are created or datat!iles are added to primary db, they are automatically created on standby database. S;L<%L8* S"S8, S8 '%L+S8*78*LMO*#LS1"M S#O-8L1O=& S;L<%L8* S"S8, S8 '%L+#L.8NLMO*#LM S#O-8L1O=& hese are NS service names =ere O*#LS1" is the service name (NS entry) to connect to standby db O*#LS1" #on!igure NSN%,8S.ora in O*%#L8+=O,8FN8WO*HF%/,.N to connect to standby database O*%#L8+=O,8 @ 8@FappFviOayekFproductF22.2.BFdb+2 O*#L L (/8S#*.-.ON L (%//*8SS L (-*OO#OL L #-)(=OS L L(CBB4CBP)(-O* L 2D32)) (#ONN8#+/%% L (S8*78* L /8/.#%8/) (S8*7.#8+N%,8 L orcl) ) ) O*#LS1" L (/8S#*.-.ON L (%//*8SS L (-*OO#OL L #-)(=OS L L(CBB4CBP)(-O* L 2D32)) (#ONN8#+/%% L (S8*78* L /8/.#%8/) (S8*7.#8+N%,8 L O*#LS1") ) ) Statically register the primary db orcl with listener 5 re$uired incase o! !ailover #on!igure L.S8N8*.ora in O*%#L8+=O,8FN8WO*HF%/,.N S./+L.S+L.S8N8* L (S./+L.S L (S./+/8S# L (0LO1%L+/1N%,8 L O*#L) (O*%#L8+=O,8 L 8@FappFviOayekFproductF22.2.BFdb+2) (S./+N%,8 L O*#L) ) ) L.S8N8* L (/8S#*.-.ON+L.S L (/8S#*.-.ON L (%//*8SS L (-*OO#OL L .-#)(H8" L 8Q-*O#2D32)) ) (/8S#*.-.ON L (%//*8SS L (-*OO#OL L #-)(=OS L L(CBB4CBP)(-O* L 2D32)) ) ) LSN*#L LSN*#L< reload LSN*#L< status LSN*#L< services 0o to O*%#L8+=OL8 (8@FappFviOayekFproductF22.2.BFdb+2) /%%1%S8 !older #opy -W/orcl.ora to standby site in the same location as -W/orclsby.ora (On uni: go to dbs !older in O*%#L8+=O,8 and copy orpworcl.ora to standby database in the same location as orapworclsby.ora) O* create password !ile on standby db using orapwd utility. -assword has to be same as that o! primary db. he password !or the S"S user on every database in a /ata 0uard con!iguration must be identical !or redo transmission to succeed. he password !ile must be re(copied each time the SYSDBA or SYSOPER privilege is granted or revoked and whenever the login password o! a user with these privileges is changed. "ou may need '-, or some other remote !ile trans!er mechanism, i! you are using di!!erent servers. orapwd !ileLO*%#L8+=O,8F/%%1%S8F-W/O*#LS1".O*% passwordLwipro entriesLD !orceLy ignorecaseLy On standby database create initorclsby.ora !ile in O*%#L8+=O,8F/%%1%S8 !older with only one parameter /1+N%,8Lorclsby On standby db !or window 5 create windows service using oradim oradim 5N8W 5S./ orclsby 5S%*,O/8 manual 5-'.L8 E8@FappFviOayekFproductF22.2.BFdb+2FdatabaseFinitorclsby.oraI Statically register the standby db with listener (because initially standby db will be started in nomount stage 5 dynamic registration happens by -,ON when the db is opened) #on!igure L.S8N8*.ora in O*%#L8+=O,8FN8WO*HF%/,.N S./+L.S+L.S8N8* L (S./+L.S L (S./+/8S# L (0LO1%L+/1N%,8 L O*#Lsby) (O*%#L8+=O,8 L 8@FappFviOayekFproductF22.2.BFdb+2) (S./+N%,8 L O*#Lsby) ) ) L.S8N8* L (/8S#*.-.ON+L.S L (/8S#*.-.ON L (%//*8SS L (-*OO#OL L .-#)(H8" L 8Q-*O#2D32)) ) (/8S#*.-.ON L (%//*8SS L (-*OO#OL L #-)(=OS L L(CBB4CBP)(-O* L 2D32)) ) ) LSN*#L LSN*#L< reload LSN*#L< status LSN*#L< services #on!igure NSN%,8S.ora in O*%#L8+=O,8FN8WO*HF%/,.N to connect to primary database O*#L L (/8S#*.-.ON L (%//*8SS L (-*OO#OL L #-)(=OS L L(CBB4CBP)(-O* L 2D32)) (#ONN8#+/%% L (S8*78* L /8/.#%8/) (S8*7.#8+N%,8 L orcl) ) ) O*#LS1" L (/8S#*.-.ON L (%//*8SS L (-*OO#OL L #-)(=OS L L(CBB4CBP)(-O* L 2D32)) (#ONN8#+/%% L (S8*78* L /8/.#%8/) (S8*7.#8+N%,8 L O*#LS1") ) ) O*%#L8+1%S8 @ 8@FappFviOayek On standby create the !ollowing !olders 2. go to O*%#L8+1%S8Fadmin 5 create !older O*#LS1" 3. go to O*%#L8+1%S8FadminForclsby 5 create !older adump @ this is the audit trail destination 4. go to O*%#L8+1%S8 5 create !older oradata C. go to O*%#L8+1%S8Foradata 5 create !older orclsby D. go to O*%#L8+1%S8 5 create !older !lash+recover+area R. go to O*%#L8+1%S8F!lash+recovery+area 5 create !older orclsby P. go to O*%#L8+1%S8FdiagFrdbms 5 create !older orclsby S. go to O*%#L8+1%S8FdiagFrdbmsForclsby 5 create !older orclsby On standby db ( O*#LS1" Set O*%#L8+S./LO*#LS1" 8:port O*%#L8+S./ 5 uni: only S$lplus Anolog S;L<#ONN A %S S"S/1% S;L<S%*>- NO,O>N -'.L8LI 8@F%--F7.G%"8HF-*O/>#F22.2.BF/1+2F/%%1%S8F.N.O*#LS1".O*%I& S;L<8Q.& On primary site Set O*%#L8+S./LO*#L 8:port O*%#L8+S./ *,%N *,%N<connect target sysAwipro connected to target database@ O*#L *,%N<connect au:iliary sysAwiproTorclsby connected to au:iliary database@ O*#LS1" (not mounted) *,%N<Tcreate+standby.t:t #reate+standby.t:t *>N U %LLO#%8 #=%NN8L -2 "-8 /.SH& %LLO#%8 %>Q.L.%*" #=%NN8L S2 "-8 /.SH& />-L.#%8 %*08 /%%1%S8 'O* S%N/1" '*O, %#.78 /%%1%S8 S-'.L8 -%*%,88*+7%L>8+#ON78* MO*#LM,MO*#LS1"M S8 /1+>N.;>8+N%,8LMO*#LS1"M S8 /1+'.L8+N%,8+#ON78*LMFO*#LFM,MFO*#LS1"FM S8 LO0+'.L8+N%,8+#ON78*LMFO*#LFM,MFO*#LS1"FM S8 #ON*OL+'.L8SLM8@F%--F7.G%"8HFO*%/%%FO*#LS1"F#ON*OLB2.#LM S8 LO0+%*#=.78+,%Q+-*O#8SS8SLMDM S8 '%L+#L.8NLMO*#LS1"M S8 '%L+S8*78*LMO*#LM S8 S%N/1"+'.L8+,%N%08,8NLM%>OM S8 LO0+%*#=.78+#ON'.0LM/0+#ON'.0L(O*#L,O*#LS1")M S8 LO0+%*#=.78+/8S+S%8+3LM8N%1L8M S8 LO0+%*#=.78+/8S+3LMS8*7.#8LO*#L L0W* %S"N# 7%L./+'O*L(ONL.N8+LO0'.L8,-*.,%*"+*OL8) /1+>N.;>8+N%,8LO*#LM & V -arameter+value+convert 5 is used to set values o! a bunch o! directory related init parameters like user+dump+dest, core+ , background+, audit+!ile+dest 5 replaces O*#L with O*#LS1" !or these parameters 5 e:cept !or data !iles and log !ile destinations. *,%N<8Q.& On the primary system Set O*%#Le+S./Lorcl 8:port O*%#L8+S./ S$lplus Anolog S;L<#ONN A %S S"S/1% S;L<%L8* S"S8, SW.#= LO0'.L8& S;L< S8L8# ,%Q(S8;>8N#8K) '*O, 7?LO0& On the standsby system Set O*%#Le+S./Lorclsby 8:port O*%#L8+S./ S$lplus Anolog S;L<#ONN A %S S"S/1% S;L< S8L8# O-8N+,O/8,/%%1%S8+*OL8, -*O8#.ON+,O/8, LO0+,O/8,'O*#8+LO00.N0 '*O, 7?/%%1%S8& S;L< %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 >S.N0 #>**8N LO0'.L8 /.S#ONN8#& current log!ile 5 real time apply disconnect 5 ,*- does the recovery in background S;L< S8L8# ,8SS%08 '*O, 7?/%%0>%*/+S%>S& S;L< S8L8# N '*O, 7?%*#=.78+0%-& S;L< S8L8# -*O#8SS,#L.8N+-*O#8SS, S%>S, S8;>8N#8K, 0*O>-K '*O, 7?,%N%08/+S%N/1"& S;L< S8L8# ,%Q(S8;>8N#8K) '*O, 7?LO0& S;L< S8L8# S8;>8N#8K, %--L.8/ '*O, 7?%*#=.78/+LO0& S;L< S8L8# *8#O78*"+,O/8 '*O, 7?%*#=.78+/8S+S%>S W=8*8 /8S+./L3& (( on primary and standby Converting to snapshot standby : On Standby /1 S;L< %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 #%N#8L& ( stops ,*- process S;L< S8L8# 'L%S=1%#H+ON '*O, 7?/%%1%S8& ( NO S;L< S8L8# N '*O, 7?*8SO*8+-O.N& ( NO *OWS S;L< %L8* /%%1%S8 #ON78* O SN%-S=O S%N/1"& ( this enables !lashback logging and creates a restore point S;L< S=>/OWN .,,8/.%8& S;L<S%*>-& S;L< S8L8# O-8N+,O/8,/%%1%S8+*OL8, 'L%S=1%#H+ON '*O, 7?/%%1%S8& Setup Test Environments using Snapshot Standbys Convert Physical Standby to Snapshot Standby and open for writes by the testing applications ALTER DATABASE CO!ERT TO SAPS"OT STADB#$ Discard testing writes and catch%&p to pri'ary by applying logs ALTER DATABASE CO!ERT TO P"#S(CAL STADB#$ Preserves )ero data loss B&t no real ti'e *&ery or fast failover Si'ilar to storage snapshots+ b&t, Provides DR at the sa'e ti'e Single copy of storage Physical Standby Apply Logs Snapshot Standby Perform Testing Open Database Back out Changes Continuous Redo Shipping O-8N+,O/8 /%%1%S8+*OL8 'L%S=1%#H+ON (((((((((( (((((((((((((((( (((((((((((((((((( *8%/ W*.8 SN%-S=O S%N/1" *8SO*8 -O.N ONL" S;L< S8L8# N '*O, 7?*8SO*8+-O.N& ( one row 5one restore point S;L< #*8%8 %1L8 S#O.SN%-S=O+2 (# 7%*#=%*(2BB))& able created. S;L< .NS8* .NO S#O.SN%-S=O+2 7%L>8S (M%1L8 #*8%8/ .N SN%- ,O/8M)& 2 row created. S;L< #O,,.& #ommit complete. On primary database S;L< #*8%8 %1L8 S#O.-+N8W+%1L8 (# 7%*#=%*(2BB))& able created. S;L< .NS8* .NO S#O.-+N8W+%1L8 7%L>8S (MN8W %1L8 #*8%8/ .N -*.,%*" W=8N S1 " .N SN%-S=O ,O/8M)& 2 row created. S;L< #O,,.& #ommit complete. S;L< %L8* S"S8, SW.#= LO0'.L8& System altered. S;L< A System altered. Converting back to physical standby on Standby /1 S;L< S8L8# N '*O, 7?LO0& S;L< S8L8# N '*O, 7?S%N/1"+LO0& S;L< S8L8# S8;>8N#8K, %--L.8/ '*O, 7?%*#=.78/+LO0& S;L< S=>/OWN .,,8/.%8& S;L<S%*>- ,O>N& S;L< %L8* /%%1%S8 #ON78* O -="S.#%L S%N/1"& S;L< S=>/OWN .,,8/.%8& S;L<S%*>- ,O>N& S;L< S8L8# O-8N+,O/8,/%%1%S8+*OL8, 'L%S=1%#H+ON '*O, 7?/%%1%S8& S;L< S8L8# N '*O, 7?*8SO*8+-O.N& ( no rows S;L< S8L8# O-8N+,O/8,/%%1%S8+*OL8, -*O8#.ON+,O/8, LO0+,O/8,'O*#8+LO00.N0 '*O, 7?/%%1%S8& S;L< %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 >S.N0 #>**8N LO0'.L8 /.S#O NN8#& current log!ile 5 real time apply disconnect 5 ,*- does the recovery in background S;L< S8L8# ,8SS%08 '*O, 7?/%%0>%*/+S%>S& S;L< S8L8# N '*O, 7?%*#=.78+0%-& S;L< S8L8# -*O#8SS,#L.8N+-*O#8SS, S%>S, S8;>8N#8K, 0*O>-K '*O, 7?,%N%08/+S% N/1"& S;L< S8L8# ,%Q(S8;>8N#8K) '*O, 7?LO0& S;L< S8L8# S8;>8N#8K, %--L.8/ '*O, 7?%*#=.78/+LO0& ACTIVE DATA GUAD On standby db S;L< %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 #%N#8L& /atabase altered. S;L< %L8* /%%1%S8 O-8N *8%/ ONL"& /atabase altered. S;L< %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 >S.N0 #>**8N LO0'.L8 /.S#ONN8#& /atabase altered. -er!orm log switches on -rimary and note down ma: se$uenceK. Physical Standby with Real-Time Query Physical Standby Database Primary Database Real-time Queries Contin#o#s Redo Shi"ment and A""ly Conc#rrent Real$!ime %#ery Read%only *&eries on physical standby conc&rrent with redo apply R-A BAC./P01ast incre'ental bac2&p on physical standby 3 only with Active Data 4&ard option5 S;L< S8L8# ,%Q(S8;>8N#8K) '*O, 7?LO0& ,%Q(S8;>8N#8K) (((((((((((((( 2C4 S;L< S8L8# O-8N+,O/8,/%%1%S8+*OL8 '*O, 7?/%%1%S8& S;L< /8S# S#O.-+N8W+%1L8 Name NullW ype ((((((((((((((((((((((((((((((((((((((((( (((((((( (((((((((((((((((((((((((((( # 7%*#=%*3(2BB) S;L< S8L8# N '*O, S#O.-+N8W+%1L8& # (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((( new table created in primary when sby in snapshot mode S;L< /8S# S#O.SN%-S=O+2 8**O*@ O*%(BCBC4@ obOect S#O.SN%-S=O+2 does not e:ist ON -*.,%*" /1 5 .NS8* % *OW .NO S#O./8- and commit ON S%N/1" /1 5 ;>8*" S#O./8- O # =8 N8WL" %//8/ *OW -rotection ,odes@ !a"i#u# Protection Synchroni)ed *edo write. -rimary database shuts down i! a !ault occurs at write at the standby. !a"i#u# Availability Synchroni)ed *edo write. -rotection mode temporarily switches over to ,a:imum per!ormance i! write !ails at the standby. !a"i#u# Per$or#ance %synchroni)ed *edo write. *un the !ollowing on the -rimary /1 %lter system set log+archive+dest+3 L sync a!!irm Shutdown immediate& Startup mount %L8* /%%1%S8 S8 S%N/1" /%%1%S8 O ,%Q.,.J8 U-*O8#.ON X %7%.L%1.L." X -8*'O*,%N#8V& %lter database open& Minimum Requirements for Data Protection Modes a!imum Protection a!imum A"ailability a!imum Performance *edo archival process LGWR LGWR LGWR or ARCH Network transmission mode SYNC SYNC SYNC or ASYNC when using LGWR process. SYNC i! using ARCH process /isk write option AFFIRM AFFIRM AFFIRM or NOAFFIRM Standby redo log re$uiredW "es "es Optional, but recommended The AFFIRM attribute is used to specify that redo received from a redo source database is not acknowledged until it has been written to the standby redo log. The NOAFFIRM attribute is used to specify that received redo is acknowledged without waiting for received redo to be written to the standby redo log. %''.*,((ensures all disk .AO to the archived redo log !iles or standby redo log !iles at the standby destination is per!ormed synchronously and completes success!ully be!ore online redo log !iles on the primary database can be reused. he AFFIRM attribute is re$uired to achieve no data loss. NO%''.*,((indicates all disk .AO to archived redo log !iles and standby redo log !iles is to be per!ormed asynchronously& online redo log !iles on the primary database can be reused be!ore the disk .AO on the standby destination completes. ;uery the AFFIRM column o! the V$ARCHIVE_DES !i:ed view to see whether or not the AFFIRM attribute is being used !or the associated destination. S8L8# /8S+./,S%>S,LO0+S8;>8N#8,%''.*,,-*O#8SS,*%NS,.+,O/8, #O,-*8SS.ON '*O, 7?%*#=.78+/8S W=8*8 /8S+./L3& Veri$y the use o$ $ollo%ing setting S;L<%L8* S"S8, S8 S%N/1"+'.L8+,%N%08,8NLM%>OM S#O-8L1O=& #reate new tablespace in -rimary /1 S;L< #*8%8 %1L8S-%#8 N8W+S /%%'.L8 M8@F%--F7.G%"8HFO*%/%%FO*#LFN8W+S+B2./1'M S.J8 2,& 7eri!y that the new tablespace is automatically created in stand by running the !ollowing two in standby db S;L< S8L8# N%,8 '*O, 7?/%%'.L8& S;L< S8L8# N%,8 '*O, 7?%1L8S-%#8& /rop the newly created tablespace in -rimary /1 S;L< /*O- %1L8S-%#8 N8W+S /%%'.L8 .N#L>/.N0 #ON8NS %N/ /%%'.L8S& 7eri!y that the new tablespace and data!ile are automatically droped in stand by running the !ollowing two in standby db S;L< S8L8# N%,8 '*O, 7?/%%'.L8& S;L< S8L8# N%,8 '*O, 7?%1L8S-%#8& !anual &%itchover and 'ailover using &()*Plus 2. Log onto the current primary database as S"S/1% and per!orm the !ollowing steps@ (in the case o! a !ailover, skip this step) S8L8# SW.#=O78*+S%>S '*O, 7?/%%1%S8& .! switchover+status is 6Sessions %ctive9 then %L8* /%%1%S8 #O,,. O SW.#=O78* O -="S.#%L S%N/1" W.= S8SS.ON S=>/OWN& else %L8* /%%1%S8 #O,,. O SW.#=O78* O S%N/1"& S=>/OWN .,,8/.%8& S%*>- ,O>N& %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 >S.N0 #>**8N LO0'.L8 /.S#ONN8#& S8L8# /%%1%S8+*OL8,O-8N+,O/8 '*O, 7?/%%1%S8& 3. Log onto the standby database that is about to become primary as S"S/1% and per!orm the !ollowing steps@ 'or !ailover only, submit the !ollowing@ %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 '.N.S=& 'or switchover and !ailover proceed with these steps@ %L8* /%%1%S8 #O,,. O SW.#=O78* O -*.,%*"& S=>/OWN .,,8/.%8& S%*>-& S8L8# /%%1%S8+*OL8,O-8N+,O/8 '*O, 7?/%%1%S8& Data Guard +roker Con$igurtion: On primary db@ S;L< %L8* S"S8, S8 /0+1*OH8*+S%*L*>8 S#O-8L1O=& S./+L.S+L.S8N8* L (S./+L.S L (S./+/8S# L (0LO1%L+/1N%,8 L O*#L) (O*%#L8+=O,8 L 8@FappFviOayekFproductF22.2.BFdb+2) (S./+N%,8 L O*#L) ) (S./+/8S# L (0LO1%L+/1N%,8 L orcl+/0,0*L) (O*%#L8+=O,8 L 8@FappFviOayekFproductF22.2.BFdb+2) (S./+N%,8 L orcl) )
) L.S8N8* L (/8S#*.-.ON+L.S L (/8S#*.-.ON L (%//*8SS L (-*OO#OL L .-#)(H8" L 8Q-*O#2D32)) ) (/8S#*.-.ON L (%//*8SS L (-*OO#OL L #-)(=OS L L(CBB4CBP)(-O* L 2D32)) ) ) LSN*#L LSN*#L<reload On standby db@ S;L< %L8* S"S8, S8 /0+1*OH8*+S%*L*>8 S#O-8L1O=& S./+L.S+L.S8N8* L (S./+L.S L (S./+/8S# L (0LO1%L+/1N%,8 L orclsby) (O*%#L8+=O,8 L 8@FappFviOayekFproductF22.2.BFdb+2) (S./+N%,8 L orclsby) ) (S./+/8S# L (0LO1%L+/1N%,8 L orclsby+/0,0*L) (O*%#L8+=O,8 L 8@FappFviOayekFproductF22.2.BFdb+2) (S./+N%,8 L orclsby) ) ) L.S8N8* L (/8S#*.-.ON+L.S L (/8S#*.-.ON L (%//*8SS L (-*OO#OL L .-#)(H8" L 8Q-*O#2D32)) ) (/8S#*.-.ON L (%//*8SS L (-*OO#OL L #-)(=OS L L(CBB4CBP)(-O* L 2D32)) ) ) LSN*#L LSN*#L<reload On -rimary db S8 O*%#L8+S./LO*#L /0,0*L /0,0*L< #ONN8# S"SAW.-*O /0,0*L< #*8%8 #ON'.0>*%.ON E/0#ON'.02I %S -*.,%*" /%%1%S8 .S EO*#LI #ONN8# ./8N.'.8* .S O*#L& /0,0*L< S=OW #ON'.0>*%.ON /0,0*L< %// /%%1%S8 EO*#LS1"I %S #ONN8# ./8N.'.8* .S O*#LS1"& /0,0*L< S=OW #ON'.0>*%.ON /0,0*H< 8N%1L8 #ON'.0>*%.ON /0,0*L< S=OW #ON'.0>*%.ON /0,0*L< S=OW /%%1%S8 EO*#LI /0,0*L< S=OW /%%1%S8 EO*#LS1"I =ere O*#L and O*#LS1" are /1+>N.;>8+N%,8Is #on!iguration !ile is created in 8@FappFviOayekFproductF22.2.BFdb+2Fdatabase !older s!o" #$r$%&'&rs ()_bro*&r Converting to &napshot standby using DG +roker : On standby db& S;L< S8L8# 'L%S=1%#H+ON '*O, 7?/%%1%S8& ((( no S8 O*%#L8+S./LO*#LS1" /0,0*L /0,0*L< #ONN8# S"SAS"S /0,0*L<8/. /%%1%S8 EO*#LS1"I S8 S%8LI%--L"(O''I& S;L< S=>/OW, .,,8/.%8& S;L< S%*>- ,O>N& S;L< %L8* /%%1%S8 'L%S=1%#H ON& /0,0*L /0,*0L< #ONN8# S"SAS"S /0,0*L< 8/. /%%1%S8 EO*#LS1"I S8 S%8LI%--L"(ONI& On -rimary db S8 O*%#L8+S./LO*#L /0,0*L /0,0*L< #ONN8# S"SAS"S /0,0*L< #ON78* /%%1%S8 EO*#LS1"I O SN%-S=O S%N/1"& /0,0*L< S=OW #ON'.0>*%.ON #reate new table on both primary and snapshot standby. %!ter snapshot is converted back to physical standby 5 the newly create table in primary gets applied to physical standby and the newly created table snapshot is removed. Converting back to physical standby using DG +roker On primary db S8 O*%#L8+S./LO*#L /0,0*L /0,0*L< #ONN8# S"SAS"S /0,0*L< #ON78* /%%1%S8 EO*#LS1"I O -="S.#%L S%N/1"& /0,0*L< S=OW #ON'.0>*%.ON Active Data Guard using DG +roker : On standby db@ S8 O*%#L8+S./LO*#LS1" /0,0*L /0,0*L<#ONN8# S"SAS"S /0,0*L< 8/. /%%1%S8 EO*#LS1"I S8 S%8LI%--L"(O''I& S;L< %L8* /%%1%S8 O-8N *8%/ ONL"& S8 O*%#L8+S./LO*#LS1" /0,0*L /0,0*L<#ONN8# S"SAS"S /0,0*L< 8/. /%%1%S8 EO*#LS1"I S8 S%8LI%--L"(ONI& >pdate the primary db and $uery the standby to view the changes. Con$igure 'ast &tart 'ailover : -ut both the databaseIs in !lashback mode, this helps to rewind the database to a state prior to its failure. On standby database O*#LS1"@ S=>/OWN .,,8/>%8& On primary database O*#L@ S=>/OWN .,,8/.%8& S%*>- ,O>N& %L8* /%%1%S8 'L%S=1%#H ON& S8L8# 'L%S=1%#H+ON '*O, 7?/%%1%S8& On standby database O*#LS1"@ S%*>- ,O>N& %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 #%N#8L& %L8* /%%1S8 'L%S=1%#H ON& S8L8# 'L%S=1%#H+ON '*O, 7?/%%1%S8& %L8* /%%1%S8 O-8N *8%/ ONL"& %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 >S.N0 #>**8N LO0'.L8 /.S#ONN8#& !"!R# /0,0*L< connect sysAWiproTorcl DGMGRL+ EDI DAABASE ,orcl- SE PROPERY F$s'S'$r'F$.lo/&r$r)&' 0 1orclsby12 DGMGRL+ SHOW DAABASE VERBOSE ,orcl-2 DGMGRL+ EDI DAABASE ,orclsby- SE PROPERY F$s'S'$r'F$.lo/&r$r)&' 0 1orcl12 DGMGRL+ SHOW DAABASE VERBOSE ,orclsby-2 /0,0*L< show !ast+start !ailover& /0,0*L< enable !ast+start !ailover& /0,0*L< show !ast+start !ailover& /0,0*L< start observer& he Observer has started its working. he current session o! EcmdI will not be returned to you because it is a !oreground process. .t will continuously observe -*.,%*" site. o check the con!iguration, open another EcmdI window and check the con!iguration. !"!R# /0,0*L< connect sysAWiproTorcl /0,0*L< S=OW #ON'.0>*%.ON verbose& Open a new cmd window connect to primary db and Shutdown abort 5 the primary database orcl. S$lplus ATorcl as sysdba &()P)U&,&-UTD./0 A+.T1 0o back to the observer window and observer the messages S8 O*%#L8+S./LO*#LS1" S8L8# /%%1%S8+*OL8, O-8N+,O/8 '*O, 7?/%%1%S8& !"!R# /0,0*L< #ONN8# S"SAW.-*OTO*#LS1" /0,0*L< S=OW #ON'.0>*%.ON 78*1OS8& Open new window @ S$lplus ATorcl as sysdba S;L-L>S<S%*>- ,O>N& ( goto observer window and observe S8L8# S%>S '*O, 7?.NS%N#8& S8L8# /%%1%S8+*OL8, O-8N+,O/8 '*O, 7?/%%1%S8& he new standby database 5 orcl 5 would be in mount stage. -er!orm the !ollowing to put in back in active data guard mode. %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 #%N#8L& %L8* /%%1%S8 O-8N *8%/ ONL"& %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 >S.N0 #>**8N LO0'.L8 /.S#ONN8#& Again revert back orcl as pri#ary and orclsby as standby database: /gmgrl< SW.#=O78* O EO*#LI& %!ter switchover, the new standby database 5 orclsby 5 would be in mount stage. -er!orm the !ollowing to put in back in active data guard mode. %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 #%N#8L& %L8* /%%1%S8 O-8N *8%/ ONL"& %L8* /%%1%S8 *8#O78* ,%N%08/ S%N/1" /%%1%S8 >S.N0 #>**8N LO0'.L8 /.S#ONN8#& Sh#tting Do&n Databases 'n a Fast$Start Failover (nvironment Sto" the observer and &ait )or the FS*FA'LO+(R*O,S(R+(R*PR(S(! col#mn in the +-DA!A,AS( )i.ed vie& to contain the val#e /O/ )or both the "rimary and target standby databases0 !his ens#res that a )ast$start )ailover &ill not occ#r &hile yo# are sh#tting do&n the "rimary database0Sh#t do&n the "rimary database and the target standby database #sing either DGMGRL SH1!DOW command or the S%L2Pl#s SH1!DOW statement0 Conversion )rom Physical to Logical Standby "ou can now easily convert a physical standby database to a logical one. =ere are the steps@ >nsupported /atatypes @ BFILE $ollections %including VARRAYS and nested tables& "ultimedia data types %including Spatial' (mage' and )racle Te*t& ROWID' UROWID +ser-defined types #),s stored as Secure-iles ."#Type stored as )b/ect Relational ,inary ."# .denti!y unsupported obOects @ SELEC DISINC OWNER3ABLE_NAME FROM DBA_LOGSDBY_UNSUPPORED ORDER BY OWNER3ABLE_NAME2 2. he standby database will need to get the data dictionary in!ormation !rom somewhere. he dictionary in!ormation should be put in the redo stream that comes !rom the primary. So, on the primary database, issue the !ollowing to build the Log,iner tables !or dictionary@ SQL+ b&).4 5 (b%s_lo)s'(by6b7.l(2 8 &4(2 9 :
PL:SQL #roc&(7r& s7cc&ss;7lly co%#l&'&(6 3. On the standby database, stop the managed recovery process@ SQL+ $l'&r ($'$b$s& r&co/&r %$4$)&( s'$4(by ($'$b$s& c$4c&l2 D$'$b$s& $l'&r&(6 4. Now, issue the command in standby side to convert it to logical@ SQL+ $l'&r ($'$b$s& r&co/&r 'o lo).c$l s'$4(by ORCLSBY2
D$'$b$s& $l'&r&(6 .! you didnMt e:ecute Step 2, the above command will wait since the dictionary in!ormation is not !ound. /onMt worry& Oust e:ecute the Step 2 at this point. .! you have enabled *%, the in!ormation will immediately appear on the standby database. C. .ssue a !ew log switches on primary to make sure the archived logs are created and sent over to the standby@ SQL+ $l'&r sys'&% s".'c! lo);.l&2
Sys'&% $l'&r&(6 D. On the standby side, you can see that the alter database command has completed, a!ter some time. Now the standby is a logical one. "ou will see the !ollowing line in alert log@ RFS<=5>? I(&4'.;.&( ($'$b$s& 'y#& $s 1lo).c$l s'$4(by1 R. *ecycle the database@ SQL+ s!7'(o"4 ORA@A=BAC? ($'$b$s& 4o' %o74'&( ORACLE .4s'$4c& s!7' (o"46 SQL+ s'$r'7# %o74' ORACLE .4s'$4c& s'$r'&(6
D$'$b$s& $l'&r&(6 P. Now that this is a logical standby database, you should start the S;L %pply process. SQL+ $l'&r ($'$b$s& s'$r' lo).c$l s'$4(by $##ly .%%&(.$'&2 he logical standby database is now !ully operationalY Once you convert the physical standby to a logical one, you canMt convert it back to a physical one unless you use the special clause (Zkeep identityZ), described in the section below. he !ollowing e:ample allows log transport services up to three consecutive archival attempts, tried every D seconds, to the $rc_(&s' destination. .! the archival operation !ails a!ter the third attempt, the destination is treated as i! the NOREOPEN attribute was speci!ied. LOG_ARCHIVE_DES_=01LOCAION0:$rc_(&s' REOPEN0B MAE_FAILURE081 LOG_ARCHIVE_DES_SAE_=0ENABLE he N8+.,8O> and NON8+.,8O> attributes determine how long the log writer process waits be!ore terminating the network connection@ NE_IMEOU((speci!ies the number o! seconds the log writer process on the primary system waits !or status !rom the network server (LNSn) process be!ore terminating the network connection. NONE_IMEOU (( reverses or undoes the timeout value that was previously speci!ied with the NE_IMEOU attribute. .! you do not speci!y the NE_IMEOU attribute (or i! you speci!y the NONE_IMEOU attribute), the primary database can potentially stall. o avoid this situation, speci!y a small, non)ero value !or the NE_IMEOU attribute so the primary database can continue operation a!ter the user(speci!ied timeout interval e:pires when waiting !or status !rom the network server. select reopen+secs,ma:+!ailure,delay+mins, net+timeout, archiver !rom v?archive+dest where dest+idL3 A v2$s3$ailover3stats 4vie% to see %hen and reason $or the last $ailover occured e$erences : http@AAwww.oracle.comAtechnologyApubAarticlesAoracle(database(22g(top( !eaturesAinde:.htmlWmsgidLDSP[2P2 Oracle /ata 0uard 22g he Ne:t 8ra in /ata -rotection and %vailability %n Oracle echnical White -aper 2Bg *3 @ http@AAwww.ora!a$.comAwikiA/ata+0uard+implementation+!or+Oracle+2Bg*3K-*.,%* "+S.8@+.3S.n!ormation.3[