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hi<#dg\#
Oracle Data Guard 11g Handbook
AVggn8VgeZciZg 8]VgaZh@^b HdcnV8Vgdi]Zgh B^X]VZaHb^i]
?dZBZZ`h 7^aa7jg`Z ?dnY^e@jcYj C^i^cKZc\jgaZ`Vg
CZlNdg` 8]^XV\d HVc;gVcX^hXd A^hWdc AdcYdc BVYg^Y BZm^Xd8^in B^aVc CZl9Za]^ HVc?jVc HZdja H^c\VedgZ HnYcZn Idgdcid
Copyright © 2009 by The McGraw-Hill Companies, Inc. All rights reserved. Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. ISBN: 978-0-07-162148-9 MHID: 0-07-162148-2 The material in this eBook also appears in the print version of this title: ISBN: 978-0-07-162111-3, MHID: 0-07-162111-3. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. To contact a representative please e-mail us at [email protected]. Information has been obtained by Publisher from sources believed to be reliable. However, because of the possibility of human or mechanical error by our sources, Publisher, or others, Publisher does not guarantee to the accuracy, adequacy, or completeness of any information included in this work and is not responsible for any errors or omissions or the results obtained from the use of such information. Oracle Corporation does not make any representations or warranties as to the accuracy, adequacy, or completeness of any information contained in this Work, and is not responsible for any errors or omissions. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGrawHill’s prior consent. You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited. Your right to use the work may be terminated if you fail to comply with these terms. THE WORK IS PROVIDED “AS IS.” McGRAW-HILL AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. McGraw-Hill and its licensors do not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free. Neither McGraw-Hill nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom. McGraw-Hill has no responsibility for the content of any information accessed through the work. Under no circumstances shall McGraw-Hill and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages. This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise.
I]^hWdd`^hYZY^XViZYidVaaDgVXaZ9ViVWVhZVYb^c^higVidgh^ci]Z]deZi]VidjgldgYhl^aa WZi]Z^g\j^YZidhjXXZhhVcYgZhi[jac^\]ih#6cYidi]dhZcdc·DgVXaZ9ViVWVhZ VYb^c^higVidgh!bVnndjl^h]ndj!idd!lZgZjh^c\DgVXaZ9ViV<jVgY —Larry Carpenter 6fj^X`h]djidjiidi]Z[Vb^an¸YZY^XViZi]^hWdd`idbnegZX^djhl^[Z!BZa^hhV!VcYdjgi]gZZWdnh!>hV^V]!?ZgZb^V]!VcY CdV]![dgi]Z^ghjeedgiYjg^c\i]Zegd_ZXiVcYhVXg^ÄXZd[egZX^djh[Vb^ani^bZ#I]Vc`ndj [dgndjgjcXZVh^c\egVnZghVcYZcXdjgV\ZbZci# —Charles Kim >¼Ya^`ZidYZY^XViZi]^hWdd`idbnadk^c\l^[Z!HVcYgV![dgi]ZXdbb^ibZcid[]Zgi^bZ l^i]bZ0l^i]dji]ZghjeedgiVcYXdci^cjZYbdi^kVi^dc!bnXdcig^Wji^dcidi]^hWdd` ldjaYcdi]VkZWZZcedhh^WaZ# —Bill Burke Idbnhdc!?ja^Vc!i]Vc`h[dgndjgadkZ!ZcXdjgV\ZbZci!VcYaVj\]iZg# —Sonya Carothers IdbnÄkZ"nZVg"daYYVj\]iZg!G^VGV_nVhg^![dgbV`^c\bn_djgcZnVhV[Vi]Zghd[jaad[_dn VcYldcYZg# —Joydip Kundu >ldjaYa^`ZidYZY^XViZbnedgi^dcd[i]^hWdd`idbnl^[Z!I^cV!VcYildd[i]ZWZhi YVj\]iZghV[Vi]ZgXdjaYVh`[dg!?Zhh^XVVcYBVY^hdc#>`cdl]Vk^c\V¹XdbejiZg\ZZ`º [dgV]jhWVcYVcY[Vi]ZgXVcVii^bZhWZiZY^djh¹WjiI^cV!WVcYl^Yi]^hYZiZgb^cZYWn ]dlfj^X`anVbZY^jbXVcX]Vc\ZhiViZhºVcYZbWVggVhh^c\bnI"h]^gii]Vi]Vh¹969º heZaaZYdji^cW^cVgn!l]^X]bV`ZhbZadkZndj\jnhVaai]ZbdgZ# —Mike Smith >ldjaYa^`ZidYZY^XViZi]^hWdd`idbn`^Yh!>h]VcVcYC^h]V0idbnl^[Z!Eg^nV0VcYbdhi ^bedgiVcianidbneVgZcih!l]dhZ\j^YVcXZVcYhjeedgi]VkZValVnhWZZc^ckVajVWaZ# —Nitin Vengurlekar
This page intentionally left blank
Contents ;dgZldgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # mk^^ 6X`cdlaZY\bZcih # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # m^m >cigdYjXi^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # mm^
1 9ViV<jVgY6gX]^iZXijgZ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
&
9ViV<jVgYDkZgk^Zl # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # L]Vi>hGZYd4 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZYdIgVchedgiHZgk^XZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # HncX]gdcdjhGZYdIgVchedgi # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 6hncX]gdcdjhGZYdIgVchedgi # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZYdIgVchedgi8dbegZhh^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 6jidbVi^X
' ' * * , . . && &' &* &, &&&&. &. '% '& ') '+ '+ ', ', '. '.
^m
x
DgVXaZ9ViV<jVgY&&g =VcYWdd` 2 >beaZbZci^c\DgVXaZ9ViV<jVgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # (& EaVc7Z[dgZNdj>beaZbZci # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ZiZgb^c^c\NdjgGZfj^gZbZcih # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # JcYZghiVcY^c\i]Z8dc[^\jgVi^dcDei^dch # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZaVi^c\i]ZGEDVcYGIDidi]ZEgdiZXi^dcBdYZ # # # # # # # # # # # # # # # # # # # # # 8gZVi^c\VE]nh^XVaHiVcYWn9ViVWVhZ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8]ddh^c\Ndjg>ciZg[VXZ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 7Z[dgZNdjHiVgi # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Jh^c\DgVXaZ:ciZgeg^hZBVcV\Zg
3 GZYdEgdXZhh^c\ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # &%, >bedgiVci8dcXZeihd[DgVXaZGZXdkZgn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 68>9EgdeZgi^Zh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # DgVXaZGZXdkZgn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # A^[Zd[VIgVchVXi^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Cdad\\^c\DeZgVi^dch # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # I]Z8dbedcZcihd[VE]nh^XVaHiVcYWn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZVa"i^bZ6eean # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # HXVa^c\VcYIjc^c\9ViV<jVgY6eeanGZXdkZgn # # # # # # # # # # # # # # # # # # # # # # # EVgVaaZaBZY^VGZXdkZgn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # IddahVcYK^Zlh[dgBdc^idg^c\E]nh^XVaHiVcYWnGZXdkZgn # # # # # # # # # # # # # # # E]nh^XVaHiVcYWn8dggjei^dc9ZiZXi^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # &&gCZl9ViVEgdiZXi^dc8]Vc\Zh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ViVEgdiZXi^dcVcY8]ZX`^c\dcVE]nh^XVaHiVcYWn # # # # # # # # # # # # # # # # # # # # 8dcXajh^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
(' (( (* +' +( +( +) +* ,.&%* &%+ &%&%&%. &&& &&& &&) &&, &&&&. &'% &') &') &'* &'+
4 Ad\^XVaHiVcYWn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # &', 8]VgVXiZg^o^c\i]Z9ViVhZi6kV^aVWaZVii]ZAd\^XVaHiVcYWn # # # # # # # # # # # # # # # # # # # # # 8]VgVXiZg^o^c\i]Z9ViVhZiGZea^XViZY[gdbi]ZEg^bVgn9ViVWVhZ # # # # # # # # # # EgdiZXi^c\GZea^XViZYIVWaZhdcVAd\^XVaHiVcYWn # # # # # # # # # # # # # # # # # # # # # # 8jhidb^o^c\NdjgAd\^XVaHiVcYWn9ViVWVhZdg8gZVi^c\ VAdXVa9ViVhZiVii]ZAd\^XVaHiVcYWn # # # # # # # # # # # # # # # # # # # # # # # # # # # # JcYZghiVcY^c\i]ZDeZgVi^dcVa6heZXihd[VAd\^XVaHiVcYWn # # # # # # # # # # # # # # Add`^c\>ch^YZHFA6eean # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Ijc^c\HFA6eean # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # HdbZGjaZhd[I]jbW # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ZiZgb^c^c\L]Zi]ZgHFA6eean>hAV\\^c\ # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ZiZgb^c^c\L]Zi]ZgHFA6eean>hi]Z7diiaZcZX` # # # # # # # # # # # # # # # # # # # # # 9ZiZgb^c^c\L]^X]HFA6eean8dbedcZci>hi]Z7diiaZcZX` # # # # # # # # # # # # #
&'. &'. &() &)& &)* &)* &*, &*&*&*. &*.
IgdjWaZh]ddi^c\HFA6eean # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # JcYZghiVcY^c\GZhiVgih^cHFA6eean # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # IgdjWaZh]ddi^c\HideeZYHFA6eean # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dcXajh^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
5 >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg # # # # # # # # # # # # # # # # # # # # # # # # # # # # &,& DkZgk^Zld[i]Z9ViV<jVgY7gd`Zg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # I]Z7gd`ZgEgdXZhhBdYZa # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # I]Z7gd`ZgEgdXZhh;adl # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # I]Z7gd`Zg8dc[^\jgVi^dc;^aZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # I]Z7gd`Zg8A> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
&+) &+) &+, &,% &,' &,( &,) &,+ &,&,. &,. &-( &-, &.% &.( &.( '%% '&& '&' '&) '&+ '&,
6 DgVXaZ:ciZgeg^hZBVcV\ZgciZ\gVi^dc # # # # # # # # # # # # # # # # # # # '&. 6XXZhh^c\i]Z9ViV<jVgY;ZVijgZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dc[^\jg^c\9ViV<jVgY7gd`Zgl^i]D:B
''% ''& '') ''+ '', '''(% '(& '() '(+ '(')% ')( ')) '*% '*% '*% '*' '**
xii
DgVXaZ9ViV<jVgY&&g =VcYWdd` 7 Bdc^idg^c\9ViV<jVgY>beaZbZciVi^dch # # # # # # # # # # # # # # # # # # # # # # # # # # # # '*, Bdc^idg^c\i]Z9ViV<jVgY:ck^gdcbZci # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # B^c^c\i]Z6aZgiAd\;^aZEH AH # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # c[dgbVi^dc[gdb6gX]^kZAd\=^hidgnEH AH # # # # # # # # # 9ZiZXi^c\6gX]^kZAd\YZci^[n^c\9ZaVnh^cGZYdIgVchedgiEH # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Bdc^idg^c\6gX]^kZAd\9Zhi^cVi^dchEH AH # # # # # # # # # # # # # # # # # # # # # # # # # # :mVb^c^c\6eeanGViZVcY6Xi^kZGViZEH # # # # # # # # # # # # # # # # # # # # # # # # # # # GZk^Zl^c\IgVchedgiVcY6eeanAV\EH AH # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ZiZgb^c^c\i]Z8jggZciI^bZdci]ZHiVcYWn9ViVWVhZEH # # # # # # # # # # # # # # GZedgi^c\i]ZHiVijhd[BVcV\ZYGZXdkZgnEgdXZhhEH # # # # # # # # # # # # # # # # # # 9ViV<jVgYBZcjJi^a^in # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZk^Zl^c\i]Z8jggZci9ViV<jVgY:ck^gdcbZci # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8]ZX`^c\i]ZEVhhldgY;^aZEH AH # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8]ZX`^c\[dgCdad\\^c\6Xi^k^i^ZhEH AH # # # # # # # # # # # # # # # # # # # # # # # # # # # # Add`^c\Vi6gX]^kZad\BdYZVcY9Zhi^cVi^dchEH AH # # # # # # # # # # # # # # # # # # # 8]ZX`^c\HiVcYWn;^aZBVcV\ZbZciEH # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZkZVa^c\:ggdgh^ci]Z9ViV<jVgYHiVijhK^ZlEH # # # # # # # # # # # # # # # # # # # # # Ad\^XVaHiVcYWn9ViV<jVgYBZcj # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dcXajh^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
'*'*. '+) '++ '+'+. ',& ',' ',( ',* ',+ ',, ',',. '-' '-) '-) '-* '.,
8 Hl^iX]dkZgVcY;V^adkZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # '.. >cigdYjXi^dcidGdaZIgVch^i^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Hl^iX]dkZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ;V^adkZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Hl^iX]dkZgkh#;V^adkZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ;aVh]WVX`IZX]cdad\^ZhVcY9ViV<jVgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # EZg[dgb^c\VHl^iX]dkZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dc[^\jgVi^dc8dbeaZiZcZhh8]ZX` # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # EgZeVgVidgn8]ZX`h # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # EgZegdXZhh^c\HiZeh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Hl^iX]^c\dkZgidVE]nh^XVaHiVcYWn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Hl^iX]^c\dkZgidVAd\^XVaHiVcYWn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Jh^c\i]Z7gd`Zgdg
(%% (%% (%' (%. (%. (&& (&& (&& (&) (&* ('% ('( (') (') ('+ ('('. (() ((* ()()-
9 6Xi^kZ9ViV<jVgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # (). E]nh^XVaHiVcYWn¸DeZcGZVY"Dcan # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # L]nGZVY"Dcan4 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # I]Z9dlch^YZd[GZVY"DcandgGZVY"Lg^iZBdYZ # # # # # # # # # # # # # # # # # # # # # # HcVeh]diHiVcYWn[dgF6VcYIZhi:ck^gdcbZcih # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZVYLg^iZHiVcYWn^cDgVXaZ9ViVWVhZ&%g # # # # # # # # # # # # # # # # # # # # # # # # # # HcVeh]diHiVcYWnh^cDgVXaZ9ViVWVhZ&&g # # # # # # # # # # # # # # # # # # # # # # # # # # # GZVa6eea^XVi^dcIZhi^c\ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ViVWVhZGZeaVn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # HFAEZg[dgbVcXZ6cVanoZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 6Xi^kZ9ViV<jVgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dc[^\jg^c\6Xi^kZ9ViV<jVgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dcXajh^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
10 6jidbVi^c\H^iZVcY8a^Zci;V^adkZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # (,, 9Z[^c^c\i]ZEgdWaZb # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dbeaZiZH^iZ;V^adkZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # EVgi^VaH^iZ;V^adkZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # I]ZC^iinbeaZbZci^c\8a^Zci;V^adkZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dbeaZiZH^iZ;V^adkZg8dc[^\jgVi^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dcXajh^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
(,(,(,. (,. (-% (-& (-' (-) (-+ (-, (-, (.)
11 B^c^b^o^c\EaVccZY9dlci^bZJh^c\9ViV<jVgYHl^iX]dkZg # # # # # # # # # # # (.* DkZgk^Zld[EaVccZYB^\gVi^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # AZkZgV\^c\9ViV<jVgYHl^iX]dkZg[dgEaVccZYB^\gVi^dc # # # # # # # # # # # # # # # # # # # # # # 8VhZ&·CZl9ViV8ZciZg # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8VhZ'·BdkZid6HB # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # EZg[dgb^c\V9ViVWVhZGdaa^c\Je\gVYZJh^c\9ViV<jVgY # # # # # # # # # # # # # # # # # # # # # AZkZgV\^c\Gdaa^c\Je\gVYZhJh^c\HFA6eean # # # # # # # # # # # # # # # # # # # # # # # # Gdaa^c\Je\gVYZhJh^c\IgVch^ZciAd\^XVaHiVcYWn # # # # # # # # # # # # # # # # # # # # # # 8dcXajh^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
(*% (*& (*' (*( (*( (*, (+) (+* (,% (,& (,) (,+
(.+ (., (., (., (.(.. )%' )%-
12 7VX`jeVcYGZXdkZgn8dch^YZgVi^dch # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # )%. GB6C7Vh^Xh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GB6C>ciZ\gVi^dcl^i]9ViV<jVgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 7adX`8]Vc\ZIgVX`^c\Hjeedgi # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dcigda;^aZBVcV\ZbZci # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZhncX]gdc^o^c\i]ZGB6C8ViVad\ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
)&% )&& )&& )&' )&'
xiv
DgVXaZ9ViV<jVgY&&g =VcYWdd` GB6C8dc[^\jgVi^dc^c9ViV<jVgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # :mVbeaZ8dc[^\jgVi^dc[dgVEg^bVgn9ViVWVhZ # # # # # # # # # # # # # # # # # # # # # # # # # :mVbeaZ8dc[^\jgVi^dc[dgV7VX`jeHiVcYWn9ViVWVhZ # # # # # # # # # # # # # # # # # # :mVbeaZ8dc[^\jgVi^dc[dgDi]ZgE]nh^XVaHiVcYWn9ViVWVhZh # # # # # # # # # # # # # 7VX`jeHigViZ\^Zh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 7VX`jeHXZcVg^dh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 7VX`je9ViVWVhZCdi7VX`ZYJe # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ;jaa7VX`jehdcEg^bVgn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 7VX`jeVh8den # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # >bV\Z8denGdaaZY;dglVgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # HiVcYWn9ViVWVhZ8gZVi^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 7VX`jehdcVHiVcYWn9ViVWVhZ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 6gX]^kZ7VX`jeh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # cXdbeaZiZGZXdkZgnd[i]ZEg^bVgn9ViVWVhZ # # # # # # # # # # # # # # # # # # # # # # # # # GZXdkZg^c\[gdbV9gdeeZYIVWaZ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZXdkZgVB^hh^c\9ViV[^aZ[gdbV7VX`jeIV`Zcdci]ZHiVcYWn # # # # # # # # # # #
)&' )&) )&* )&* )&* )&, )&, )&, )&. )'% )'( )'( )'+ )'+ )'+ )'+ )'. )(% )(% )(& )(' )(' )(' )(+ )(, )(, ))% ))&
13 IgdjWaZh]ddi^c\9ViV<jVgY # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ))( 9^V\cdhi^X>c[dgbVi^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ViVWVhZ6aZgiAd\h # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # DWhZgkZgAd\;^aZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ViV<jVgYIgVXZ;^aZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ViV<jVgY7gd`ZgAd\;^aZhVcYIddah # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ncVb^XEZg[dgbVcXZK^Zlh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ViV<jVgY8dc[^\jgVi^dcVcYBVcV\ZbZci:ggdgh # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dbbdcBVcV\ZbZci>hhjZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # E]nh^XVaHiVcYWn>hhjZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Ad\^XVaHiVcYWn9ViVWVhZ;V^ajgZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Hl^iX]dkZg>hhjZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ;V^adkZg>hhjZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 9ViV<jVgY7gd`Zg>hhjZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # :ggdgh8dckZgi^c\idVHcVeh]diHiVcYWn # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
))) ))) )), )), )))). )*% )*% )*+ )*. )+& )+( )+) )+-
8dciZcih =Zae[ja=^cihVcYI^eh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 6kd^YGZ[gZh]^c\i]ZHiVcYWn8dcigda;^aZ # # # # # # # # # # # # # # # # # # # # # # # # # # # # 6kd^YJh^c\i]ZCDAD<<>C<8aVjhZ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # DB;¸8den^c\8dcigda;^aZ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 8dcXajh^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
),( ),+ ),)-% )-( )-) )-+ )--
A 9ViV<jVgYkh#6ggVn"WVhZYGZbdiZB^ggdg^c\Hdaji^dch # # # # # # # # # # # # # # # # ).& I]Z7Vh^Xh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Idedad\n # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # EZg[dgbVcXZ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZa^VW^a^in # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ;^cVaI]dj\]ih # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
)+)+)+)+. ),%
14 9ZeadnbZci6gX]^iZXijgZh # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ),& BVcj[VXijg^c\8dbeVcn/=68dc[^\jgVi^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Ji^a^in8dbeVcn/OZgd9ViVAdhh=6$9G # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # GZiV^a7gd`ZgV\Z;^gb/=6$9Gl^i]OZgd9ViVAdhhVcY :miZcYZYchjgVcXZ8dbeVcn/BVm^bjb6kV^aVW^a^in6gX]^iZXijgZ # # # # # # # # # # # # # # # # # # # # # # # 8dcXajh^dc # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
xv
).' ).( ).( ).) ).*
>cYZm # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ).,
This page intentionally left blank
Foreword
>¼kZd[iZchV^Yi]Vii]ZgZ^hdcZi]^c\V976^hcdiVaadlZYid\Zilgdc\!VcYi]Vi^h gZXdkZgn#IdWZbdgZ\ZcZgVa!^i^hi]Z976¼h_dWidZchjgZi]ViYViVi]ViXVccdiZkZgWZ adhi^hcZkZgadhi#>[ndjXVccdiegdk^YZ[dgXdci^cjdjh!cdYViVadhhVXXZhhidVaad[ndjg XdgedgViZYViV!ndj]VkZcdiYdcZi]Zeg^bVgn_dWV976h]djaYYd#Egdk^Y^c\Vhda^Y Y^hVhiZggZXdkZgnXdci^c\ZcXn^heVgid[i]Z_dWd[i]Z976!VcYDgVXaZ9ViV<jVgY^hi]Z lVnidegdk^YZ[dg^i# DgVXaZegdk^YZhbVcn[ZVijgZhVcY[jcXi^dchid[VX^a^iViZYViVWVX`je!gZXdkZgn!VcY VkV^aVW^a^in#=dlZkZg!i]ZgZVgZhdbVcn[ZVijgZhi]ViVii^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^c[dgbVi^dccZZYZYWni]ZDgVXaZ9ViVWVhZidgZXdkZgVYViVWVhZigVchVXi^dc#6egdYjXi^dc YViVWVhZ!gZ[ZggZYidVhi]Zprimary database!igVchb^ihgZYdiddcZdgbdgZ^cYZeZcYZci gZea^XVhgZ[ZggZYidVhstandby databases#9ViV<jVgYhiVcYWnYViVWVhZhVgZ^cVXdci^cjdjh hiViZd[gZXdkZgn!kVa^YVi^c\VcYVeean^c\gZYdidbV^ciV^chncX]gdc^oVi^dcl^i]i]Zeg^bVgn YViVWVhZ#9ViV<jVgYl^aaVahdVjidbVi^XVaangZhncX]gdc^oZVhiVcYWnYViVWVhZi]ViWZXdbZh iZbedgVg^anY^hXdccZXiZY[gdb^iheg^bVgnYViVWVhZWZXVjhZd[VcZildg`dghiVcYWndjiV\Z# I]^hh^beaZVgX]^iZXijgZbV`Zh^iedhh^WaZid]VkZdcZdgbdgZhncX]gdc^oZYgZea^XVh ^bbZY^ViZanVkV^aVWaZidgZhjbZegdXZhh^c\^ci]ZZkZcid[VeaVccZYdgjceaVccZYdjiV\Zd[ i]Zeg^bVgnYViVWVhZ#6]^\]"aZkZadkZgk^Zld[i]Z9ViV<jVgYigVchedgiVcYVeeanVgX]^iZXijgZ ^hegdk^YZY^c;^\jgZ&"
What Is Redo? Redo^hVii]ZXZciZgd[ZkZgni]^c\9ViV<jVgYYdZh#L]^aZ8]VeiZg(egdk^YZhbdgZYZiV^ahdc gZYdXdcXZeih!VWVh^X`cdlaZY\Zd[i]^h[ZVijgZ^h[jcYVbZciVaidndjgjcYZghiVcY^c\d[]dl 9ViV<jVgYldg`h#
8]VeiZg&/ 9ViV<jVgY6gX]^iZXijgZ
3
Data Guard vs. Remote Mirroring: Advantage Data Guard 9ViV<jVgYigVchb^ihdcanredo data¸i]Z^c[dgbVi^dccZZYZYidgZXdkZgVYViVWVhZ igVchVXi^dc¸idhncX]gdc^oZVhiVcYWnYViVWVhZl^i]^iheg^bVgn#9ViV<jVgYVahdegZkZcih i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kVajZ^cVcZbeadnZZiVWaZ!ndj\ZcZgViZVgZYdgZXdgYXdciV^c^c\ X]Vc\ZkZXidghi]ViYZhXg^WZX]Vc\Zhidi]ZYViVhZ\bZciWadX`[dgi]ZiVWaZ!i]ZjcYd hZ\bZciYViVWadX`!VcYi]ZigVchVXi^dciVWaZd[i]ZjcYdhZ\bZcih# GZYdgZXdgYhXdciV^cVaai]Z^c[dgbVi^dccZZYZYidgZXdchigjXiX]Vc\ZhbVYZidi]Z YViVWVhZ#9jg^c\bZY^VgZXdkZgn!i]ZYViVWVhZl^aagZVYX]Vc\ZkZXidgh^ci]ZgZYdgZXdgYhVcY Veeani]ZX]Vc\Zhidi]ZgZaZkVciWadX`h# GZYdgZXdgYhVgZWj[[ZgZY^cVX^gXjaVg[Vh]^dc^ci]ZgZYdad\Wj[[Zgd[i]ZHnhiZb
&
A commit record L]ZcZkZgVigVchVXi^dc^hXdbb^iiZY!i]ZA
¹DgVXaZ9ViV<jVgYVcYGZbdiZB^ggdg^c\Hdaji^dch!ºDgVXaZIZX]cdad\nCZildg`/lll#dgVXaZ#Xdb$iZX]cdad\n$ YZeadn$VkV^aVW^a^in$]iYdXh$9ViV<jVgYGZbdiZB^ggdg^c\#]iba ' DgVXaZ9ViVWVhZ6Yb^c^higVidg¼h<j^YZ&&gGZaZVhZ&&&
4
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Primary Database Oracle Instance in-memory
Standby Database 1 Redo Transmission
Oracle Instance in-memory
3
2
Oracle Data Files
Recovery Data
4 Automatic Outage Resolution
Recovery Data
Oracle Data Files
1 Redo transport services transmit redo data from primary to standby as it is generated. 2 Apply services validate redo data and update standby database files. 3 Independent of Data Guard, the database writer process updates primary database files. 4 Data Guard automatically resynchronizes the standby following network or standby outages using redo data that has been archived at the primary.
FIGURE 1-1.
N
Overview: Data Guard redo transport and apply
Redo log buffers >[i]ZgZYdad\Wj[[ZgWZXdbZhVi]^gY[jaadg^[(hZXdcYh]VkZeVhhZY h^cXZi]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c[^\jgVi^dcl^i]i]gZZhiVcYWnYViVWVhZh![dgZmVbeaZ!i]gZZ ACHegdXZhhZhVgZVXi^kZdcZVX]eg^bVgnYViVWVhZ^chiVcXZ# 9ViV<jVgYhjeedgihildgZYdigVchedgibZi]dYhjh^c\i]ZACHegdXZhh/hncX]gdcdjhdg VhncX]gdcdjh#6]^\]"aZkZadkZgk^Zld[i]ZgZYdigVchedgiVgX]^iZXijgZ^hegdk^YZY^c;^\jgZ&"'#
Synchronous Redo Transport Synchronous transport (SYNC)^hVahdgZ[ZggZYidVhV¹oZgdYViVadhhºbZi]dYWZXVjhZi]ZA
Myth Buster: LGWR Transmits Redo to Standby Databases 6Xdbbdcb^hXdcXZei^dc^hi]Vii]ZA
DgVXaZ9ViV<jVgY&&g=VcYWdd`
User commit
Data Guard Transport
SGA
LNS
Redo Buffer
Apply
RFS Standby Redo Logs
Primary Database
Standby Database
LNS ships redo data directly from the redo buffer—an RFS process receives it at the standby.
FIGURE 1-2.
Data Guard redo transport process architecture
^cYZiV^a^c;^\jgZ&"(#I]ZcjbWZgZYa^hii]Vi[daadlhdjia^cZhZVX]e]VhZd[HNC8gZYdigVchedgi VcYXdggZhedcYhidi]ZcjbWZghh]dlc^c;^\jgZ&"(# 1. I]ZjhZgXdbb^ihVigVchVXi^dcXgZVi^c\VgZYdgZXdgY^cH<6#I]ZA
1
3 User commit
6
Data Guard Synchronous Transport (SYNC)
Online Redo Logs Co
mm
it A
CK
SGA 1
Redo Buffer
1
1 LGWR 3
2
3 LNS
Primary Database
FIGURE 1-3.
Apply
RFS 2
2 Standby Redo Logs
SYNC redo transport architecture
Standby Database
8]VeiZg&/ 9ViV<jVgY6gX]^iZXijgZ
7
3. L]Zci]ZG;HgZXZ^kZhVlg^iZ"XdbeaZiZ[gdbi]ZY^h`!^iigVchb^ihVcVX`cdlaZY\bZci WVX`idi]ZACHegdXZhhdci]Zeg^bVgnYViVWVhZ!l]^X]^cijgccdi^[^Zhi]ZA$DeZg[dgbVcX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
User commit
8
Online Redo Logs
Data Guard Asynchronous Transport (ASYNC) (y between LGWR and LNS.
Co
mm
('"") !!* "!!%!ansitions to log files if the redo log buffer is recycled.
it A
CK
LGWR
(LNS has zero overhead if reading from SGA, minimal overhead if reading from ORL.
SGA Redo Buffer
Primary Database
FIGURE 1-4.
LNS
Apply
RFS Standby Redo Logs
ASYNC redo transport architecture
Standby Database
8]VeiZg&/ 9ViV<jVgY6gX]^iZXijgZ
9
Enabling ASYNC Redo Transport Compression 7jg^ZY^cDgVXaZBZiVA^c`CdiZ,'.**&^hi]Z^c[dgbVi^dccZZYZYidZcVWaZgZYdigVchedgi XdbegZhh^dc[dgDgVXaZ9ViVWVhZ&&gGZaZVhZ&VcY9ViV<jVgY6HNC8BVm^bjb EZg[dgbVcXZjh^c\i]ZeVgVbZiZg_REDO_TRANSPORT_COMPRESS_ALL#6a^XZchZ[dgDgVXaZ 6YkVcXZY8dbegZhh^dc^hgZfj^gZYidZcVWaZgZYdigVchedgiXdbegZhh^dc#
Redo Transport Compression 6cVYY^i^dcVaXdch^YZgVi^dcl]Zcjh^c\6HNC8^hYZiZgb^c^c\l]Zi]Zg^i^hVYkVciV\Zdjhid XdbegZhhgZYdidgZYjXZndjgWVcYl^Yi]gZfj^gZbZcih#DgVXaZgZaZVhZYVcZlegdYjXi[dgDgVXaZ :ciZgeg^hZ:Y^i^dc&&gXVaaZYi]ZAdvanced Compression option#I]^hcZlegdYjXiXdciV^ch hZkZgVaXdbegZhh^dc[ZVijgZh!dcZd[l]^X]^hgZYdigVchedgiXdbegZhh^dc[dg9ViV<jVgY#>c^i^Vaan i]^h[ZVijgZXdjaYdcanWZZcVWaZYl]Zc9ViV<jVgYlVhigVchb^ii^c\ad\[^aZhcZZYZYidgZhdakZ VcVgX]^kZad\\Ve#=dlZkZg!^cgZhedchZidXjhidbZggZfjZhi!DgVXaZ]VhejWa^h]ZY^c[dgbVi^dc VWdjiVcjcYdXjbZciZYeVgVbZiZgi]ViZcVWaZhXdbegZ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VgnYViVWVhZXdci^cjZhidXdbb^iigVchVXi^dchl]^aZi]Z ACHegdXZhh]VhXZVhZYigVchb^ii^c\gZYdidi]ZhiVcYWnYViVWVhZ#I]^hXVcdXXjgl]ZcZkZgi]Z cZildg`dgi]ZhiVcYWnYViVWVhZ^hYdlc!YZeZcY^c\dc]dlndj]VkZX]dhZcid^beaZbZcindjg 9ViV<jVgYXdc[^\jgVi^dcY^hXjhhZY^ci]ZhZXi^dc¹9ViV<jVgYEgdiZXi^dcBdYZhºaViZg^ci]^h X]VeiZg#L]^aZ^ci]^hhiViZ!i]Zeg^bVgnYViVWVhZA
(
¹7ViX]EgdXZhh^c\^c9^hVhiZgGZXdkZgn8dc[^\jgVi^dch/7ZhiEgVXi^XZh[dgDgVXaZ9ViV<jVgY!ºkVa^YVi^dcgZedgi dc9ViV<jVgYgZYdigVchedgiXdbegZhh^dcVcYegdeZgcZildg`Xdc[^\jgVi^dcWn=^iVX]^AiY#$DgVXaZ?VeVc9 8ZciZg/lll#]^iVX]^#Xd#_e$EgdY$Xdbe$hd[i&$dgVXaZ$eY[$D7iZX^c[d"%-"%%-#eY[
10
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Transactions
Data Guard Automatic Gap Resolution Oracle Net Services Redo Buffer SGA
Primary Database
SYNC ASYNC
LNS
Redo from current online redo log file
LGWR
Apply
Standby Database
Standby Redo Logs
Online Redo Logs ping Archived Redo Logs
RFS
ARCH
ARCH RFS
Transmission of archive logs needed to resolve log file gap Archived Redo Logs
FIGURE 1-5.
Automatic gap resolution
9ViV<jVgYjhZhVc6G8=egdXZhhdci]Zeg^bVgnYViVWVhZidXdci^cjdjhane^c\i]ZhiVcYWn YViVWVhZYjg^c\i]ZdjiV\ZidYZiZgb^cZ^ihhiVijh#L]ZcXdbbjc^XVi^dcl^i]i]ZhiVcYWn^h gZhidgZY!i]Z6G8=e^c\egdXZhhfjZg^Zhi]ZhiVcYWnXdcigda[^aZk^V^ihG;HegdXZhhidYZiZgb^cZ i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igVchb^iYViVViVbjX][VhiZgeVXZi]Vc^ihcdgbVagZYd\ZcZgVi^dcgViZ^[ i]ZhiVcYWn^hid]VkZVcn]deZd[XViX]^c\je#I]Z9ViV<jVgYVgX]^iZXijgZZcVWaZh\VehidWZ gZhdakZYfj^X`anjh^c\bjai^eaZWVX`\gdjcY6G8=egdXZhhZh!l]^aZVii]ZhVbZi^bZi]ZACH egdXZhh^hXdcYjXi^c\cdgbVaHNC8dg6HNC8igVchb^hh^dcd[i]ZXjggZciad\higZVb# )
I]^h[jcXi^dcVa^in^hVkV^aVWaZ^cDgVXaZ.i9ViV<jVgYhiVgi^c\VikZgh^dc.#'#%#*#HZZBZiVA^c`CdiZ'+%%)%#
8]VeiZg&/ 9ViV<jVgY6gX]^iZXijgZ
11
Why Isn’t ARCH Redo Transport in the Data Guard 11g Documentation? I]gZZgZYdigVchedgibZi]dYhlZgZYdXjbZciZYeg^dgid9ViV<jVgY&&g/HNC8!6HNC8! VcY6G8=#ARCHgZ[ZghidigVY^i^dcVaVgX]^kZad\h]^ee^c\!^cl]^X]9ViV<jVgYldjaYlV^i [dgVcDGAidWZVgX]^kZYWZ[dgZi]ZXdciZcihd[i]ZgZhjai^c\VgX]^kZad\[^aZl]ZgZh]^eeZY WnVc6G8=egdXZhh#9ViV<jVgY&&g6HNC8eZg[dgbVcXZZc]VcXZbZcih]VkZaZYDgVXaZ idYZegZXViZ6G8=VhVYdXjbZciZYgZYdigVchedgibZi]dY#I]dj\]YZegZXViZY!i]Z [jcXi^dcVaanhi^aaZm^hihidjhZ6G8=[dggZYdigVchedgiVcYegdk^YZWVX`lVgYXdbeVi^W^a^in [dgegZk^djhXjhidbZg^chiVaaVi^dch#I]Z6G8=igVchedgi^c[gVhigjXijgZVahdXdci^cjZhidWZ jhZYigVcheVgZcianWn9ViV<jVgY&&gl]ZcVjidbVi^XVaangZhdak^c\VgX]^kZad\\Veh WZilZZceg^bVgnVcYhiVcYWnYViVWVhZh#
Apply Services 9ViV<jVgYd[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\]eZg[dgbVcXZ!aZVhibVcV\ZbZciXdbeaZm^in!VcY[ZlZhibdk^c\eVgih#
8]VeiZg&/ 9ViV<jVgY6gX]^iZXijgZ
15
Rolling Database Upgrades Using a Physical Standby 9ViV<jVgY&&gZcVWaZhVe]nh^XVahiVcYWnYViVWVhZidWZjhZY[dggdaa^c\YViVWVhZ je\gVYZhk^Vi]ZKEEP IDENTITYXaVjhZVcYHFA6eean#6e]nh^XVahiVcYWn^hiZbedgVg^an XdckZgiZYidVtransient logical standbyVcYje\gVYZYidi]ZcZlgZaZVhZ#6ai]dj\]i]Z egdXZhhd[je\gVY^c\i]ZDgVXaZ=dbZbjhiWZeZg[dgbZYdcWdi]i]Zeg^bVgnVcYhiVcYWn hnhiZbh!i]ZZmZXji^dcd[i]ZYViVWVhZje\gVYZhXg^eidcancZZYhidWZeZg[dgbZYdcXZdc i]ZigVch^Zciad\^XVahiVcYWnYViVWVhZ#;daadl^c\Vhl^iX]dkZg!i]Zdg^\^cVaeg^bVgnYViVWVhZ ^hXdckZgiZYWVX`^cidVe]nh^XVahiVcYWnVcY^hje\gVYZYWnVeean^c\i]ZgZYd\ZcZgViZYWn i]ZZmZXji^dcd[i]Zje\gVYZhXg^eiegZk^djhangjcdci]ZigVch^Zciad\^XVahiVcYWnhZZ 8]VeiZg&&[dgYZiV^ah#I]^hZa^b^cViZhi]ZZmigVXdhiVcYZ[[dgid[YZeadn^c\VYY^i^dcVa hidgV\Z[dgVad\^XVahiVcYWnYViVWVhZhdaZan[dgi]ZejgedhZd[Vgdaa^c\YViVWVhZje\gVYZ#
N DgVXaZZcY"id"ZcYkVa^YVi^dcWZ[dgZVeeanegdk^YZhi]ZWZhiegdiZXi^dcV\V^chie]nh^XVa Xdggjei^dch!^cXajY^c\Xdggjei^dchYjZidadhilg^iZh# N 6WaZidWZji^a^oZY[dgje"id"YViZgZVY"dcanfjZg^ZhVcYgZedgi^c\l]^aZegdk^Y^c\9G 6Xi^kZ9ViV<jVgY&&g# N 6W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A6eean gZfj^g^c\bdgZZmiZch^kZeZg[dgbVcXZiZhi^c\!ijc^c\!VcYbVcV\ZbZciZ[[dgii]VcVe]nh^XVa hiVcYWnYViVWVhZ#GZ[ZgidDgVXaZBZiVA^c`[dgVcZmXZaaZcicdiZi]Viegdk^YZh^ch^\]i^cid dei^b^o^c\HFA6eeaneZg[dgbVcXZ#+L]^aZhjX]X]VgVXiZg^hi^XhVgZ[djcYidkVgn^c\YZ\gZZh^c VcnHFA"WVhZYgZea^XVi^dchdaji^dc!l]Zi]Zgegdk^YZYWnDgVXaZdgWni]^gYeVgi^Zh!HFA6eean
+
BZiVA^c`CdiZ+%((+&/¹9ZkZadeZgVcY976I^eh[dgEgd"6Xi^kZanDei^b^o^c\HFA6eeanº
16
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Logical Change Records (LCRs) not grouped into transactions
Redo records Reader
LCR LCR :
Preparer
Builder
Shared Pool
Transaction groups
FIGURE 1-7.
Applier Transactions to be applied
Coordinator (LSP)
Analyzer Transactions sorted in dependency order
SQL Apply process architecture
]VhVc^c]ZgZciVYkVciV\ZdkZgi]^gY"eVginHFAgZea^XVi^dcegdYjXihYjZid^ihcVi^kZ^ciZ\gVi^dc l^i]i]ZDgVXaZ9ViVWVhZ`ZgcZa#
SQL Apply Benefits I]ZZmigVegdXZhh^c\eZg[dgbZYWnHFA6eean^hVahdi]ZhdjgXZd[^ihVYkVciV\Zhl]ZcXdbeVgZY idGZYd6eean#7ZXVjhZHFA6eeanVeea^ZhHFA!Vad\^XVahiVcYWnYViVWVhZ^hdeZcZYgZVY"lg^iZ l]^aZVeean^hVXi^kZ#L]^aZHFA6eeanegZkZcihVcnbdY^[^XVi^dch[gdbWZ^c\bVYZidi]ZYViV^i ^hgZea^XVi^c\!Vad\^XVahiVcYWnYViVWVhZ]Vhi]ZVYY^i^dcVa[aZm^W^a^ind[Vaadl^c\^chZgih!jeYViZh! VcYYZaZiZhidadXVaiVWaZhVcYhX]ZbVhi]Vi]VkZWZ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gYViVegdiZXi^dcVcYVkV^aVW^a^in#GZYd 6eeanl]Zcjh^c\6Xi^kZ9ViV<jVgY&&gVahdd[[ZghVcZmXZaaZcihdaji^dc[dgd[[adVY^c\gZVY"dcan fjZg^Zh[gdbndjgeg^bVgnYViVWVhZh#=dlZkZg!ndjbVn]VkZXVhZhl]ZgZVgZedgi^c\Veea^XVi^dc cZZYhgZVY"lg^iZVXXZhhidi]ZhiVcYWnYViVWVhZ!gZfj^g^c\i]ZVYY^i^dcVa[aZm^W^a^ind[[ZgZYWnHFA 6eean#9ViV<jVgYhjeedgi[dgbjai^"hiVcYWnXdc[^\jgVi^dch]Vk^c\Vb^md[e]nh^XVaVcYad\^XVa hiVcYWnYViVWVhZhXVcegdk^YZjhZghl^i]i]Z[aZm^W^a^inidhVi^h[nVaagZfj^gZbZcih^cVcdei^bjb [Vh]^dc^cVh^c\aZ9ViV<jVgYXdc[^\jgVi^dc#,
Myth Buster: Standby Apply Performance Can Impact the Primary Database 6Xdbbdcb^heZgXZei^dc^hi]VihiVcYWnVeeaneZg[dgbVcXZXVc^beVXii]Zeg^bVgn YViVWVhZ#I]^heZgXZei^dc^heZgeZijViZYWni]Z[VXii]ViXdbeZi^c\G97BHegdYjXihYdcdi YZa^kZgi]ZhVbZaZkZad[^hdaVi^dc^beaZbZciZYWn9ViV<jVgY#HiVcYWnYViVWVhZVeean eZg[dgbVcXZYdZhcdi]VkZVcn^beVXidceg^bVgnYViVWVhZVkV^aVW^a^indgeZg[dgbVcXZ^cV 9ViV<jVgYXdc[^\jgVi^dc#
,
¹BVcV\^c\9ViV<jVgY8dc[^\jgVi^dch=Vk^c\Bjai^eaZHiVcYWn9ViVWVhZh¸B667ZhiEgVXi^XZhº/lll#dgVXaZ #Xdb$iZX]cdad\n$YZeadn$VkV^aVW^a^in$eY[$bVV&%\g'bjai^eaZhiVcYWnWe#eY[
18
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Data Guard Protection Modes BVcn976hVgZ^ciZgZhiZY^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gX]^iZXijgZ
23
& !" #er &
Site 1 Primary
Site 2 Standby !" Fast-Start Failover
&Maximum Availability (SYNC) & $"erformance (ASYNC) &
FIGURE 1-8.
&Fast-Start Failover Target
Data Guard Fast-Start Failover architecture
VjidbViZ[V^adkZg#=dlZkZg!bVcjVa[V^adkZgXVcbV`ZbdgZV\\gZhh^kZgZXdkZgni^bZdW_ZXi^kZh kZgnY^[[^Xjai!dgZkZc^bedhh^WaZidVX]^ZkZ#I]ZbdgZV\\gZhh^kZndjggZXdkZgni^bZdW_ZXi^kZ! i]ZbdgZi]ZgZ^hidWZ\V^cZY[gdb^beaZbZci^c\9ViV<jVgY;Vhi"HiVgi;V^adkZg# 6eea^XVi^dcXdbeaZm^in^hi]ZhZXdcY[VXidgidXdch^YZg^cbVcjVakZghjhVjidbVi^X[V^adkZg# ;dgZmVbeaZ!VJ#H#\dkZgcbZcijhZgd[9ViV<jVgYh^cXZ'%%(deZgViZhVXdbeaZmVeea^XVi^dc Zck^gdcbZcil^i]Y^hig^WjiZYigVchVXi^dchi]ViZmZXjiZVXgdhhbjai^eaZYViVWVhZh#6oZgdYViVadhh [V^adkZg^cBVm^bjbEgdiZXi^dcdgBVm^bjb6kV^aVW^a^inbdYZldjaYWZcdegdWaZb[dg;Vhi" HiVgi;V^adkZg#I]ZhiVcYWnYViVWVhZldjaYVhhjbZi]Zeg^bVgngdaZl^i]cdYViVadhh!VcYi]ZgZ ldjaYWZcdgZXdkZgn^bea^XVi^dch[dgVcnd[i]Zdi]ZgYViVWVhZheVgi^X^eVi^c\^cVY^hig^WjiZY igVchVXi^dc#6cVjidbVi^X[V^adkZg^cBVm^bjbEZg[dgbVcXZbdYZl^i]YViVadhh!]dlZkZg! ldjaYWZegdWaZbVi^X#BVcjVaZ[[dgi^hgZfj^gZYWZXVjhZ9ViV<jVgY^hcdinZiVWaZidXddgY^cViZ ed^ci"^c"i^bZgZXdkZgnVXgdhhbjai^eaZYViVWVhZheVgi^X^eVi^c\^cVY^hig^WjiZYigVchVXi^dc#I]^h jhZg]VhXdc[^\jgZYBVm^bjbEZg[dgbVcXZbdYZ\^kZci]Vieg^bVgnVcYhiVcYWnYViVWVhZhVgZ hZeVgViZYWnbdgZi]Vc&%%%b^aZh#:kZci]dj\]9ViV<jVgY&&ghjeedgihVjidbVi^X[V^adkZg^c BVm^bjbEZg[dgbVcXZbdYZ!^i^hcdiegVXi^XVa[dgi]^hjhZgid^beaZbZciWZXVjhZd[i]Z VYY^i^dcVabVcjVaZ[[dgigZfj^gZYidgZXdkZgbjai^eaZYViVWVhZhidi]ZhVbZed^ci^ci^bZid egZhZgkZ\adWVaYViVXdch^hiZcXn[daadl^c\VYViVadhh[V^adkZg#
How Fast Is Automatic Failover? DgVXaZYdXjbZciZY9ViV<jVgYVjidbVi^X[V^adkZgeZg[dgbVcXZ[dgDgVXaZ9ViVWVhZ&%g GZaZVhZ&%#'#%#'#;V^adkZgi^b^c\h[dgi]^hZVgangZaZVhZd[;Vhi"HiVgi;V^adkZglZgZ&,hZXdcYh [dge]nh^XVahiVcYWnYViVWVhZhVcY&)hZXdcYh[dgad\^XVahiVcYWnYViVWVhZh#JhZghYZeadn^c\ aViZggZaZVhZhd[9ViV<jVgY]VkZVcZXYdiVaangZedgiZYi]Vi[V^adkZgi^bZh]VkZYgdeeZYid aZhhi]Vc&%hZXdcYhYZeZcY^c\dcXdc[^\jgVi^dc#
24
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Myth Buster: Automatic Failover Can Cause Split-Brain I]ZaVhii]^c\ndjZkZglVciid]VkZVgZild^cYZeZcYZciYViVWVhZh!ZVX]deZgVi^c\Vhi]Z hVbZeg^bVgnYViVWVhZ#I]^hXVc]VeeZc^[!jc`cdlcidndj!hdbZdcZgZhiVgihi]Zdg^\^cVa eg^bVgnYViVWVhZV[iZgndj]VkZeZg[dgbZYV[V^adkZgid^ihhiVcYWnYViVWVhZ#6Xdbbdc b^heZgXZei^dc^hi]ViVjidbVi^X[V^adkZgXVc^cXgZVhZ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cgZVY"lg^iZ#
8]VeiZg&/ 9ViV<jVgY6gX]^iZXijgZ
29
Maximum Availability Architecture I]ZDgVXaZIZX]cdad\ncZildg`edgiVa[dgB66WZhiegVXi^XZh^hVi]iie/$$dic#dgVXaZ#Xdb$ \did$bVV#
CdidcanVgZndjVWaZidfj^X`angjcVhZg^Zhd[iZhihjh^c\VXijVaegdYjXi^dcldg`adVY!ndj VgZVahdVWaZidgjci]ZbdcVcZmVXiXdend[i]ZegdYjXi^dcYViVWVhZ!VcYdchZgkZghVcY hidgV\Zh^oZYh^b^aVganidegdYjXi^dc\^kZci]VihiVcYWnhnhiZbhVgZjhjVaanh^oZYidgjc egdYjXi^dch]djaYV[V^adkZgZkZgWZcZXZhhVgn#Ndj]VkZZa^b^cViZYXdch^YZgVWaZi^bZ!Z[[dgi! VcYZmeZchZd[YZeadn^c\ViZhihnhiZbWnjh^c\i]Z9GhnhiZbVagZVYn^ceaVXZ#Bdhi ^bedgiVcian!ndjVX]^ZkZVWZiiZgiZhigZhjaiVcYh^\c^[^XVciangZYjXZi]Zg^h`d[^beVXi^c\ eZg[dgbVcXZdgVkV^aVW^a^inl]Zc^beaZbZci^c\X]Vc\ZhidegdYjXi^dchnhiZbh#
Data Guard and the Maximum Availability Architecture 9ViV<jVgY^hdcandcZd[i]ZbVcnDgVXaZ9ViVWVhZXVeVW^a^i^Zhi]Viegdk^YZ]^\]VkV^aVW^a^in VcYYViVegdiZXi^dc#I]^hX]VeiZg]VhidjX]ZYdcDgVXaZGZVa6eea^XVi^dc8ajhiZgh!DgVXaZ 6jidbVi^XHidgV\ZBVcV\ZbZci!DgVXaZGZXdkZgnBVcV\Zg!DgVXaZ;aVh]WVX`IZX]cdad\^Zh! VcYDgVXaZHigZVbh#Di]Zgh^\c^[^XVci[ZVijgZh^cXajYZV\gdl^c\hZid[eaVccZYbV^ciZcVcXZ XVeVW^a^i^Zh¸dca^cZeViX]^c\!dca^cZgZYZ[^c^i^dc!dca^cZVYY^i^dc$hjWigV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]Zc_jbe^c\higV^\]i^cid8]VeiZg(d[i]ZData Guard Concepts and Administratioc bVcjVaVcYXgZVi^c\hiVcYWnYViVWVhZh#I]Zci]ZnldcYZgl]ni]Zn]VkZegdWaZbhaViZg#L^i]dji XVgZ[jai]dj\]iVcYeaVcc^c\VcYVkZgn\ddYjcYZghiVcY^c\d[i]ZeaVccZYVcYjceaVccZY djiV\ZhndjVgZign^c\idVkd^Y!ndjgjci]Zg^h`d[ndjg¹[V^ajgZVkd^YVcXZeaVcº[V^a^c\¸cdiV \ddYh^ijVi^dc#
S
>ci]^hX]VeiZg!ndj¼aaaZVgcVWdjii]ZkVg^djhiVh`hndjbjhieZg[dgblZaaWZ[dgZndjhiVgi ZmZXji^c\GZXdkZgnBVcV\ZgGB6CVcYHFAXdbbVcYh^cV9ViV<jVgYZck^gdcbZci#I]Zc ndj¼aaaZVgc]dlidXgZViZndjghiVcYWnYViVWVhZhhdi]Vii]ZnbZZiZkZgngZfj^gZbZcindj]VkZ WZZc\^kZc#
Data Guard and Oracle Real Application Clusters I]Z^c[dgbVi^dcVcYegdXZYjgZhY^hXjhhZY^ci]^hX]VeiZgVgZhigjXijgZYidhZije9ViV<jVgY l^i]h^c\aZcdc·DgVXaZGZVa6eea^XVi^dc8ajhiZghG68YViVWVhZh#6ii]ZZcYd[i]ZX]VeiZg! ndj¼aaaZVgcVWdjii]ZX]Vc\ZhgZfj^gZYidbV`Z^iVaaldg`l^i]DgVXaZG68YViVWVhZh#
Plan Before You Implement LZVaa`cdli]Vi¹hij[[º]VeeZchiddjghnhiZbh!cdbViiZg]dllZaaYZh^\cZYVcY^beaZbZciZY i]ZnVgZ#I]^h^hV[VXid[a^[Z#Bjge]n¼hAVliZaahjh¹6cni]^c\i]ViXVc\dlgdc\l^aa\dlgdc\#º& LZWZa^ZkZi]ViBjge]nlVhWZ^c\dei^b^hi^Xl]Zc]Zejii]Z‘If’Vii]Z[gdcid[i]VihZciZcXZ#>i b^\]iWZbdgZVXXjgViZanhiViZYVh¹6cni]^c\XVc\dlgdc\!VcY^il^aa#º>i^hcdii]ZdXXjggZcXZ d[anythingi]ViWg^c\hVWjh^cZhhid^ih`cZZh0^i^h]dli]ZegdWaZb^h]VcYaZYVcY]dlndj gZXdkZg[gdbi]Zh^ijVi^dci]Vi^h^bedgiVci# 7Z[dgZndjhiVgiZmZXji^c\VcnXdbejiZgXdbbVcYhdgWjn^c\Vcn]VgYlVgZ!hd[ilVgZ!dg cZildg`h!ndjcZZYid`cdll]^X]h^ijVi^dchndjVgZign^c\idVkd^YVcY]dlndjcZZYid gZXdkZg[gdbi]dhZh^ijVi^dch#I]ZildbV^ce^ZXZhd[^c[dgbVi^dcndjcZZYidWZ\^ci]^h _djgcZnVgZndjgXdbeVcn¼hrecovery point objective (RPO)VcYrecovery time objective (RTO)!l]^X]iZaandjl]VindjcZZYid^beaZbZci#:kZgni]^c\VWdjihZii^c\je9ViV<jVgY^h Y^gZXiangZaViZYidi]ZGEDVcYGID#7ni]ZlVn!i]ZbjX]"Y^hXjhhZYhZgk^XZaZkZaV\gZZbZci PHA6R^hhdbZi]^c\i]Vindjlg^iZafterndj`cdll]VindjXVcVXijVaanVX]^ZkZ!cdi hdbZi]^c\ndjlg^iZje[gdciVcYXdbb^iid¸ViaZVhindjh]djaYcdiV\gZZid^il^i]dji `cdl^c\l]VindjXVcVXijVaanVX]^ZkZ\^kZci]ZgZfj^gZbZcihVcYi]ZgZhdjgXZhXdbb^iiZY idi]ZiVh`#
&
HZZ]iie/$$Zc#l^`^eZY^V#dg\$l^`^$Bjge]n¼hTaVl[dgbdgZVWdjiBjge]n¼hAVl#
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
33
Determining Your Requirements D@!hdndj¼gZcdihXVgZYd[[nZi#
Recovery Point Objective 6cGED^hfj^iZh^beaZ#>iVchlZghi]ZfjZhi^dc¹=dlbjX]YViVVgZndjl^aa^c\idadhZl]Zci]Z YgZVYZY[V^ajgZdXXjgh4ºEZdeaZ^ci]Z^cYjhign\ZcZgVaaniVa`VWdjiYViVadhh^ciZgbhd[time¸V [ZlhZXdcYhidYdjWaZ"Y^\^i]djgh¸WjindjcZZYidjcYZghiVcYl]Vii]VibZVch^ciZgbhd[ transactions#H^mhZXdcYhd[YViVadhhVi(%%%igVchVXi^dcheZghZXdcYiehbZVchndjXdjaY ediZci^VaanadhZ&-!%%%igVchVXi^dchl]Zcndj]VkZid[V^adkZgidndjgY^hVhiZggZXdkZgnh^iZ# 6chlZghidi]Z[daadl^c\fjZhi^dchl^aaV[[ZXindjgGED/ N >hYViVadhhVXXZeiVWaZ^[i]Zeg^bVgnh^iZ[V^ah4 N =dlbjX]YViVadhh^hidaZgViZY^[Vh^iZ^hadhi4 N >hediZci^VaYViVadhhWZilZZci]Zeg^bVgnVcYi]ZhiVcYWnYViVWVhZhidaZgViZYl]ZcV hiVcYWn]dhidgcZildg`XdccZXi^dc^hiZbedgVg^anjcVkV^aVWaZ4 N =dl[VgVlVnh]djaYi]ZY^hVhiZg"gZXdkZgnh^iZWZ[gdbi]Zeg^bVgnh^iZ4 N L]Vi^hi]ZXjggZcidgegdedhZYcZildg`WVcYl^Yi]VcYaViZcXnWZilZZch^iZh4
Data Loss >[i]ZVchlZgidi]Z[^ghifjZhi^dc!¹>hYViVadhhVXXZeiVWaZ4º!^hno!ndjgiVh`^h h^beaZ/ndjbjhiXdc[^\jgZndjgY^hVhiZggZXdkZgnhdaji^dccdiidVaadlYViVadhhl]Zcndj]VkZ id[V^adkZgidndjgY^hVhiZggZXdkZgnh^iZ#>[i]ZVchlZg^hyes!ndjcZZYid`cdl]dlbjX]YViV adhh^hVXXZeiVWaZ# 9dc¼iWZ[ddaZYWni]ZeZghdcl]diZaahndji]VisomeYViVadhh^hVXXZeiVWaZ#I]^heZghdc b^\]i_jhiWZign^c\idhVkZbdcZn!]Vk^c\cZkZgZmeZg^ZcXZYVYViVadhhh^ijVi^dc#>[ndjVgZ ign^c\idhVkZbdcZn!VYb^ii]Vije[gdciVcY^beaZbZciVXXdgY^c\an!VXXZei^c\i]Vindjl^aa]VkZ id[^\jgZdji]dlid\ddcV[iZgndj]VkZadhihdbZYViV!ZkZc^[^ibZVchWg^c\^c\^cVhbVaaVgbn d[gZi^gZYYViVZcigneZdeaZidgZ"ZciZgYViV[gdbeVeZgYdXjbZcihl]^X]!Wni]ZlVn!XdjaYWZ ]VeeZc^c\l]^aZndjVgZYdlc# DcZXdbeVcn!VeVnbZcihXaZVg^c\]djhZ!YZX^YZYi]Vi^iXdjaYhjhiV^c'%b^cjiZh¼ldgi]d[ YViVadhhl]ZcegdYjXi^dc[V^aZYVcY^i]VYidbdkZidi]ZY^hVhiZggZXdkZgnh^iZ#I]ZXdbeVcn VXXZeiZYi]ZXdhid[eVn^c\[dg'%b^cjiZhd[i^bZi]Vi^iXdjaYcZkZgW^aaid^ihXa^Zcih#HdjcYh a^`ZVgZVhdcVWaZVcYXdcigdaaVWaZh^ijVi^dc!YdZhc¼i^i47jil]Zci]ZhVbZegdWaZb]VeeZch hZkZgVai^bZh^cVgdl!i]ZVbdjcid[adhigZkZcjZXVcbdjcijeXdch^YZgVWan#6cdi]Zgh^iZlVh
Myth Buster: Zero Data Loss Configurations Have Too Much Impact on Production Throughput 6Xdbbdc[ZVgVbdc\9ViV<jVgY^beaZbZciZgh^hi]VioZgdYViVadhhXdc[^\jgVi^dch]VkZ iddbjX]^beVXidcegdYjXi^dci]gdj\]ejiidWZjhZY#9dc¼iWZejid[[jci^andjVcVanoZ i]ZigjZ^beVXid[adh^c\i]ViYViVVcY`cdll]Vii]ZgZfj^gZbZcihgZVaanVgZ[dgVX]^Zk^c\ oZgdYViVadhh#>ibVncdiWZVhWVYVhndji]^c`#
34
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Myth Buster: You Must Configure Data Guard to Be Exclusively Zero Data Loss >[ndjcZZYoZgdYViVadhh!ndjYdcdi]VkZidXdc[^\jgZ9ViV<jVgYidWZZmXajh^kZanoZgd YViVadhh#NdjXVcb^moZ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YhdcZbdgZaZkZaidi]ZWZ]Vk^dgd[ndjg eg^bVgnYViVWVhZVi[V^ajgZi^bZ!l]^X]lZl^aaY^hXjhh^c8]VeiZg-# NOTE We discuss the rules, requirements, and behaviors for each mode here, but the details of the parameters settings are discussed in later sections of this chapter. The procedure for performing a failover is discussed in Chapter 8.
Maximum Performance I]^h^hi]ZYZ[VjaiegdiZXi^dcbdYZi]ViVcnDgVXaZYViVWVhZh^cXZ DgVXaZ.iGZaZVhZ'VXijVaangjch^c!l^i]dgl^i]djiVhiVcYWnYViVWVhZ#I]ZgjaZ^hi]^h/¹6aadlVh a^iiaZYViVadhhVhedhh^WaZl^i]dji^beVXi^c\i]ZeZg[dgbVcXZd[bneg^bVgnYViVWVhZ#º6hhjX]! i]^hegdiZXi^dcbdYZegdk^YZhi]Z]^\]ZhiYZ\gZZd[eZg[dgbVcXZ[dgndjgeg^bVgnYViVWVhZ#>i^h Vahdi]ZadlZhiYZ\gZZd[egdiZXi^dcndjXVc]VkZ!l]^X]bZVchi]Vil]Zcndj]VkZid[V^adkZgid VhiVcYWnYViVWVhZndjl^aaadhZhdbZYViV#LZl^aaZmeaV^cl]nndjadhZYViV^c8]VeiZg-# =dlbjX]YViVndjadhZYZeZcYhdcndjggZYd\ZcZgVi^dcgViZVcY]dllZaandjgcZildg`XVc ]VcYaZi]ViVbdjcid[gZYd!l]^X]^hgZ[ZggZYidVhtransport lag#=dlZkZg!VigVchedgiaV\d[oZgd hi^aabZVchndjl^aaadhZhdbZYViVVi[V^adkZgi^bZ!WZXVjhZl]Zci]Zeg^bVgnYViVWVhZ^hVG68! i]Z[^cVaVeeand[i]ZgZbV^c^c\gZYdbjhi[^cYVXdbbdced^ci^ci]ZgZYdhigZVbh[gdbi]Z eg^bVgn!l]^X]l^aagZhjai^chdbZYViVadhh!ediZci^Vaan(id+hZXdcYh!gZ\VgYaZhhd[i]ZigVchedgi bdYZ#7ZVg^cb^cY!i]dj\]!i]ViZkZcl^i]Vcdc"G68eg^bV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ndjcZZYidiZhiZkZcbdgZY^a^\ZcianidZchjgZi]VindjgegdYjXi^dc^beVXi^hVXXZeiVWaZl^i] HNC8igVchedgihjeedgi^c\BVm^bjb6kV^aVW^a^in#>[cdi!ndjcZZYidXdch^YZgjh^c\BVm^bjb EZg[dgbVcXZVcYVXXZei^c\i]ZYViVadhhi]Vindjl^aa^cXjg¸dg[^cYVh^iZXadhZgidndjgeg^bVgn YViVWVhZ#>[ndjVgZgZVYnidVXXZeii]ZeZg[dgbVcXZ^beVXi!i]ZcgZVYdc# L]ZcVhiVcYWnYViVWVhZi]Vi^hdeZgVi^c\^cBVm^bjb6kV^aVW^a^in^hY^hXdccZXiZY[gdbi]Z eg^bVgnYViVWVhZZ^i]ZgWncZildg`!hnhiZb!dghiVcYWnYViVWVhZ[V^ajgZ!i]Zeg^bVgnYViVWVhZ l^aalV^ii]ZcjbWZgd[hZXdcYhYZ[^cZY^ci]ZViig^WjiZNET_TIMEOUTl]^X]YZ[Vjaihid(% hZXdcYh#>[cdgZhedchZ[gdbi]ZACHegdXZhh^hgZXZ^kZYl^i]^ci]VibVcnhZXdcYh!i]ZhiVcYWn YViVWVhZ^hbVg`ZYVh[V^aZYVcYi]Zad\lg^iZgXdci^cjZhXdbb^ii^c\igVchVXi^dchVcY^\cdgZhi]Z [V^aZYhiVcYWnYViVWVhZ#>[V[V^ajgZgZhedchZ^hgZXZ^kZY^caZhhi]Vci]ZcjbWZgd[hZXdcYh YZ[^cZY^cNET_TIMEOUT!i]Zci]ZAcVcDgVXaZG68eg^bVgn!i]^had\hl^iX]XVjhZhVaaeg^bVgn^chiVcXZhidhidehZcY^c\ gZYdZkZc^[i]ZnXVchi^aahZZi]ZhiVcYWn#>[i]^hlVhndjgaVhiHNC8hiVcYWn!i]ZegdiZXi^dcbdYZ
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
39
Myth Buster: Any Zero Data Loss Data Guard Configuration Will Result in Production Downtime if the Standby Database Is Not Reachable >i^hVXdbb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: Destination LOG_ARCHIVE_DEST_1 is not serviced by LGWR LGWR: Minimum of 1 LGWR standby database required Errors in file /OracleHomes/diag/rdbms/matrix/Matrix/trace/Matrix_lgwr_8095.trc: ORA-16072: a minimum of one standby database destination is required Errors in file /OracleHomes/diag/rdbms/matrix/Matrix/trace/Matrix_lgwr_8095.trc: ORA-16072: a minimum of one standby database destination is required LGWR (ospid: 8095): terminating the instance due to error 16072 Instance terminated by LGWR, pid = 8095
6hl^i]BVm^bjb6kV^aVW^a^in!l]ZcVhiVcYWnYViVWVhZi]Vi^hdeZgVi^c\^cBVm^bjb EgdiZXi^dcbdYZ^hY^hXdccZXiZY[gdbi]Zeg^bVgnYViVWVhZZ^i]ZgWncZildg`!hnhiZb!dghiVcYWn YViVWVhZ[V^ajgZ!i]Zeg^bVgnYViVWVhZl^aalV^i[dgi]ZcjbWZgd[hZXdcYhYZ[^cZY^ci]ZViig^WjiZ NET_TIMEOUT#>[cdgZhedchZ[gdbi]ZACHegdXZhh^hgZXZ^kZYl^i]^ci]VibVcnhZXdcYh!i]Z hiVcYWnYViVWVhZ^hbVg`ZYVh[V^aZYVcYi]Zad\lg^iZgXdci^cjZhXdbb^ii^c\igVchVXi^dch!^\cdg^c\ i]Z[V^aZYhiVcYWnYViVWVhZVhadc\VhViaZVhidcZhncX]gdc^oZYhiVcYWnYViVWVhZbZZihi]Z gZfj^gZbZcihd[BVm^bjbEgdiZXi^dc# I]^h^hl]ZgZi]ZWZ]Vk^dgX]Vc\ZhWZilZZcBVm^bjb6kV^aVW^a^inVcYBVm^bjbEgdiZXi^dc# >[i]ZjcgZVX]VWaZhiVcYWn^hi]ZaVhigZbV^c^c\hncX]gdc^oZYhiVcYWnYViVWVhZ!i]Zci]Zeg^bVgn ^chiVcXZi]ViXVccdadc\ZghZcYidVfjVa^[^ZYhiVcYWnYViVWVhZ^h\d^c\idWZdc^ihlVnYdlc ^cV]jggn#IdVkd^YXgVh]^c\hdi]VicdgZYdXVcWZ\ZcZgViZYWni]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ghZ!i]ZHA6bjhiVaadl[dg Ydlci^bZYjZidhiVcYWnVcY$dgcZildg`[V^ajgZhidVkd^Yi]Zedhh^W^a^ind[YViVadhh¸i]Vi^h!V Xdbb^iiZYigVchVXi^dcVii]Zeg^bVgni]Vi^hcdihV[ZanViVhiVcYWnYViVWVhZhdbZl]ZgZ#
Setting the Protection Mode 6hndj]VkZhZZc!ZVX]9ViV<jVgYegdiZXi^dcbdYZ]Vh^ihdlc hZid[gjaZh#NdjggjaZida^kZWnl]ZcndjbV`ZndjgegdiZXi^dcbdYZYZX^h^dc^hThe lower the impact to my primary database the higher the risk to my data#Dg!dcV¹]^\]ºcdiZ!The higher the protection of my data the higher the impact on my primary database. 6[iZgndj]VkZbVYZVegdiZXi^dcbdYZYZX^h^dcVcYVXXZeiZYi]ZgjaZh!XVkZVih!VcY WZ]Vk^dgh!]dlYdndjVXijVaanejii]dhZgjaZh^cideaVn4;^ghi!ndjcZZYidXgZViZVhiVcYWn YViVWVhZdgild!hZijei]ZgZYdigVchedgiViig^WjiZhidbZZii]ZgZfj^gZbZcihd[ndjgX]dhZc bdYZ!XgZViZi]ZHGA[^aZhdcndjgeg^bVgnVcYhiVcYWnYViVWVhZh!VcYi]ZcZmZXjiZdcZd[i]Z [daadl^c\HFAhiViZbZcihdcndjgeg^bVgnYViVWVhZ/ ALTER DATABASE SET STANDBY TO MAXIMIZE PERFORMANCE; ALTER DATABASE SET STANDBY TO MAXIMIZE AVAILABILITY; ALTER DATABASE SET STANDBY TO MAXIMIZE PROTECTION;
I]^hl^aahZijei]ZgjaZh^cndjgeg^bVgnYViVWVhZVcYXdbbjc^XViZi]ZhZii^c\idndjg hiVcYWnYViVWVhZhhdi]Vii]Zngjc^ci]ZhVbZegdiZXi^dcbdYZl]Zci]ZnWZXdbZi]Zeg^bVgn YViVWVhZ#NdjcZkZg]VkZid^hhjZi]Z[^ghiXdbbVcYid\didBVm^bjbEZg[dgbVcXZh^cXZndjg eg^bVgnYViVWVhZgjch^ci]VibdYZWnYZ[Vjai!jcaZhhndjVgZadlZg^c\i]ZegdiZXi^dcbdYZid BVm^bjbEZg[dgbVcXZ#6cYgZbZbWZgi]VindjXVccdihZii]ZegdiZXi^dcbdYZidBVm^bjb EgdiZXi^dcjcaZhhndjgeg^bVgnYViVWVhZ^hVii]ZMOUNThiViZ!cdiOPEN# 6[iZgndj]VkZbVYZi]^hYZX^h^dc!ndjcZZYidjcYZghiVcYi]ZVXijVaegdXZhhVcYeVgVbZiZgh jhZY[dgXgZVi^c\VcYXdc[^\jg^c\ndjghiVcYWnYViVWVhZh#
42
DgVXaZ9ViV<jVgY&&g=VcYWdd` NOTE If you decide to run in Maximum Protection, you need to consider a few factors when you do have to failover to one of your standby databases. These are discussed in Chapter 8.
Defining the Redo Transport Mode Ndjh]djaYcdljcYZghiVcYi]ZbV^ceVgihd[ndjghiVcYWngZYdigVchedgibZX]Vc^hb#>[ndjVgZ \d^c\idgjc^cBVm^bjbEZg[dgbVcXZbdYZ!ndjghiVcYWnYViVWVhZhl^aaWZjh^c\6HNC8VcY CD6;;>GBl]^X]VgZi]ZYZ[Vjaih^cDgVXaZ9ViVWVhZ&&g#>[ndjVgZ\d^c\idgjc^cZ^i]Zgd[ i]Zild]^\]ZgegdiZXi^dcbdYZh!i]ZYViVWVhZhl^aajhZHNC8VcY6;;>GB#NdjVgZVahd\d^c\id XgZViZHGA[^aZhdci]Zeg^bVgnVcYhiVcYWnYViVWVhZh#GZbZbWZgi]ViZkZci]dj\]^i^hcdi bVcYVidgnid]VkZHGA[^aZh^cBVm^bjbEZg[dgbVcXZbdYZ!WZhiegVXi^XZ^hidYdhd# Hd[dgBVm^bjbEZg[dgbVcXZbdYZ!i]ZLOG_ARCHIVE_DEST_neVgVbZiZgl^aaadd`a^`Zi]^h lZYdc¼ia^`Zjh^c\YZ[VjaihWZXVjhZi]Zn¼gZcdidWk^djhZcdj\]/ LOG_ARCHIVE_DEST_2='SERVICE=Matrix_DR0 ASYNC NOAFFIRM'
6cY[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VgZYZk^XZhViZVX]ZcY#7jih^cXZi]ZYZk^XZhjhZY^ci]Z^cYjhignVaaY^[[Zg!^i^hY^[[^Xjaiid YZiZgb^cZ]dladc\i]ZcZildg`]VhidWZidbV^ciV^cV&b^aa^hZXdcYbhGII#6\ddYgjaZd[ i]jbW^cVeZg[ZXildgaY^hi]ViV&bhGII^hVWdji((b^aZhdg*(`b#I]^hbZVchi]Vi^[ndj lVciid`ZZendjgegdYjXi^dc^beVXiYdlcidi]Z)eZgXZcigVc\Z!ndjl^aacZZYid`ZZei]Z aViZcXnYdlcid&%bh!dg(%%b^aZh^cVeZg[ZXildgaY!d[XdjghZ#Ndjl^aa]VkZidZmVb^cZ!iZhi! VcYZkVajViZndjgcZildg`idhZZ^[^iVXijVaanbViX]Zhjeidi]ZhZcjbWZgh#GZbZbWZgi]Vi aViZcXnYZeZcYhdci]Zh^oZd[i]ZeVX`Zi!hdYdc¼i_jhie^c\l^i]*+WniZh!WZXVjhZi]ZgZYdndj VgZ\ZcZgVi^c\^hVadiW^\\Zgi]Vci]Vi#;dgZmVbeaZ!]ZgZ^hi]Zdjieji[gdbVe^c\\d^c\[gdb IZmVhidCZl=Vbeh]^gZVWdji&..%b^aZhVic^\]i!l]Zccdi]^c\ZahZ^h\d^c\dcZY^iZYVW^i idbV`Z^i[^idci]ZeV\Zjh^c\*+WniZhVcY+)!%%%WniZh# Packet size of 56 bytes of data: ping -c 2 matrix PING matrix 56(84) bytes of data. 64 bytes from matrix : icmp_seq=0 ttl=57 time=49.1 ms 64 bytes from matrix : icmp_seq=1 ttl=57 time=49.0 ms --- matrix ping statistics --2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 49.047/49.122/49.198/0.234 ms, pipe 2
Packet size of 64,000 bytes of data: ping -c 2 -s 64000 matrix PING matrix 64000(64028) bytes of data. 64008 bytes from matrix : icmp_seq=0 ttl=57 time=61.6 ms 64008 bytes from matrix : icmp_seq=1 ttl=57 time=72.0 ms
)
;dg^c[dgbVi^dcVWdjihZii^c\#LOG_ARCHIVE_TRACE!hZZi]ZDgVXaZYdXjbZciVi^dcVi]iie/$$YdlcadVY #dgVXaZ#Xdb$YdXh$XY$7'-(*.T%&$hZgkZg#&&&$W'-'.)$igVXZ#]ib^+(,%,%#
46
DgVXaZ9ViV<jVgY&&g=VcYWdd` --- matrix ping statistics --2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 61.691/66.862/72.033/5.171 ms, pipe 2
Fj^iZVY^[[ZgZcXZ!VhndjXVchZZ#I]ZhbVaaeVX`Zi^h\Zii^c\VWdji)%b^aZhidi]Zb^aa^hZXdcY! Wjii]ZaVg\ZgeVX`Zi^h\Zii^c\VgdjcYdcan',b^aZheZgb^aa^hZXdcY#Hi^aacdiWVYVcYg^\]iVgdjcY djg\jZhhd[VWdji((b^aZhidi]Zb^aa^hZXdcY#Hd\^kZci]^hcZildg`!ndjXdjaYediZci^Vaan\d ',%b^aZhVcY`ZZe^il^i]^ci]Z)eZgXZcigVc\Z!YZeZcY^c\dci]ZgZYd\ZcZgVi^dcgViZVcYi]Z WVcYl^Yi]!l]^X]VgZcdih]dlc]ZgZ#D[XdjghZ!ndjldjaYlVciidjhZVbdgZgZa^VWaZVcY YZiV^aZYiddaidYZiZgb^cZndjgcZildg`aViZcXn¸hdbZi]^c\a^`ZigVXZgdjiZ#6hWZ[dgZ!i]^hdjieji ^hZY^iZYid[^idci]ZeV\ZVcYWZVW^ibdgZgZVYVWaZ# traceroute matrix traceroute to matrix, 30 hops 1q6-z2-rtr-1-v222-hsrp 0.381 1q7-rtr-13-tg3-2 1.234 1q7-rtr-24-g1-9 0.365 1q7-rtr-15-g-2-2 0.409 1q7-rtr-7-g1-0-0 0.541 1-rtr-2-pos5-0-0 49.047 1-swi-2-rtr-1-v108 50.313 matrix 49.448 ms 49.441
max, 38 byte packets ms 0.200 ms 0.443 ms ms 0.276 ms 0.233 ms ms 1.858 ms 0.299 ms ms 0.357 ms 0.241 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C6B:H#DG6[^aZ!lZldjaYYZ[^cZi]Z [daadl^c\YZ[^c^i^dc[dgMatrix_DR0/ Matrix_DR0.domain= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=Matrix_DR.domain)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=Matrix_DR0.domain)) )
IdVYY^ci]ZbVm^bjbH9Jh^oZd[('!,+,WniZhl]^X]^hi]ZWZhiegVXi^XZ[dg9ViV<jVgY! lZldjaYVYYi]ZSDUViig^WjiZ/ Matrix_DR0.domain= (DESCRIPTION= (SDU=32767) (ADDRESS=(PROTOCOL=tcp)(HOST=Matrix_DR.domain)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME= Matrix_DR0.domain)) )
I]^hl^aaXVjhZ9ViV<jVgYidgZfjZhi('!,+,WniZh[dgi]ZhZhh^dcYViVjc^il]ZcZkZg^ibV`ZhV XdccZXi^dcidi]ZhiVcYWnXVaaZYMatrix_DR0# H^cXZlZ]VkZX]dhZccdiidjhZi]ZHFAC:I#DG6bZi]dY!lZl^aaVahdcZZYidhZi^i^ci]Z A>HI:C:G#DG6[^aZVii]Zeg^bVgnYViVWVhZhdi]Vi^cXdb^c\XdccZXi^dch[gdbi]ZhiVcYWn YViVWVhZVahd\Zii]ZbVm^bjbH9Jh^oZ#Hd!^ci]ZA>HI:C:G#DG6!lZVYYi]ZSDUViig^WjiZid i]ZH>9a^hiVhlZaa/ SID_LIST_listener_name= (SID_LIST= (SID_DESC= (SDU=32767) (GLOBAL_DBNAME=Matrix.domain) (SID_NAME=Matrix) (ORACLE_HOME=/scratch/OracleHomes)))
Cdi^XZ]ZgZi]Vii]ZSIDVcYGLOBAL_DBNAMEVgZMatrix!cdiMatrix_DR0#I]^h^hWZXVjhZlZ VgZhi^aaldg`^c\dci]Zeg^bVgnYViVWVhZhnhiZb#LZVgZegZeVg^c\i]Zeg^bVgnYViVWVhZidbV`Z dji\d^c\XdccZXi^dchidi]ZhiVcYWnYViVWVhZhVcYVXXZei^cXdb^c\XdccZXi^dch[gdbi]Z hiVcYWnYViVWVhZhjh^c\i]ZbVm^bjbH9Jh^oZd[('!,+,WniZh# Cdli]Vii]^h^hXdbeaZiZ!lZVahdcZZYidhZijei]ZhiVcYWnhnhiZbidjhZi]ZhVbZH9J h^oZ#6ii]^hed^ci!h^cXZlZ]VkZcdinZihiVgiZYidXgZViZVhiVcYWnYViVWVhZ!lZbVncdi]VkZ ^chiVaaZYi]Zhd[ilVgZVii]ZhiVcYWnhZgkZg#I]Vi¼hVaag^\]i!i]dj\]!WZXVjhZlZXVccdiZYdlci]Z [daadl^c\hiZehidiV`ZV[iZglZ^chiVaai]Zhd[ilVgZaViZg^ci]^hX]VeiZg# DjgICHcVbZVcYYZhi^cVi^dceVgVbZiZg^h\d^c\idWZY^[[ZgZciVii]ZhiVcYWnhZgkZg#>il^aa jhZVcVbZi]Vied^cihWVX`idi]Zeg^bVgnYViVWVhZ!hdi]Vil]Zci]^hhiVcYWnWZXdbZhi]Z eg^bVgnYViVWVhZhZZ8]VeiZg-!9ViV<jVgYl^aa`cdll]ZgZidhZcYi]ZgZYd#LZVgZ\d^c\id jhZMatrix[dgi]^hejgedhZ#HddjgeVgVbZiZgldjaYadd`a^`Zi]^h/ LOG_ARCHIVE_DEST_2='SERVICE=Matrix SYNC AFFIRM'
48
DgVXaZ9ViV<jVgY&&g=VcYWdd` CdldjgICHcVbZ^hMatrix!hd^cdjgICHC6B:H#DG6[^aZlZldjaYYZ[^cZi]Z[daadl^c\ [dgMatrix/ Matrix.domain= (DESCRIPTION= (ADDRESS=(PROTOCOL=tcp)(HOST=Matrix.domain)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=Matrix.domain)) )
6cYidVYY^ci]ZbVm^bjbH9Jh^oZd[('!,+,!lZldjaYVYYi]ZSDUViig^WjiZ/ Matrix.domain= (DESCRIPTION= (SDU=32767) (ADDRESS=(PROTOCOL=tcp)(HOST=Matrix.domain)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=Matrix.domain)) )
9ViV<jVgYl^aacdlgZfjZhi('!,+,WniZh[dgi]ZhZhh^dcYViVjc^il]ZcZkZg^ibV`ZhV XdccZXi^dcidi]Zeg^bVgnYViVWVhZXVaaZYBVig^m# 9dc¼i[dg\Zii]Za^hiZcZg[^aZdci]ZhiVcYWn#6hlZVgZcdijh^c\i]ZHFAC:I#DG6bZi]dY! lZVahdcZZYidhZi^i^ci]ZA>HI:C:G#DG6[^aZVii]ZhiVcYWnYViVWVhZhdi]Vi^cXdb^c\ XdccZXi^dch[gdbi]Zeg^bVgnYViVWVhZVahd\Zii]ZbVm^bjbH9Jh^oZ#Hd!^ci]ZhiVcYWn A>HI:C:G#DG6!lZVYYi]ZSDUViig^WjiZVhlZaa/ SID_LIST_listener_name= (SID_LIST= (SID_DESC= (SDU=32767) (GLOBAL_DBNAME=Matrix_DR0.domain) (SID_NAME=Matrix_DR0) (ORACLE_HOME=/scratch/OracleHomes)))
LZ]VkZcdlegZeVgZYi]Zeg^bVgnYViVWVhZidbV`Zdji\d^c\XdccZXi^dchidi]ZhiVcYWn YViVWVhZhVcYVXXZei^cXdb^c\XdccZXi^dch[gdbi]ZhiVcYWnYViVWVhZhjh^c\i]ZbVm^bjbH9J h^oZd[('!,+,!VcYk^XZkZghV[gdbhiVcYWnideg^bVgn#
TCP Tuning HZii^c\i]ZDgVXaZCZiH9J^hdcani]Z[^ghieVgid[ijc^c\VcZildg`¸i]ZDgVXaZ eVgi#CdllZcZZYid\dYZZeZgi]VcDgVXaZCZiVcYegZeVgZdjgI8EcZildg`aVnZgid]VcYaZ i]ZaVg\ZVbdjcihd[gZYdlZVgZ\d^c\idi]gdlVi^iYjg^c\9ViV<jVgYegdXZhh^c\#6h bZci^dcZYZVga^Zg!djggZYd^hjhjVaan\ZcZgViZY^caVg\ZVbdjcih!bjX]bdgZi]Vci]ZVbdjcih d[YViVWZ^c\hZciWVX`VcY[dgi]WZilZZcXa^ZciVeea^XVi^dch# D[hZkZgVaVhe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hi]ZgZVabVi]/ Bandwidth: 155Mbits/sec = 155,000,000 bits/sec (155 * 1,000,000) Latency: 8ms = .008 sec (8 / 1000) BDP = 155,000,000 * .008 * 3 BDP = 3,720,000 bits / 8 (8 bits to a byte) BDP = 465,000 bytes
6hndjXVchZZ!i]ZhZVbdjcihVgZbjX]aVg\Zgi]Vci]ZYZ[VjaihdX`Zih^oZd[&+@# Cdll]Vi]VeeZch^[lZbdkZi]ZhiVcYWnYViVWVhZ[gdbBVcX]ZhiZg!CZl=Vbeh]^gZ!VcY eji^i^cCZlVg`!CZl?ZghZn4I]Vi^hVWdji''+b^aZh(+&`b!hd^[lZVhhjbZlZ]VkZi]ZhVbZ D8"(VcYi]VilZ¼aa\Zii]ZhVbZheZZYVhWZ[dgZ!djgaViZcXn^h\d^c\id\didVWdji(+bh#Hd l]ViYdZhi]ViYdiddjg79E4 BDP = 155Mbits/sec * 36ms * 3 BDP = 697,500 * 3 BDP = 2,092,500 bytes
HdcdllZcZZYidhZidjghdX`Zih^oZid'!%.'!*%%WniZh!dggdj\]an'B7#7jil]ViVWdji i]ZXVhZ^cl]^X]lZ]VkZildhiVcYWnYViVWVhZh¸dcZ^cBVcX]ZhiZg!CZl=Vbeh]^gZjh^c\ HNC8!VcYi]Zdi]Zg^cCZlVg`!CZl?ZghZnjh^c\6HNC849dlZVYYi]ZildWVcYl^Yi] YZaVnegdYjXihid\Zi]Zg[dgVXdbW^cZYidiVad['!**,!*%%WniZh4Cd!VcYi]Vi^hi]ZWZVjind[ jh^c\DgVXaZ9ViVWVhZ&&g/ndjXVcXdc[^\jgZZVX]hiVcYWnYViVWVhZid]VkZi]ZVeegdeg^ViZ hdX`Zih^oZ[dg^ihaViZcXn!Vai]dj\]ndjYdcZZYidiV`ZXVgZYjg^c\gdaZigVch^i^dch#
+
NdjXVcVXXZhhi]Z¹H<7VcYl^Yi]9ZaVnEgdYjXi8VaXjaVidgºVilll#heZZY\j^YZ#cZi$WYe#e]e#
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
51
L]^X]Wg^c\jhidi]Z_dWd[VXijVaanhZii^c\i]ZhZkVajZh#;dgi]^hZmZgX^hZ!lZl^aajhZV YdjWaZhiVcYWnXdc[^\jgVi^dcl^i]dcZ^cBVcX]ZhiZgVcYi]Zdi]Zg^cCZlVg`#HdlZ]VkZi]gZZ hnhiZbh!BVig^m#YdbV^c!BVig^mT9G#YdbV^c!VcYBVig^mT9GYdbV^c!VcYi]Zi]gZZYViVWVhZh! BVig^m!BVig^mT9G%!VcYBVig^mT9G6hl^i]i]ZH9J!i]ZhdX`Zih^oZbjhiWZhZiViWdi]ZcYh d[i]ZcZildg`0di]Zgl^hZdjghdX`Zih^oZl^aaWZgZYjXZYidi]ZadlZhiXdbbdcYZcdb^cVidg# 6cYgZbZbWZgi]VibZVchlZ\Zii]ZYZ[Vjaid[&+@^[lZVgZcdiXVgZ[ja#BVig^mdjgeg^bVgn l^aacdl]VkZildgZYdYZhi^cVi^dclog_archive_dest_neVgVbZiZgh!Vh[daadlh/ LOG_ARCHIVE_DEST_2='SERVICE=Matrix_DR0 SYNC AFFIRM' LOG_ARCHIVE_DEST_3='SERVICE=Matrix_DR1 ASYNC NOAFFIRM'
I]^hbZVchlZ]VkZildZcig^Zh^cdjgICHcVbZh[^aZ#IdhZii]ZbjeidjhZi]ZVeegdeg^ViZ hdX`Zih^oZh!lZVYY^cildbdgZViig^WjiZhidZVX]Zcign!_jhiVhlZY^Yl^i]i]ZH9J#7jii]^h i^bZi]Znl^aaWZY^[[ZgZci[dgZVX]YViVWVhZ/ Matrix_DR0.domain= (DESCRIPTION= (SDU=32767) (SEND_BUF_SIZE=465000) (RECV_BUF_SIZE=465000) (ADDRESS=(PROTOCOL=tcp)(HOST=Matrix_DR)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=Matrix_DR0.domain)) ) Matrix_DR1.domain= (DESCRIPTION= (SDU=32767) (SEND_BUF_SIZE=2092500) (RECV_BUF_SIZE=2092500) (ADDRESS=(PROTOCOL=tcp)(HOST=Matrix_DR1.domain)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=Matrix_DR1.domain)) )
7jilZVgZcdiYdcZnZi#LZhi^aa]VkZid\didZVX]hiVcYWnVcYjeYViZi]Za^hiZcZg!_jhiVh ndjY^Yl^i]i]ZH9J#>ci]ZBVig^mT9GhnhiZb¼hA>HI:C:G#DG6!^iadd`ha^`Zi]^h/ LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Matrix_DR.domain)(PORT = 1521)) )
6YY^ci]ZhdX`Zih^oZhXVaaZYi]ZhZcYVcYgZXZ^kZWj[[ZghVcY^iadd`ha^`Zi]^h/ LISTENER = (DESCRIPTION = (SEND_BUF_SIZE=465000) (RECV_BUF_SIZE=465000) (ADDRESS = (PROTOCOL = TCP)(HOST = Matrix_DR.domain)(PORT = 1521)) )
52
DgVXaZ9ViV<jVgY&&g=VcYWdd` >ci]ZA>HI:C:G#DG6dci]ZBVig^mT9G&hnhiZb!lZldjaYjhZi]ZaVg\ZgkVajZ/ LISTENER = (DESCRIPTION = (SEND_BUF_SIZE=2092500) (RECV_BUF_SIZE=2092500) (ADDRESS = (PROTOCOL = TCP)(HOST = Matrix_DR1.domain)(PORT = 1521)) )
6ii]^hed^ci!lZ]VkZXdc[^\jgZYBVig^midbV`Z9ViV<jVgYXdccZXi^dchidBVig^mT9G% jh^c\VhdX`Zih^oZd[)+*!%%%WniZhVcYidBVig^mT9G&jh^c\'!%.'!*%%WniZh# IdXdbeaZiZdjgXdc[^\jgVi^dc!lZcZZYidiV`Z^cidVXXdjcil]VilZl^aa]VkZidYdhdi]Vi djgXdc[^\jgVi^dcldg`hi]ZhVbZlVnV[iZgVgdaZigVch^i^dc#LZl^aahZijeBVig^mT9G%Vhi]Z gdaZigVch^i^dciVg\Zi[^ghi#IdXdc[^\jgZ[dgVhl^iX]dkZgdg[V^adkZgidBVig^mT9G%!lZl^aa]VkZ idhZijei]ZICHcVbZhVcYi]Za^hiZcZgdci]ZBVig^mT9GhnhiZbidbV`Zi]ZhVbZXdccZXi^dch l^i]i]ZXdggZXihdX`Zih^oZh[dgBVig^mVcYBVig^mT9GI]^hbZVchi]Vii]ZICHcVbZh[^aZl^aa cZZYid]VkZi]ZildZcig^Zh[dgBVig^mVcYBVig^mT9G&l^i]i]ZXdggZXihdX`Zih^oZh/ Matrix.domain= (DESCRIPTION= (SDU=32767) (SEND_BUF_SIZE=465000) (RECV_BUF_SIZE=465000) (ADDRESS=(PROTOCOL=tcp)(HOST=matrix.domain)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=Matrix.domain)) ) Matrix_DR1.domain= (DESCRIPTION= (SDU=32767) (SEND_BUF_SIZE=2092500) (RECV_BUF_SIZE=2092500) (ADDRESS=(PROTOCOL=tcp)(HOST=Matrix_DR1.domain)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=Matrix_DR1.domain)) )
;^cVaan!lZhZijei]Za^hiZcZg[^aZh#LZVagZVYnXdc[^\jgZYi]Za^hiZcZg^ci]ZBVig^mT9G& hnhiZbl]ZclZY^Yi]Zdg^\^cVahZijedcBVig^m#HdVXdccZXi^dc[gdbBVig^mT9G%idBVig^mT 9G&l^aajhZi]ZhdX`Zih^oZd[)+*!%%%WniZh#HdVaai]Vi^haZ[i^hid\dWVX`idBVig^mVcYVYY^c i]ZhdX`Zih^oZidi]ZBVig^ma^hiZcZg/ LISTENER = (DESCRIPTION = (SEND_BUF_SIZE=465000) (RECV_BUF_SIZE=465000) (ADDRESS = (PROTOCOL = TCP)(HOST = Matrix.domain)(PORT = 1521)) )
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
53
6ii]^hed^ci!DgVXaZCZiHZgk^XZh^hXdc[^\jgZYideZg[dgblZaaWVhZYdcdjgijc^c\ XVaXjaVi^dchgZ\VgYaZhhd[l]Zi]ZgdgcdiBVig^mdgBVig^mT9G%^hi]Zeg^bVgnYViVWVhZ#D[ XdjghZ!lZld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A= (SERVICE_NAME=Matrix.domain)) ) Matrix_DR0.domain= (DESCRIPTION= (SDU=32767) (SEND_BUF_SIZE=2092500) (RECV_BUF_SIZE=2092500) (ADDRESS=(PROTOCOL=tcp)(HOST=Matrix_DR.domain)(PORT=1521)) (CONNECT_DATA= (SERVICE_NAME=Matrix_DR0.domain)) )
=dlZkZg!i]Za^hiZcZghdcBVig^mVcYBVig^mT9G%VgZWdi]hZiid)+*!%%%[gdbdjgegZk^djh hZije#>[BVig^mT9G&bV`ZhVXdccZXi^dcidZ^i]Zgd[i]Zb!i]ZhdX`Zih^oZ^h\d^c\idWZi]Z adlZgd[i]Zild!^ci]^hXVhZ)+*!%%%!l]^X]^hcdi\d^c\idWZZcdj\]id\Zii]ZeZg[dgbVcXZ lZcZZY#D[XdjghZ!V[iZgi]ZgdaZigVch^i^dc[gdbBVig^mdgBVig^mT9G%idBVig^mT9G&!lZXdjaY ValVnhejiVegdXZYjgZ^ceaVXZid]VkZhdbZdcZjeYViZi]Za^hiZcZg[^aZhdcWdi]hnhiZbhVcY X]Vc\Zi]Z)+*!%%%id'!%.'!%%%#6WZiiZghdaji^dc^h_jhiidhZiVaai]gZZa^hiZcZghidVXXZei XdccZXi^dchjeidVhdX`Zih^oZd['!%.'!%%%WniZh#I]VilVn!l]ZcBVig^mT9G&WZXdbZhi]Z eg^bVgnYViVWVhZVcYhiVgihhZcY^c\gZYdidBVig^mVcYBVig^mT9G%!^il^aa\Zii]ZcZXZhhVgn '!%.'!%%%hdX`Zih^oZVcYa^[Zl^aaWZ\ddY# 7ji!lV^i!hVnhdjghnhiZbVcYcZildg`VYb^c^higVidgh!i]VibZVchi]Vil]ZcBVig^mVcY BVig^mT9G%XdccZXi^cZ^i]ZgY^gZXi^dc!i]Znl^aa\ZiVadibdgZhdX`Zih^oZi]Vci]ZncZZYl]^X]
54
DgVXaZ9ViV<jVgY&&g=VcYWdd` l^aalVhiZbZbdgnVcYV[[ZXidjghnhiZbVcYcZildg`dkZgVaaeZg[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aijc^c\^hgZfj^gZY idZchjgZi]Vii]Zh^oZhd[i]ZfjZjZhVgZdei^bVa[dgndjgcZildg`XdccZXi^dc!eVgi^XjaVgan[dg ]^\]"WVcYl^Yi]cZildg`h#;daadl^c\VgZhdbZ\ZcZgVa\j^YZa^cZhdcl]ZcidijcZi]ZhZfjZjZh/ N IjcZi]ZigVchb^ifjZjZhl]Zci]Z8EJ^h[VhiZgi]Vci]ZcZildg`# N IjcZi]ZigVchb^ifjZjZhl]Zci]ZhdX`ZiWj[[Zgh^oZhVgZaVg\Z#
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
55
N IjcZi]ZgZXZ^kZfjZjZhl]Zc^i^hedhh^WaZid]VkZWjghihd[igV[[^X# N IjcZWdi]fjZjZhl]Zci]ZgZ^h]^\]gViZd[hbVaa"h^oZYeVX`Zih# >ci]ZaVhihZXi^dc!lZY^YXgZViZaVg\ZghdX`Zih^oZh!hdijc^c\i]ZigVchb^ifjZjZl^aa egdWVWan]Zae#7jiVahdcdiZldgi]n^hi]VibVcn9ViV<jVgYXdc[^\jgVi^dch]VkZWjghihd[gZYd VhlZaa!YZeZcY^c\dcndjgldg`adVYh#I]ZigVchb^ifjZjZh^oZ^hXdc[^\jgZYl^i]i]ZcZildg` ^ciZg[VXZdei^dctxqueuelen!VcYi]ZcZildg`gZXZ^kZfjZjZh^oZ^hXdc[^\jgZYl^i]i]Z`ZgcZa eVgVbZiZgnetdev_max_backlog#;dgZmVbeaZ!idY^heaVni]ZigVchb^ifjZjZhZii^c\!jhZ ifconfig/ eth0 Link encap:Ethernet HWaddr 00:11:85:7C:5D:A5 inet addr:10.149.249.107 Bcast:10.149.251.255 Mask:255.255.252.0 inet6 addr: fe80::211:85ff:fe7c:5da5/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:4542160 errors:0 dropped:0 overruns:0 frame:0 TX packets:1503398 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX b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XZhd[9ViV<jVgY!i]VieVgi^VaVgX]^kZad\[^aZldjaYWZegdXZhhZY#6ii]Vi ed^ci!ndjghiVcYWnYViVWVhZ^h[^c^h]ZY#Ign^c\idgZhiVgigZXdkZgn!l]Zi]ZgbVcjVaandgjh^c\ 9ViV<jVgYBVcV\ZYgZXdkZgn!ldjaYgZhjai^ci]ZYgZVYZYDG6"%%('+Zggdg/ Media Recovery Log +FLASH/matrix_dr0/…/1_seq_131.419.672830973 MRP0: Background Media Recovery terminated with error 326 Mon Oct 18 23:00:28 2004 Errors in file /scratch/OracleHomes/…/Matrix_DR0_mrp0_540.trc: ORA-00326: log begins at change 7249201863711, need earlier change 7249198180208 ORA-00334: archived log: '+FLASH/matrix_dr0/…/1_seq_131.419.672830973' Recovery interrupted. MRP0: Background Media Recovery process shutdown
I]^hZggdglVhVXaZVg^cY^XVi^dci]VidcZd[i]dhZeVgi^VaVgX]^kZad\h]VYWZZcVeea^ZY#Ndjg dcanX]d^XZlVhid[^c^h]l^i]VcACTIVATE STANDBY DATABASE!dg!^[ndjlZgZcdi[V^a^c\ dkZg!gZ"XgZViZi]ZhiVcYWnYViVWVhZ[gdbhXgViX]#IddbVcneZdeaZbVYZi]^hb^hiV`Z!VcYh^cXZ HGA[^aZhlZgZjhZYVaai]Zi^bZWn9ViV<jVgY!i]Vi[jcXi^dcVa^inlVhgZbdkZY[gdb&&gVcYaViZg kZgh^dchd[&%gGZaZVhZh&VcY'# NdjVgZ\d^c\id]VkZHGA[^aZh!VcYVhhjX]ndjcZZYidbV`ZhjgZi]Znldg`Vh[VhiVhi]Zn XVc#LZ¼kZZmeaV^cZYi]ViVhgZYd^hgZXZ^kZYWni]ZhiVcYWn^i^hlg^iiZcidY^h`#>cBVm^bjb 6kV^aVW^a^inVcYBVm^bjbEgdiZXi^dcbdYZh!i]ZY^h`lg^iZidi]ZHGA[^aZbjhidXXjgeg^dgid hZcY^c\VcVX`cdlaZY\bZciWVX`idi]Zeg^bVgni]Vii]ZgZYd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ZZi^bZhidhZZl]Vi^begdkZbZcildjaYWZgZVa^oZY[gdb^ihijc^c\Z[[dgih#I]ZWVhZa^cZ l^i]djiVcnijc^c\lVhVi]gdj\]ejid[&%#-BW^ih$hZX[dgVidiVad[,,#'B7d[gZYdigVch[ZggZY^c +%hZXdcYh#I]Vi^hVWdji'-B7$hZX# 6[iZg^cXgZVh^c\i]ZcZildg`hdX`ZiWj[[Zgh^oZhid(s79E[gdbi]ZYZ[Vjaid[&+@!i]ZiZVb lVhVWaZidVX]^ZkZVi]gdj\]ejid[,(%BW^ih$hZX[dgVidiVad[*#&&<7ldgi]d[YViVWZ^c\ igVch[ZggZY^ci]ZhVbZ+%hZXdcYh#G^\]iVlVn!i]VilVhV_jbe[gdb'-B7$hZXid-,#'B7$ hZX¸dgV+++-eZgXZci^begdkZbZcidkZgi]ZWVhZa^cZeg^dgidijc^c\# ;^cVaani]ZcZildg`fjZjZaZc\i]hlZgZ^cXgZVhZYid&%%%[gdbYZ[Vjaid[&%%VcYi]ZhVbZ iZhigZgjc#I]ZYViVigVch[ZggZY\gZlid+#**<7VcYi]ZcZildg`i]gdj\]eji\gZlid.(,#%BW^ih$ hZX#I]Vi^h&&-B7$hZX[dgVcVYY^i^dcVa'-eZgXZci^begdkZbZci# DkZgVaa!i]Zijc^c\ZmZgX^hZh^cXgZVhZYi]ZgVlcZildg`igVch[Zgi]gdj\]ejiWnVl]dee^c\ -*,*eZgXZciL]^aZndjbVncdiZmeZg^ZcXZi]^h`^cYd[^cXgZVhZ^cndjg9ViV<jVgYXdc[^\jgVi^dc! ndjl^aaZmeZg^ZcXZVXdch^YZgVWaZ^begdkZbZci^cgZYdigVchedgi#DcanndjgiZhi^c\l^aaiZaandj ZmVXian]dlbjX]# NOTE You should be aware of some caveats to this tuning exercise if you are still using Oracle Database 10\ Release 2. This information is contained in the Oracle Maximum Availability paper “Data Guard Redo Transport & Network Configuration.” , At the time of this writing, the paper had not yet been updated to reflect Oracle Database 11\.
,
HZZlll#dgVX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Z!VcYi]ViejgedhZ^hidhVkZndjgWjh^cZhhl]ZcndjZmeZg^ZcXZ V[V^ajgZgZbZbWZg!^i¼hwhen!cdiif #>cVYY^i^dc!9ViV<jVgYXVcWZjhZY^cVbjai^ijYZd[lVnh i]ViVgZcdc·[V^ajgZgZaViZYidhVkZndjegZX^djhYdlci^bZ#I]ZhZVgZVaaVXXdbea^h]ZYWngdaZ igVch^i^dch!switchover!VcYfailover#
Relating the RPO and RTO to the Protection Mode Cdli]Vindj]VkZbVYZndjgYZX^h^dch!jcYZghiVcYVaad[ndjgdei^dch!VcY]VkZeZg[dgbZYi]Z gZfj^gZYhZijeVcYijc^c\iVh`h[dgndjghnhiZbhVcYcZildg`h!ndjVgZ[^cVaangZVYnidhiVgi ^beaZbZci^c\hiVcYWnYViVWVhZhVcYejii^c\i]ZdeZgVi^dcVaegVXi^XZh^cideaVXZ# 6hndj]VkZhZZchd[Vg^ci]^hX]VeiZg!Y^hVhiZggZXdkZgnVcY]^\]VkV^aVW^a^inVgZWVh^XVaan VhZid[igVYZd[[h#NdjbjhiVXXZeii]Viid\Zii]ZWZhieZg[dgbVcXZdjid[ndjgegdYjXi^dchnhiZb! ndjl^aaediZci^VaanadhZhdbZYViVVi[V^ajgZi^bZ!VcYndj]VkZidZmVb^cZVcYijcZndjg cZildg`idbZZindjgGED#6cY^[ndjejiVhiVcYWndjih^YZd[ndjgadXVa\Zd\gVe]^XVaVgZV! ndjcZZYVcZildg`i]ViXVc]VcYaZi]ZVbdjcid[X]Vc\Zi]Vil^aadXXjgdcndjgeg^bVgn YViVWVhZ#
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
63
OZgdYViVadhh^hc¼i[gZZWnVadc\h]di#HX^ZcXZ"[^Xi^dclg^iZgGdWZgi6#=Z^caZ^ceji^iWZhi l]Zc]ZlgdiZI6CHI66;A¸I]ZgZ6^c¼iCdHjX]I]^c\6h6;gZZAjcX]#&&
Creating a Physical Standby Database ;^cVaan!ndj\ZiidhiVgiXgZVi^c\VhiVcYWnYViVWVhZ>[ndjh`^eeZYi]Z[^ghieVgid[i]^hX]VeiZg! i]ZhZegdXZYjgZhl^aahi^aa\ZindjghiVcYWnYViVWVhZjeVcYgjcc^c\!Wjindjl^aacdijcYZghiVcY l]VindjVgZXdc[^\jg^c\!cdgl^aa^ieZg[dgb^ci]ZbVccZgndjb^\]iZmeZXi#HdbV`ZhjgZ ndj¼kZgZVYZkZgni]^c\^ci]^hX]VeiZgjeidi]^hed^ciWZ[dgZndjWZ\^c#
Choosing Your Interface 7Z[dgZndj\ZihiVgiZY!ndjcZZYidbV`ZVYZX^h^dcVWdjii]Z^ciZg[VXZVgZndj\d^c\idjhZ l]ZcndjXdc[^\jgZ!bVcV\Z!VcYjhZndjg9ViV<jVgYhZije#Ndj]VkZi]gZZX]d^XZh/DgVXaZ :ciZgeg^hZBVcV\Zgdg\gVe]^XVajhZg^ciZg[VXZ<J>!Vhh]dlc^c;^\jgZ'" NdjcZZYidX]ddhZVc^ciZg[VXZcdlWZXVjhZ!dcXZndjX]ddhZidjhZi]Z7gd`ZgZ^i]Zg Y^gZXiandgi]gdj\][ndjlVciidgZijgcidjh^c\HFAEajhideZg[dgbbVcV\ZbZci!ndjcZZYidgZbdkZ i]Z7gd`ZgXdc[^\jgVi^dc!l]^X]VahdbZVchi]VindjXVccdadc\ZgjhZ
HZZ]iie/$$Zc#l^`^eZY^V#dg\$l^`^$I6CHI66;A#
64
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Enterprise Manager GUI
Broker CLI is DGMGRL
Standby Databases CLI is SQL*Plus
Primary Databases CLI is SQL*Plus
FIGURE 2-1.
Data Guard management interfaces
Before You Start >cVaad[i]ZhiVcYWnXgZVi^dcbZi]dYhlZY^hXjhh^ci]Z[daadl^c\hZXi^dch!^i^hVhhjbZYi]Vindj ]VkZVagZVYneZg[dgbZYi]ZhZegZgZfj^h^iZh/ N :cVWaZYVgX]^k^c\dcndjgeg^bVgnYViVWVhZ N >chiVaaZYDgVXaZ9ViVWVhZ&&gdcVaahnhiZbhl]ZgZndjl^aaWZXgZVi^c\hiVcYWn YViVWVhZhndjYdcdicZZYidXgZViZVYViVWVhZ!_jhiYdVhd[ilVgZdcan^chiVaa N 8dc[^\jgZYVcYhiVgiZY6HBVai]dj\]6HB^hcdibVcYVidgn!^i^hgZXdbbZcYZY N 8gZViZYVcncZXZhhVgnY^gZXidg^Zhdci]ZhiVcYWnhnhiZb N 8dc[^\jgZYVcYhiVgiZYi]Za^hiZcZgdci]ZhiVcYWnhnhiZb N 6YYZYndjgeg^bVgnVcYVaahiVcYWnYViVWVhZhXdccZXi^dcYZhXg^eidghidVaai]Z ICHC6B:H[^aZhdcZVX]hnhiZb0ZkZc^[ndjY^YcdieZg[dgbcZildg`ijc^c\!ndjbjhi eZg[dgbViaZVhii]^hiVh`/ MATRIX_DR0 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = matrix_dr0.com)(PORT = 1521)) )
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
65
(CONNECT_DATA = (SERVICE_NAME = Matrix_DR0) ) ) MATRIX = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = matrix.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = Matrix) ) )
NdjYdcdi]VkZidVYYVcnhiVi^XZcig^Zhidi]ZA>HI:C:G[^aZhnZi#LZl^aaiZaandjl]Zci]Vi ^hcZXZhhVgnVcYl]n#?jhigZbZbWZgi]^h/HZii^c\jeV9ViV<jVgYhiVcYWnYViVWVhZ^hcd Y^[[ZgZci[gdbhZii^c\jendjgeg^bVgnYViVWVhZ^ci]Z[^ghieaVXZ#NdjcZZYVYViVWVhZ!l]^X] bZVchi]Z[daadl^c\/ N A^hiZcZg N ICHC6B:Hid[^cYi]ZhiVcYWnVcYi]Zeg^bVgn N >c^i^Va^oVi^dceVgVbZiZgh N EVhhldgY[^aZeajhhZgk^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i^cVi^dc#
Step 12: Correcting Your SRL Files NdjcZZYideVnViiZci^dciddcZbdgZi]^c\WZ[dgZndj[^c^h]je#GZbZbWZglZhV^Yi]Vii]ZHGA [^aZhXdjaY\Zibjai^eaZmZY47nYZ[Vjai!l^i]6HBi]Znl^aa]VkZWZZceji^cidWdi]Y^h`\gdjeh! _jhia^`Zi]ZDGA[^aZh#>[ndjVgZcdijh^c\6HB!i]Znl^aaWZbjai^eaZmZYWVhZYdcndjghZii^c\d[ i]ZDB_CREATE_ONLINE_LOG_DEST_neVgVbZiZghVcYl^aaWZbjai^eaZmZY^[ndj]VkZheZX^[^ZY bdgZi]VcdcZadXVi^dc#
76
DgVXaZ9ViV<jVgY&&g=VcYWdd` DcZ^i]ZgYViVWVhZ!ndjXVcfjZgni]ZV$LOGFILEk^ZlVcYdWiV^cVa^hid[i]ZHGA[^aZhi]Vi ]VkZWZZcXgZViZY/ SQL> SELECT GROUP#, MEMBER FROM V$LOGFILE WHERE TYPE='STANDBY'; GROUP# MEMBER ---------- -----------------------------------------------------------4 +DATA/matrix_dr0/onlinelog/group_4.265.677440617 4 +FLASH/matrix_dr0/onlinelog/group_4.333.677440625 5 +DATA/matrix_dr0/onlinelog/group_5.268.677440629 5 +FLASH/matrix_dr0/onlinelog/group_5.329.677440637 6 +DATA/matrix_dr0/onlinelog/group_6.300.677440645 6 +FLASH/matrix_dr0/onlinelog/group_6.292.677440653 7 +DATA/matrix_dr0/onlinelog/group_7.298.677440663 7 +FLASH/matrix_dr0/onlinelog/group_7.291.677440669 8 rows selected.
>[ndjgHGA[^aZhYd\Zibjai^eaZmZY!ndjh]djaYgZbdkZi]Zbjai^eaZmZYXdend[ZVX]HGAdc i]ZhiVcYWnVcYeg^bVgnYViVWVhZh¸^cdjgXVhZ!i]ZdcZh^ci]Z+DATAY^h`\gdje# Dci]Zeg^bVgnYViVWVhZ!l]ZgZi]ZHGA[^aZhVgZcdiXjggZcianWZ^c\jhZY!ndjXVcYgdei]Z bjai^eaZmZYbZbWZgh^bbZY^ViZanWnZmZXji^c\i]Z[daadl^c\XdbbVcY[dgZVX]bjai^eaZmZY bZbWZg/ SQL> ALTER DATABASE DROP STANDBY LOGFILE MEMBER '+DATA/matrix/onlinelog/group_4.265.677440617'; Database altered.
Dci]ZhiVcYWnYViVWVhZ!ndj[^ghicZZYidhidei]ZBGEVcY!^[edhh^WaZ!gZYdigVchedgiVii]Z hVbZi^bZ#>[ndjYdcdilVciidhidei]ZigVchedgi!ndjl^aagZXZ^kZVcZggdg[dgi]ZHGAXjggZcian WZ^c\jhZYWni]ZG;HegdXZhhVcYndjl^aa]VkZidhl^iX]ad\[^aZhVii]Zeg^bVgnYViVWVhZid[gZZ ^ijeWZ[dgZYgdee^c\i]ZZmigVbZbWZg#NdjXVchidei]ZBGEjh^c\HFAEajhcdgbVaanVcd"cd WjiD@i]^hdcZi^bZ!dgndjXVcjhZ ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; Database altered. SQL> ALTER DATABASE DROP STANDBY LOGFILE MEMBER '+DATA/matrix_dr0/onlinelog/group_4.265.677440617'; Database altered. SQL> ALTER DATABASE DROP STANDBY LOGFILE MEMBER '+DATA/matrix_dr0/onlinelog/group_5.268.677440629'; SQL> ALTER DATABASE DROP LOGFILE MEMBER '+DATA/matrix_dr0/onlinelog/group_6.300.677440645'; Database altered. SQL> ALTER DATABASE DROP STANDBY LOGFILE MEMBER '+DATA/matrix_dr0/onlinelog/group_7.298.677440663'; Database altered. ALTER DATABASE DROP STANDBY LOGFILE MEMBER '+DATA/matrix_dr0/onlinelog/group_5.268.677440629' * ERROR at line 1: ORA-00261: log 5 of thread 1 is being archived or modified
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
77
ORA-00312: online log 5 thread 1: +DATA/matrix_dr0/onlinelog/group_5.268.677440629' ORA-00312: online log 5 thread 1: +FLASH/matrix_dr0/onlinelog/group_5.329.677440637'
I]ZaVhidcZlZ¼aaign ALTER DATABASE DROP STANDBY LOGFILE MEMBER '+DATA/matrix_dr0/onlinelog/group_5.268.677440629'; Database altered. SQL> SELECT GROUP#, MEMBER FROM V$LOGFILE WHERE TYPE='STANDBY'; GROUP# MEMBER ---------- -----------------------------------------------------------4 +FLASH/matrix_dr0/onlinelog/group_4.333.677440625 5 +FLASH/matrix_dr0/onlinelog/group_5.329.677440637 6 +FLASH/matrix_dr0/onlinelog/group_6.292.677440653 7 +FLASH/matrix_dr0/onlinelog/group_7.291.677440669
Cdli]Vindj]VkZYgdeeZYi]Zbjai^eaZmZYbZbWZgh!ndjXVcgZhiVgii]ZBGEWn\d^c\WVX` id
Step 13: Finished! Ndjcdl]VkZV[jaan[jcXi^dc^c\9ViV<jVgYhiVcYWnYViVWVhZ#NdjXVc\dWVX`VcYXgZViZ Vcdi]ZghiVcYWnYViVWVhZViVY^[[ZgZciadXVi^dc!bdY^[ni]^hdcZ!dgeZg[dgbgdaZigVch^i^dch# NdjcZZYidiV`Zi]Z[daadl^c\^cidVXXdjcil]ZcXgZVi^c\ndjghiVcYWnYViVWVhZl^i]i]Z [ndj]VkZVcDgVXaZG68eg^bVgnYViVWVhZ!i]Zl^oVgYl^aacdiXgZViZVcDgVXaZG68 hiVcYWnYViVWVhZ!ZkZc^[i]ZhnhiZb^hXdc[^\jgZY[dgG68#Ndjl^aa]VkZidXgZViZV h^c\aZ^chiVcXZhiVcYWnVcYi]ZcjhZi]ZXdckZgh^dcji^a^inidXdckZgi^iidG68# N >[ndjcZZYid\dXgdhh"eaVi[dgbVhYZ[^cZYWni]Z9ViV<jVgY8gdhhEaVi[dgbCdiZ&'! ndjXVccdijhZ[ndjlVciidXgZViZndjghiVcYWn^cdcZd[i]ZhZh^ijVi^dch!ndjl^aacZZYidjhZi]Z egdXZYjgZdjia^cZY^ci]ZcZmihZXi^dcVcYi]Zc^bedgii]ZXdc[^\jgVi^dc^cid
A Last Note >[i]^hlVhndjgX]dhZcbZi]dY[dgXgZVi^c\ndjghiVcYWnYViVWVhZh!ndjXVch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g Xdc[^\jgVi^dc#I]ZXjggZciYViVWVhZjc^fjZcVbZ^hValVnhVYYZYWZ]^cYi]ZhXZcZh#7ji [dgXaVg^in¼hhV`ZVcYid]VkZi]ZZmVXihVbZeVgVbZiZgYZ[^cZYdcVaai]ZYViVWVhZh!VYY Vaai]ZcVbZhZmea^X^ian#I]ZgZ^hcdgZfj^gZbZciVhidi]ZdgYZgd[i]ZcVbZh^ci]^h eVgVbZiZg!Wji^i^hVWhdajiZanbVcYVidgn[dgG68YViVWVhZh^cV9ViV<jVgY Xdc[^\jgVi^dc#I]^heVgVbZiZgh]djaYWZjhZYViVaai^bZh# log_archive_config='dg_config=(Matrix,Matrix_DR0)'
CONTROL_FILES D[XdjghZ!ndjVaa`cdll]Vii]^heVgVbZiZg^h[dg!Wjil^i]VhiVcYWn YViVWVhZ^ied^cihidi]ZHiVcYWn8dcigda;^aZ#I]^h^hVheZX^VaXdcigda[^aZi]Vi^hXgZViZY [dgndjdgi]VindjXgZViZndjghZa[YZeZcY^c\dci]ZbZi]dYndjjhZidXgZViZndjg hiVcYWnYViVWVhZ#control_files='/Oracle/oradata/Matrix/control01.ctl' N
LOG_ARCHIVE_MAX_PROCESSES LZbZci^dci]^heVgVbZiZg]ZgZWZXVjhZi]ZYZ[Vjai hZii^c\^hhi^aa'!l]^X]^hcdiZcdj\]#6gX]^kZegdXZhhZhdci]Zeg^bVgnYViVWVhZVgZ gZhedch^WaZ[dgVgX]^k^c\i]ZDGA[^aZhVhi]ZnWZXdbZ[jaaVcY[dggZhdak^c\\Veh^ci]Z gZYdhigZVbidVhiVcYWnYViVWVhZ#6cYdcVhiVcYWnYViVWVhZ!i]ZnVgZgZhedch^WaZ[dg VgX]^k^c\i]ZHGA[^aZhVcY[dglVgY^c\i]ZVgX]^kZad\hidVXVhXVYZYhiVcYWnYViVWVhZ#
Dci]Zeg^bVgn!dcZVgX]^kZegdXZhh^ha^b^iZYidhZgk^X^c\dcani]ZDGA[^aZhVcY^hcdi VaadlZYidi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kZY[dgi]ZYZ[VjaiadXVaVgX]^k^c\YZhi^cVi^dc!l]^X]lZl^aaY^hXjhh^cV bdbZci#LZ¼aajhZeVgVbZiZgcjbWZg2idhiVgiVcYVYYVhiVcYWnYViVWVhZi]Vi^h^cBVcX]ZhiZg VcYl^aaWZdjgBVm^bjb6kV^aVW^a^inhiVcYWnYViVWVhZZY^iZY[dgVeeZVgVcXZ/ log_archive_dest_2='service=Matrix_DR0 SYNC REOPEN=15 NET_TIMEOUT=15 valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=Matrix_DR0'
CdlaZi¼hVYY^cdjgCZlVg`hiVcYWnVheVgVbZiZgcjbWZg3!l]^X]]VhVcZildg`aViZcXn \gZViZgi]VclZldjaYa^`Z[dgHNC8hd^il^aadeZgViZ^cVhncX]gdcdjhbdYZ/ log_archive_dest_3='service=Matrix_DR1 ASYNC REOPEN=15 valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=Matrix_DR1'
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
83
6cYd[XdjghZh^cXZlZjhZYi]ZegdeZgDB_UNIQUE_NAMEViig^WjiZ!lZcZZYidYZ[^cZdjgLOG_ ARCHIVE_CONFIGeVgVbZiZg!idd/ log_archive_config='dg_config=(Matrix,Matrix_DR0,Matrix_DR1)'
I]Z[daadl^c\Viig^WjiZhVgZdei^dcVa/ N
AFFIRM 9Z[Vjai[dgHNC8YZhi^cVi^dch#GZfj^gZhi]Vii]ZACHegdXZhhlV^ih[dgi]ZG;Hid
eZg[dgbVY^gZXi>$Ddci]ZHGA[^aZWZ[dgZgZijgc^c\VhjXXZhhbZhhV\Z#GZfj^gZY[dgHNC8 ^cBVm^bjb6kV^aVW^a^indgBVm^bjbEgdiZXi^dc#NdjYdcdicZZYidhZii]^hVh^il^aa YZ[VjaiWVhZYdci]ZYZhi^cVi^dc#6cYZkZci]dj\]ndjXVchZi^i[dgVc6HNC8YZhi^cVi^dc ^c&%g!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GWR SYNC REOPEN=15 NET_TIMEOUT=15 COMPRESSION=ENABLE valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=Matrix_DR0' log_archive_dest_3='service=Matrix_DR1 LGWR ASYNC REOPEN=15 COMPRESSION=ENABLE valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=Matrix_DR1'
BVig^mT9G%l^aaWZXdbegZhhZYdcanl]ZcVc6G8=egdXZhh^hhZcY^c\V\Vecd XdbegZhh^dc[dgHNC8!gZbZbWZg4!VcYBVig^mT9G&l^aa]VkZi]ZgZYdXdbegZhhZYViVaa i^bZh#I]^hYdZhcdibZVci]Vii]ZgZYdgZbV^chXdbegZhhZYdcY^h`!Vhi]^hXdbegZhh^dc ^hdcanYjg^c\igVchedgi#I]ZYViV^hjcXdbegZhhZYVii]ZhiVcYWnh^YZWZ[dgZ^i^hlg^iiZc idi]ZHGA[^aZ# N
MAX_CONNECTIONS I]^hViig^WjiZlVh^cigdYjXZY^c&%gGZaZVhZ'idVaadlndjid
heZX^[ni]ZcjbWZgd[VgX]^kZegdXZhhZhi]Vih]djaYWZjhZY[dgi]ZhiVcYWnYZhi^cVi^dc
&(
CdiZ,'.**&¹GZYdIgVchedgi8dbegZhh^dc^cV9ViV<jVgY:ck^gdcbZciº
84
DgVXaZ9ViV<jVgY&&g=VcYWdd` l]ZchZcY^c\V\Ve0^i^hcdadc\ZgjhZY^c&&g#7ji^[ndjVgZjh^c\&%g!ndjXVcheZX^[n &id*l^i]&WZ^c\i]ZYZ[Vjai#>[ndjheZX^[nbdgZi]Vc&!l]ZcZkZgi]^hhiVcYWn YZhi^cVi^dccZZYhidgZXZ^kZV\Ve!i]VibVcnVgX]^kZegdXZhhZhl^aaWZVhh^\cZYidhZcY i]ZVgX]^kZad\#I]Z[^aZl^aaWZhea^ijeVbdc\i]Zb!hZci^ceVgVaaZahigZVbhVXgdhhi]Z cZildg`!VcYgZVhhZbWaZYdci]ZhiVcYWnh^YZ# log_archive_dest_2='service=Matrix_DR0 LGWR SYNC REOPEN=15 NET_TIMEOUT=15 MAX_CONNECTIONS=5 valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=Matrix_DR0'
Cdll]ZcBVig^mT9G%hj[[ZghVY^hXdccZXi[gdbi]Zeg^bVgn!i]Z\VegZhdaji^dcegdXZhh dci]Zeg^bVgnl^aajhZbjai^eaZhigZVbhd[gZYd[dgZVX]b^hh^c\VgX]^kZad\[^aZ# CAUTION Do not use the MAX_CONNECTIONS attribute if you are running Oracle Database 11\ as it will impede the redo transport performance. N
DELAY GVi]Zgi]VcYZaVn^c\i]Zh]^ebZcid[i]ZgZYd!l]^X]^hl]ViVadid[eZdeaZ i]^c`^iYdZh!i]^hViig^WjiZbZgZan^chigjXihi]ZVeeanegdXZhhZhd[i]ZiVg\ZihiVcYWn YViVWVhZcdiidVeeani]ZgZYdl^i]djiVaV\d[i]ZcjbWZgd[hZXdcYhYZ[^cZYWni]^h Viig^WjiZ#L^i];aVh]WVX`9ViVWVhZ!i]^hViig^WjiZ^hVabdhidWhdaZiZ!ZheZX^Vaanh^cXZlZ gZXdbbZcYi]VindjValVnhZcVWaZ;aVh]WVX`9ViVWVhZdcndjghiVcYWnYViVWVhZhVcY ndjgeg^bVgnYViVWVhZ#>[ndjiZcYidYdVadid[i]^c\hi]Vi;aVh]WVX`9ViVWVhZXVccdi ]VcYaZ!i]Zcndjb^\]ilVciidheZX^[nVYZaVn#;aVh]WVX`9ViVWVhZVcY9ViV<jVgYl^aa WZY^hXjhhZY^c8]VeiZg-#
N
ALTERNATE 6aiZgcViZYZhi^cVi^dchlZgZdg^\^cVaanjhZYid`ZZeVYViVWVhZjeVcY gjcc^c\l]Zci]ZadXVaY^h`l]ZgZndjVgZVgX]^k^c\i]ZDGA[^aZh[^aahje#Jh^c\Vc VaiZgcViZYZhi^cVi^dc!ndjXdjaYgZY^gZXii]ZVgX]^kZegdXZhhZhidjhZVcVjm^a^VgnY^h` [dgi]ZVgX]^kZad\h#I]^hegdWaZb]VhWVh^XVaanY^hVeeZVgZYl^i]i]Z[aVh]gZXdkZgnVgZV! l]^X]hZa["bVcV\Zh^ihheVXZ#
NdjXdjaYVahdjhZi]^hViig^WjiZ[dggZbdiZhiVcYWnYZhi^cVi^dch^[ndj]VYbjai^eaZ cZildg`eVi]hidVhiVcYWnYViVWVhZ#DWk^djhan!ndjldjaYjhZbjai^eaZeVi]hidi]Z hiVcYWnYViVWVhZl^i]VcDgVXaZG68!Wjii]Vi^hcdil]ViALTERNATElVhYZh^\cZYidYd# >i^hZVh^Zg^cWdi]i]Zh^c\aZ^chiVcXZl^i]bjai^eaZcZildg`^ciZg[VXZhXVhZdgi]ZDgVXaZ G68XVhZidjhZXdccZXii^bZ[V^adkZg^cndjgICHYZhXg^eidg[dgi]ZhiVcYWnYViVWVhZ# NdjVgZY^hXdjgV\ZY[gdbjh^c\i]Z[daadl^c\Viig^WjiZh/ N
LOCATION Eg^dgidDgVXaZ9ViVWVhZ&%gGZaZVhZ'!i]^hViig^WjiZlVhgZfj^gZYid
heZX^[nVadXVi^dcl]ZgZi]ZVgX]^kZegdXZhhZhXdjaYhidgZi]ZVgX]^kZad\[^aZh#6cYi]^h lVhigjZdcWdi]i]Zeg^bVgnYViVWVhZ[dgi]ZDGA[^aZhVcYi]ZhiVcYWnYViVWVhZ[dg i]ZHGA[^aZh#L^i]i]Z[aVh]gZXdkZgnVgZVVcYadXVaVgX]^k^c\YZ[Vjaih!ndjcdadc\Zg cZZYidYZ[^cZVYZhi^cVi^dcl^i]i]^hViig^WjiZ#9Zhi^cVi^dccjbWZg&%l^aaVjidbVi^XVaan WZhZiidjhZi]Z[aVh]gZXdkZgnVgZV# SQL> SELECT DESTINATION FROM V$ARCHIVE_DEST WHERE DEST_ID=10; USE_DB_RECOVERY_FILE_DEST
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY SQL> ARCHIVE LOG LIST Database log mode Automatic archival Archive destination Oldest online log sequence Next log sequence to archive Current log sequence
85
Archive Mode Enabled USE_DB_RECOVERY_FILE_DEST 19 21 2
>[ndjVgZjh^c\V[aVh]gZXdkZgnVgZVVcYndjlVciidYZ[^cZVadXVaYZhi^cVi^dc!ndj h]djaYVahdjhZi]ZhVbZhnciVm/ log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=Matrix'
>[ndjVgZhi^aacdijh^c\i]Z[aVh]gZXdkZgnVgZV!ndjldjaYjhZi]ZdaYY^h`eVi]higjXijgZ/ log_archive_dest_1='location=/u03/oradata/Matrix/arch/ valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=Matrix'
CdiZi]Vi^cWdi]XVhZh!i]ZDB_UNIQUE_NAMEed^cihidi]ZYViVWVhZdcl]^X]ndj YZ[^cZi]^hYZhi^cVi^dc!cdiVgZbdiZhiVcYWnYViVWVhZ#>ci]^hXVhZ!lZVgZdci]Zeg^bVgn BVig^m!hd^[ndjVgZjh^c\i]ZDB_UNIQUE_NAMEViig^WjiZ!ndjcZZYidheZX^[nBVig^mVh i]ZiVg\ZiDB_UNIQUE_NAME# NOTE If you are using a flash recovery area, you do not need to set up a local archiving destination using the LOCATION attribute. N
MANDATORY I]^h^hdcZd[i]ZbdhiYVc\ZgdjhViig^WjiZhidVhiVcYWnYZhi^cVi^dc#
7Vh^XVaan!^irequiresi]Vii]ZgZYd[gdbVcDGA[^aZmustWZhZciidi]^hYZhi^cVi^dc#>[ i]ZgZYdXVccdiWZhZci!i]ZDGA[^aZi]ViXdciV^chi]ZgZYdXVccdiWZgZjhZYjci^a^i ]VhWZZchZciidi]^hhiVcYWnYViVWVhZ#>[i]ZhiVcYWnYViVWVhZ^hcdigZVX]VWaZVcYi]Z eg^bVgnYViVWVhZXnXaZhi]gdj\]Vaai]ZVkV^aVWaZDGA[^aZh!egdYjXi^dcl^aahiVaa#D[ XdjghZ!VadXVaYZhi^cVi^dc^hbVcYVidgnhdi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c\YdlchigZVbXVeijgZ# CAUTION Do not set the NOREGISTER attribute. N
LOG_ARCHIVE_DEST_STATE_n I]^h^hi]ZXdbeVc^dceVgVbZiZgidLOG_ARCHIVE_ DEST_nVcYlVhcZXZhhVgn[dgildgZVhdch^ci]ZeVhi/idZcVWaZegZYZ[^c^i^dcd[eg^bVgn gdaZLOG_ARCHIVE_DEST_neVgVbZiZghdcVhiVcYWnVcYcdi]VkZi]ZVgX]^kZegdXZhh
ignidjhZi]Zbjci^andjZcVWaZYi]ZYZhi^cVi^dcl^i]i]^heVgVbZiZg0VcYidhZijeVc ALTERNATEYZhi^cVi^dcVhYZhXg^WZYegZk^djhan#I]Z[^ghigZVhdc^hcdadc\ZgkVa^Yndj cdl]VkZVALID_FOR[dgi]VigZVhdcVcYjcaZhhndjVgZjh^c\ALTERNATE!i]Zci]Z hZXdcYgZVhdc^hVahdjccZXZhhVgn#H^cXZi]ZhZYZ[VjaiidENABLEVcnlVn!ndjYdcdi
cZZYidhZii]Zb[dgndjgYZhi^cVi^dch# log_archive_dest_state_1=enable
Standby Role Parameters N
DB_FILE_NAME_CONVERT DcVhiVcYWnYViVWVhZ!i]^heVgVbZiZgVaadlhndjid
ad\^XVaanbdkZi]ZYViV[^aZh[gdbi]Z^geg^bVgnYViVWVhZadXVi^dcidndjghiVcYWn YViVWVhZadXVi^dc#I]^h^hcZXZhhVgn^[ndjgdc"Y^h`higjXijgZhVcYaVndjiVgZY^[[ZgZci WZilZZci]ZildhnhiZbh#Jci^ai]ZhiVcYWnYViVWVhZWZXdbZhVeg^bVgnYViVWVhZ!i]^h igVchaVi^dcdXXjghdcanVigjci^bZ#DcXZndjZ^i]Zghl^iX]dkZgdg[V^adkZgidi]ZhiVcYWn! i]ZhZkVajZhVgZ]VgYZcZY^cidi]ZXdcigda[^aZVcYi]ZYViV[^aZ]ZVYZgh#>i[jcXi^dchWn Yd^c\h^beaZhig^c\gZeaVXZbZci# db_file_name_convert='/Matrix/','/Matrix_DR0/'
I]^hldjaYigVchaViZi]ZYViV[^aZcVbZh[gdbi]^h '/u03/oradata/Matrix/sysaux.dbf'
idi]^h/ '/u03/oradata/Matrix_DR0/sysaux.dbf'
H^b^aVgan! db_file_name_convert='+DATA','+RECOVERY'
ldjaYed^cii]ZYViVWVhZidi]ZYViV[^aZh^ci]Z6HBY^h`\gdje+RECOVERY^chiZVYd[ +DATA#I]ZgZhid[i]ZeVi]XdjaYgZbV^ci]ZhVbZ#>cdjgZmVbeaZ!hiVcYWnXgZVi^dc jh^c\6HB!ndjl^aacdicZZYidYZ[^cZi]^heVgVbZiZg#
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY N
87
LOG_FILE_NAME_CONVERT I]Zad\[^aZXdckZgieZg[dgbhi]ZhVbZ[jcXi^dcVhDB_ FILE_NAME_CONVERTWji[dgi]ZDGA[^aZhVcYVcnHGA[^aZh# log_file_name_convert='/Matrix/','/Matrix_DR0/'
N
FAL_SERVER FAL^hi]ZFetch Archive LogXVeVW^a^ini]Vi^hbjX]bdgZidYVni]Vc^i
lVh^cDgVXaZ.iGZaZVhZ&9ViV<jVgY#>i^hdcanjhZYdcVe]nh^XVahiVcYWnYViVWVhZ VcY^hi]ZegdXZhhl]ZgZWnVe]nh^XVahiVcYWnXVc\dVcY[ZiX]Vb^hh^c\VgX]^kZad\[^aZ [gdbdcZd[i]ZYViVWVhZheg^bVgndghiVcYWn^ci]Z9ViV<jVgYXdc[^\jgVi^dcl]Zc^i [^cYhVegdWaZb!hdbZi^bZhgZ[ZggZYidVhreactive gap resolution#7jii]Z;6AiZX]cdad\n ]VhWZZcZc]VcXZYdkZgi]ZaVhii]gZZgZaZVhZhidi]Zed^ciVil]^X]ndjVabdhicd adc\ZgcZZYidYZ[^cZi]Z;6AeVgVbZiZgh#L^i]i]ZVgg^kVad[proactive gap resolution!^c DgVXaZ.iGZaZVhZ'!VabdhiZkZgnineZd[\VegZfjZhi[gdbVe]nh^XVadgad\^XVahiVcYWn YViVWVhZXVcWZ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^iXVc#7nYZ[Vjai!i]^heVgVbZiZg^hhZiid'MANUAL'!l]^X]bZVchi]Vi i]ZVeeanegdXZhhdcVe]nh^XVahiVcYWnYViVWVhZl^aacdiXgZViZi]ZcZlYViV[^aZVcY ndjl^aa]VkZidjcl^cY^ihViiZbeiVcYXgZViZi]ZYViV[^aZbVcjVaan# standby_file_management='AUTO'
I]Zdcani^bZndjbVncZZYidX]Vc\Zi]^heVgVbZiZgWVX`id'MANUAL'^hl]Zcndj cZZYidbVc^ejaViZi]ZDGA[^aZYZ[^c^i^dchdci]Ze]nh^XVahiVcYWn#HGA[^aZhXVcWZ VYYZYl^i]djiX]Vc\^c\i]^heVgVbZiZg#>[ndjYdcZZYidVYYdgYgdedca^cZad\[^aZhdc i]Ze]nh^XVahiVcYWnYViVWVhZYjZidVX]Vc\Zdci]Zeg^bVgnYViVWVhZ![dgZmVbeaZ! ndjXVcYncVb^XVaanhZii]^heVgVbZiZgid'MANUAL'!ZmZXjiZi]Z99A!VcYi]ZchZi^i WVX`id'AUTO'l^i]djiWdjcX^c\i]ZhiVcYWnYViVWVhZ#
The End of the Parameters and Attributes 6[iZggZVY^c\VaaVWdjii]ZeVgVbZiZghVcYViig^WjiZhi]VindjXVcjhZdgcdijhZ^chdbZXVhZh! ndjh]djaY]VkZV\ddYjcYZghiVcY^c\d[i]Z[jcXi^dcd[ZVX]d[i]ZbVhlZaaVhi]Z gVb^[^XVi^dchd[Xdc[^\jg^c\i]Zb^cXdggZXian# Dci]VicdiZ!lZ]deZi]VindjYdcdiVagZVYn]VkZV]ZVYVX]Z!WZXVjhZlZ¼gZ\d^c\id h]dX`ndjcdl#>[ndjX]ddhZidjhZi]Z9ViV<jVgY7gd`ZgZkZc^[ndjYdcdijhZ
Using RMAN in Oracle Database 11g DgVXaZGZXdkZgnBVcV\ZgGB6C]Vh^cXajYZYi]ZVW^a^inidXgZViZVhiVcYWnYViVWVhZ[gdbV WVX`jed[i]Zeg^bVgnYViVWVhZ[dgbVcngZaZVhZh#L]^aZi]ZegdXZhhlVhcdibjX]Y^[[ZgZci[gdb i]ZYdXjbZciZYegdXZYjgZ^ci]Z9ViV<jVgY8dcXZeihVcY6Yb^c^higVi^dcbVcjVa!^iVahd gZfj^gZYZmigVhidgV\Z[dgi]ZWVX`jed[i]Zeg^bVgnYViVWVhZ#6cYjcaZhhndjlZgZl^aa^c\id\d i]ZZmigVb^aZVcYjhZVbdgZjcXdckZci^dcVaWjiYdXjbZciZYbZi]dY!ndjVahd]VYidbV^ciV^c VXdccZXi^dcidi]Zeg^bVgnYViVWVhZYjg^c\i]ZZci^gZXgZVi^dcegdXZhh#GB6C^cDgVXaZ 9ViVWVhZ&&g^beaZbZciZYVcZlegdXZhhi]VigZbdkZhWdi]d[i]ZhZXdbea^XVi^dchl]^aZVYY^c\ i]ZVW^a^inideZg[dgbigVcheVgZcianbdhid[i]ZhZijeVcY[^aZXden^c\i]Vindj]VYidYdWn]VcY _jhiid\ZijeVcYgjcc^c\#I]^hcZlXgZVi^dc^h^ckd`ZYWnVcVYY^i^dcidi]ZDUPLICATE FOR STANDBYXdbbVcY!FROM ACTIVE DATABASE# ?jhi]dlh^beaZ^hi]^hcZlegdXZYjgZ[dgXgZVi^c\Ve]nh^XVahiVcYWnYViVWVhZ4>iVXijVaan iV`ZhVWdji,*eZgXZci[ZlZghiZeh#AZi¼h\ZihiVgiZY#
Step 1: Prepare the Standby System ;^ghilZVgZ\d^c\idbV`ZhdbZbdgZVhhjbei^dch#Ndj ]VkZeZg[dgbZYi]ZiVh`hdjia^cZYZVga^Zg^ci]Z¹7Z[dgZNdjHiVgiºhZXi^dc#Ndj]VkZVahd Xdc[^\jgZYi]ZcZildg`VheZgndjgijc^c\l^i]i]ZICHcVbZh[dgZVX]YViVWVhZ^ci]ZXdggZXi [^aZhVhlZaaVhi]Za^hiZcZgXdccZXi^dch#NdjgcZmihiZe^hidhZijei]ZhiVcYWnhnhiZb#NdjcZZY idYd[djgi]^c\h/ 1. Create a static listener entry for the standby#:kZci]dj\]lZ]VkZY^hXjhhZYi]Z7gd`Zg a^hiZcZgZcign!^ci]^hXVhZ!ndj_jhicZZYVhiVcYVgYhiVi^XZcign^ci]ZhiVcYWna^hiZcZg/ SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = Matrix_DR0) (ORACLE_HOME = /scratch/OracleHomes/OraHome111)
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
89
(SID_NAME = Matrix_DR0) ))
BV`ZhjgZndjgZadVYi]Za^hiZcZgV[iZgndjejii]^h^ci]Za^hiZcZg[^aZ/ lsnrctl reload
2. Create an init.ora file with only the DB_NAME in it.6aandjcZZY[dgi]ZeVgVbZiZg[^aZ Vii]^hed^ci^hVdcZ"a^cZ^c^i^Va^oVi^dc[^aZl^i]VcnkVajZ[dgDB_NAME#I]^h[^aZl^aaWZ gZeaVXZYWnGB6CYjg^c\i]ZhiVcYWnXgZVi^dcegdXZhh# echo 'DB_NAME=WHATEVER' > $ORACLE_HOME/dbs/initMatrix_DR0.ora DB_NAME=WHATEVER
3. Create a password file with the primary database SYS password.IdXgZViZVhiVcYWn YViVWVhZ!GB6CgZfj^gZhi]Vii]ZHNHjhZgeZg[dgbi]ZkVg^djhhZijeVcYYViVWVhZ XgZVi^dc#DgVXaZ9ViVWVhZ&&g^cigdYjXZYVcZlaZkZad[hZXjg^in^ci]ZeVhhldgY[^aZ i]VibV`Zh^icZXZhhVgnid]VkZVXdend[i]Zeg^bVgnYViVWVhZ¼heVhhldgY^cdgYZgid deZgViZVe]nh^XVahiVcYWnYViVWVhZ#BZgZanXgZVi^c\VcZleVhhldgY[^aZl^i]i]ZhVbZ eVhhldgYl^aacdadc\Zgldg`!Vh^ciZgcVaan^il^aaWZY^[[ZgZciWZilZZci]ZildhnhiZbh VcY9ViV<jVgYl^aacdiWZVWaZidXdccZXiidi]ZhiVcYWn#IdVaadlGB6CidXgZViZ i]ZhiVcYWnYViVWVhZ!ndjXVcXgZViZVeVhhldgY[^aZl^i]i]ZhVbZHNHeVhhldgYjhZY Wni]Zeg^bVgnYViVWVhZ!WZXVjhZGB6Cl^aaXdeni]ZeVhhldgY[^aZ[gdbi]Zeg^bVgn hnhiZbVheVgid[i]ZegdXZYjgZ# orapwd file=$ORACLE_HOME/dbs/orapwMatrix password=oracle
4. Start up the standby instance.H^cXZcdXdcigda[^aZZm^hihnZi[dgi]ZhiVcYWnYViVWVhZ! ndjXVccdibdjcii]ZhiVcYWn^chiVcXZ!WjindjbjhihiVgi^ijeNOMOUNThdGB6CXVc ViiVX]idi]Z^chiVcXZ/ setenv ORACLE_SID Matrix_DR0 sqlplus '/ as sysdba' SQL> STARTUP NOMOUNT;
Step 2: Prepare the Primary System Jca^`ZdaYZgbZi]dYhd[hiVcYWnXgZVi^dc!l]ZgZndj]VY idiV`ZWVX`jehd[i]Zeg^bVgnYViVWVhZVcYbV`Zi]ZbVkV^aVWaZidi]ZGB6CYjea^XViZ egdXZYjgZWZ[dgZndjXdjaYXgZViZi]ZhiVcYWnYViVWVhZ!l^i]i]ZcZlGB6C[jcXi^dcVa^in^c DgVXaZ9ViVWVhZ&&gndjcZZYidYdkZgna^iiaZVii]Zeg^bVgnYViVWVhZidXgZViZndjghiVcYWn YViVWVhZ#7ZXVjhZndjh]djaYWZjh^c\HGA[^aZh!^[ndjXgZViZi]Zbdci]Zeg^bVgnYViVWVhZ WZ[dgZndjXgZViZi]ZhiVcYWn!GB6Cl^aaXgZViZi]Zb[dgndjdci]ZhiVcYWnYViVWVhZegdk^YZY
The Password File L]ZcZkZgVX]Vc\Z^hbVYZidi]Zeg^bVgnYViVWVhZHNHeVhhldgY!ndjbjhiXdeni]Z eg^bVgnYViVWVhZeVhhldgYidVaae]nh^XVahiVcYWnYViVWVhZh#NdjXVccdadc\ZgXgZViZV eVhhldgYbVcjVaanVii]Ze]nh^XVahiVcYWn#Ad\^XVahiVcYWnYViVWVhZhYdcdi]VkZi]^h gZhig^Xi^dcVhi]Znl^aaZmZXjiZi]ZeVhhldgY99A#
90
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Multiplexing SRL Files 8jggZcian!^hhjZhl^i]bjai^eaZmZYHGA[^aZhXVcXVjhZegdWaZbh^chdbZXVhZh!ediZci^Vaan Vi[V^adkZgi^bZ#I]ZegZhZcXZd[VhZXdcYXdend[i]ZHGA[^aZh^hcdiValVnhVWZcZ[^i!Vh i]ZZmigV>$Db^\]ihadlYdlcgZYdigVchedgi!VcYVcn[V^ajgZd[VcHGAldjaYWZigZViZY a^`ZV\VeWn9ViV<jVgY#LZYdcdigZXdbbZcYbjai^eaZm^c\i]ZHGAh#
^iXVc[^cYi]ZVeegdeg^ViZY^gZXidgn#LZVgZjh^c\6HB!VcYVhhjX]lZ]VkZYZ[^cZYi]Z Veegdeg^ViZ6HB[^aZXgZVi^dceVgVbZiZghhdlZXVcjhZi]Zh]dgikZgh^dcd[i]ZHGAXgZVi^dcHFA# 6hhjb^c\lZ]VkZi]gZZDGA\gdjehd[*%B7ZVX]!lZl^aaXgZViZ[djgHGA\gdjehdci]Z eg^bVgnYViVWVhZ/ db_create_file_dest='+DATA' db_create_online_log_dest_1='+FLASH' db_create_online_log_dest_2='+DATA' SQL> SQL> SQL> SQL>
ALTER ALTER ALTER ALTER
DATABASE DATABASE DATABASE DATABASE
ADD ADD ADD ADD
STANDBY STANDBY STANDBY STANDBY
LOGFILE LOGFILE LOGFILE LOGFILE
'+FLASH' '+FLASH' '+FLASH' '+FLASH'
SIZE SIZE SIZE SIZE
50M 50M 50M 50M
Ndjl^aacdi^XZi]VilZVYYZYi]Z+FLASHidi]ZADD STANDBY LOGFILEXdbbVcY#I]^h lVhYdcZidegZkZcii]ZYViVWVhZ[gdbbjai^eaZm^c\i]ZHGA[^aZh#7ncdiheZX^[n^c\VcVXijVa [^aZcVbZ[dgi]ZHGA!i]ZYViVWVhZl^aaVjidbVi^XVaanejii]Z[^aZ^cidi]Z[aVh]gZXdkZgnVgZVjh^c\ VcDgVXaZBVcV\ZY;^aZhDB;cVbZ#7ji^[ndjVgZjh^c\6HBVhlZVgZ!i]ZYViVWVhZl^aa VjidbVi^XVaanbjai^eaZmi]ZHGA[^aZh_jhiVh^iYdZhl^i]i]ZDGA[^aZh!dcXZ^c+DATAVcYdcXZ ^c+FLASH# Jca^`ZV[ViVaZggdgdcVcDGA[^aZdci]Zeg^bVgni]Vil^aaXgVh]i]Z^chiVcXZ!^[VcZggdglZgZ iddXXjgdcVcHGA[^aZ!i]ZgZYdigVchedgildjaYbZgZanWZiZgb^cViZYVcYl]Zci]Zeg^bVgn gZXdccZXiZYi]ZcZlG;HldjaYX]ddhZVcdi]ZgHGAVcYi]ZhZfjZcXZi]VilVhZcgdjiZVii]Z HGA[V^ajgZed^cil^aaWZhZciVhV\Ve#6cYh^cXZ]Vk^c\bdgZi]VcdcZbZbWZg[dgVcHGA ^cXgZVhZhi]Z>$D!l]^X]XdjaY]VkZVc^beVXidcgZYdigVchedgi!ndjbVncdilVcii]ZZmigV dkZg]ZVY# 6ii]^hi^bZ!lZYdcdigZXdbbZcYjh^c\bjai^eaZmZYHGA[^aZh#
Step 3: Create the Standby I]^h^h^i/i^bZidXgZViZi]ZhiVcYWnYViVWVhZ#I]Z[daadl^c\GB6C hXg^eil^aaXgZViZndjghiVcYWnYViVWVhZ^cidi]ZhiVcYWn^chiVcXZndj_jhihiVgiZY#I]^hhXg^eiXVc WZgjc[gdbi]Zeg^bVgnhnhiZb¹ejh]^c\ºi]ZYViVidi]ZhiVcYWnhnhiZb!dg[gdbi]ZhiVcYWn hnhiZb¹ejaa^c\ºi]ZYViV[gdbi]Zeg^bVgnhnhiZb#6aai]Vi¼hgZfj^gZY^hi]Vii]ZICHC6B:HWZ hZijeXdggZXianVcYi]VindjhiVgijeGB6C# RMAN> CONNECT TARGET sys/oracle@Matrix; CONNECT AUXILIARY sys/oracle@Matrix_DR0; run { allocate channel prmy1 type disk; allocate channel prmy2 type disk;
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
91
allocate channel prmy3 type disk; allocate channel prmy4 type disk; allocate channel prmy5 type disk; allocate auxiliary channel stby1 type disk; duplicate target database for standby from active database spfile parameter_value_convert 'Matrix','Matrix_DR0' set 'db_unique_name'='Matrix_DR0' set control_files='+DATA/Matrix_DR0/control.ctl' set db_create_file_dest='+DATA' set db_create_online_log_dest_1='+FLASH' set db_create_online_log_dest_2='+DATA' set db_recovery_file_dest='+FLASH' set DB_RECOVERY_FILE_DEST_SIZE='10G' nofilenamecheck; }
I]^hh^beaZGB6ChXg^eil^aacdl\dd[[VcYYdVaai]Zldg`ndjjhZYid]VkZidYd bVcjVaanidXgZViZndjghiVcYWnYViVWVhZ#6cY^il^aaWZYd^c\Va^kZWVX`jed[i]ZEG>B6GN YViVWVhZVcYVa^kZgZhidgZd[i]ZhiVcYWnYViVWVhZl^i]djiVcn^ciZg^bhidgV\Z# L]Zci]^hhXg^ei^hXdbeaZiZ!ndjl^aa]VkZV[jaan[jcXi^dc^c\e]nh^XVahiVcYWnYViVWVhZi]Vi ^hgZVYnidgZXZ^kZgZYd#D[XdjghZ!^il^aacdinZiWZgZXZ^k^c\gZYdcdgVeean^c\^i# >[ndjad\^cidi]Ze]nh^XVahiVcYWnYViVWVhZ!ndjXVchZZi]ZgZhjaihd[i]ZXgZVi^dcVcY l]ZgZ^i]VhejiZkZgni]^c\/ [Matrix_DR0] sql SQL*Plus: Release 11.1.0.6.0 - Production on Tue Aug 5 00:33:05 2008 Copyright (c) 1982, 2007, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Unique Name Current Role Open Mode Protection Mode --------------------------- ---------------- ---------- -------------------Matrix_DR0 PHYSICAL STANDBY MOUNTED MAXIMUM PERFORMANCE SQL> select name from v$datafile; NAME ---------------------------------------------------------------------------+DATA/matrix_dr0/datafile/system.261.661890009 +DATA/matrix_dr0/datafile/sysaux.269.661890013 +DATA/matrix_dr0/datafile/undotbs1.266.661890103 +DATA/matrix_dr0/datafile/users.267.661890057 +DATA/matrix_dr0/datafile/example.268.661890027 SQL> select type, member from v$logfile TYPE MEMBER -----------------------------------------------------------------------ONLINE +DATA/matrix/onlinelog/group_3.260.661354309 ONLINE +FLASH/matrix/onlinelog/group_3.296.661354317 ONLINE +DATA/matrix/onlinelog/group_2.258.661354293
92
DgVXaZ9ViV<jVgY&&g=VcYWdd` ONLINE ONLINE ONLINE STANDBY STANDBY STANDBY STANDBY
+FLASH/matrix/onlinelog/group_2.297.661354303 +DATA/matrix/onlinelog/group_1.301.661354277 +FLASH/matrix/onlinelog/group_1.298.661354285 +FLASH/matrix_dr0/onlinelog/group_4.295.661357229 +FLASH/matrix_dr0/onlinelog/group_5.294.661357269 +FLASH/matrix_dr0/onlinelog/group_6.293.661357285 +FLASH/matrix_dr0/onlinelog/group_6.293.908747594
10 rows selected.
I]ZDGA[^aZhhi^aa]VkZi]ZcVbZd[i]Zeg^bVgnYViVWVhZ^ci]Z^geVi]Vii]^hi^bZ#I]^hl^aa WZXdggZXiZYl]ZcndjhiVgijei]ZVeeanegdXZhh#Ndjl^aa]VkZidbdkZi]ZHE;>A:^cid6HB bVcjVaan^[gZfj^gZY#7jih^cXZlZVgZjh^c\6HB!i]ZYViV[^aZhlZgZVaaeji^ci]ZXdggZXieaVXZ l^i]djii]ZCONVERTeVgVbZiZgh# D[XdjghZ!ndjcdi^XZi]ViVeVgi[gdbi]ZildeVgVbZiZghDB_UNIQUE_NAMEVcYLOG_FILE_ NAME_CONVERTcZZYZYidXdggZXii]ZHGA[^aZcVbZh!lZhZicddi]Zg9ViV<jVgYeVgVbZiZgh^c djghXg^ei#I]^hegdXZYjgZ^hVaandjcZZYidYd^[ndjVgZ\d^c\idjhZi]Z9ViV<jVgY7gd`Zgid bVcV\Zi]^hXdc[^\jgVi^dc#>[i]Z9ViV<jVgY7gd`Zg^hndjgX]d^XZ!i]ZcndjVgZYdcZ#NdjXVc\d Y^gZXianid8]VeiZg*#I]ZWZVjind[i]Z9ViV<jVgY7gd`Zg^hi]Vil]ZcndjXgZViZi]ZXdc[^\jgVi^dc VcYVYYi]ZYZiV^ahVWdjii]ZhiVcYWnYViVWVhZndj_jhiXgZViZYVcVbZVcYVXdccZXi^YZci^[^Zg! i]Z7gd`Zgl^aahZijeVaai]ZeVgVbZiZghVcYdeZgVi^dch[dgndj# >[ndjX]ddhZcdiidjhZi]Z9ViV<jVgY7gd`Zg!ndjXVc[^c^h]i]Z_dWg^\]i]ZgZWnVYY^c\ i]ZcZXZhhVgneVgVbZiZghidi]ZhiVcYWnVcYi]Zeg^bVgnYViVWVhZh!hiVgi^c\GZYd6eean!VcY Xdc[^\jg^c\i]ZgZYdigVchedgiVii]Zeg^bVgn# BVcjVaanVYY^ci]ZhiVcYWnVcYeg^bVgngdaZ^c^i^Va^oVi^dceVgVbZiZghidi]ZhiVcYWn/ SQL> SQL> SQL> SQL> SQL>
ALTER SYSTEM SET FAL_SERVER=Matrix; ALTER SYSTEM SET FAL_CLIENT=Matrix_DR0; ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(Matrix,Matrix_DR0)'; ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO; ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='service=Matrix ASYNC DB_UNIQUE_NAME=Matrix VALID_FOR=(primary_role,online_logfile);
I]ZchiVgii]Z6eeanegdXZhhdci]ZhiVcYWnYViVWVhZ/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
GZijgcidi]Zeg^bVgnYViVWVhZVcYXdc[^\jgZgZYdigVchedgiVcYhl^iX]ad\hVcYVYYi]ZhiVcYWn gdaZeVgVbZiZgh/ SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(Matrix,Matrix_DR0)'; SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='service=Matrix_DR0 ASYNC DB_UNIQUE_NAME=Matrix_DR0 VALID_FOR=(primary_role,online_logfile)'; SQL> ALTER SYSTEM SWITCH LOGFILE; SQL> ALTER SYSTEM SET FAL_SERVER=Matrix_DR0; SQL> ALTER SYSTEM SET FAL_CLIENT=Matrix; SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
93
LZi^iaZYi]^hhZXi^dc¹I]ZEdlZgJhZgBZi]dYºWZXVjhZndjVgZ\d^c\idXgZViZVhiVcYWn YViVWVhZbVcjVaan#I]ZegZXZY^c\GB6ChXg^eiVcYhjWhZfjZcieVgVbZiZghZii^c\hVhlZaaVhi]Z hiVgi^c\d[i]ZVeeanVcYgZYdigVchedgiXVcVaaWZYdcZ^cdcZh^c\aZGB6ChXg^ei!l]^X]^hVc ZmeVcYZYhXg^eid[i]ZegZXZY^c\dcZ/ RMAN> connect target sys/oracle@Matrix; connect auxiliary sys/oracle@Matrix_DR0; run { allocate channel prmy1 type disk; allocate channel prmy2 type disk; allocate channel prmy3 type disk; allocate channel prmy4 type disk; allocate channel prmy5 type disk; allocate auxiliary channel stby1 type disk; duplicate target database for standby from active database spfile parameter_value_convert 'Matrix','Matrix_DR0' set 'db_unique_name'='Matrix_DR0' set control_files='+DATA/Matrix_DR0/control.ctl' set db_create_file_dest='+DATA' set db_create_online_log_dest_1='+FLASH' set db_create_online_log_dest_2='+DATA' set db_recovery_file_dest='+FLASH' set DB_RECOVERY_FILE_DEST_SIZE='10G' set log_archive_max_processes='5' set fal_client='Matrix_DR0' set fal_server='Matrix' set standby_file_management='AUTO' set log_archive_config='dg_config=(Matrix,Matrix_DR0)' set log_archive_dest_2='service=Matrix LGWR ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=Matrix'; sql channel prmy1 "alter system set log_archive_config=''dg_config=(Matrix,Matrix_DR0)''"; sql channel prmy1 "alter system set log_archive_dest_2=''service=Matrix_DR0 LGWR ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=Matrix_DR0''"; sql channel prmy1 "alter system set log_archive_max_processes=5"; sql channel prmy1 "alter system set fal_client=Matrix"; sql channel prmy1 "alter system set fal_server=Matrix_DR0"; sql channel prmy1 "alter system set standby_file_management=AUTO"; sql channel prmy1 "alter system archive log current"; allocate auxiliary channel stby type disk; sql channel stby "alter database recover managed standby database using current logfile disconnect"; nofilenamecheck; }
94
DgVXaZ9ViV<jVgY&&g=VcYWdd` DcXZi]^hhXg^ei]Vhgjc!cdidcanl^aandj]VkZVXdbeaZiZe]nh^XVahiVcYWnYViVWVhZXgZViZY VcYgjcc^c\!WjiVaai]ZeVgVbZiZghl^aaWZXdc[^\jgZYdcWdi]i]Zeg^bVgnVcYi]ZhiVcYWn YViVWVhZh^cegZeVgVi^dc[dghl^iX]dkZg!GZYd6eeanl^aaWZhiVgiZYdci]ZhiVcYWn!VcYGZYd IgVchedgil^aaWZhiVgiZYdci]Zeg^bVgnYViVWVhZ#
Using the RMAN Oracle Database 10g Method >cWdi]DgVXaZ9ViVWVhZ&%gVcY&&g!i]ZGB6CDUPLICATE FOR STANDBYXdbbVcYgZhidgZh i]ZYViV[^aZh[gdbWVX`jehZihVcYgZXdkZghi]ZYViVWVhZVeean^c\^cXgZbZciVaVcYVgX]^kZYad\h WVX`jehidi]ZXjggZcihnhiZbX]Vc\ZcjbWZgH8C# 6hbZci^dcZY!i]^hegdXZYjgZXVcWZjhZ[ja[dghZii^c\jeV9ViV<jVgYhiVcYWnYViVWVhZdg gZ^chiVci^Vi^c\i]ZdaYeg^bVgnYViVWVhZVhVcZlhiVcYWnYViVWVhZV[iZgV[V^adkZgdeZgVi^dc#7ji ^i^hVahdeVgVbdjci[dggZXdkZg^c\VhiVcYWnYViVWVhZV[iZgbZY^V[V^ajgZdgVY^hVhiZg¸hij[[ ]VeeZchidhiVcYWnYViVWVhZh!idd Id\ZihiVgiZY!ndjcZZYidbZZiVaai]ZegZgZfj^h^iZhhZid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VXZi]ZWVX`je[^aZ Y^gZXian^ciddjghiV\^c\VgZV/ rman target / RMAN> BACKUP AS COMPRESSED BACKUPSET DEVICE TYPE DISK FORMAT '/scratch/oracle/Stage/Database%U' DATABASE PLUS ARCHIVELOG;
6ii]^hed^ci!ndjXVcdWiV^cVXdend[i]ZXdcigda[^aZ[dgi]ZhiVcYWnXgZVi^dc#GZbZbWZg i]VindjXVccdih^beanXdeni]ZXjggZciXdcigda[^aZ!WZXVjhZi]Vil^aacdildg`id^chiVci^ViZ V9ViV<jVgYhiVcYWnYViVWVhZ#I]^hXdend[i]ZXjggZcieg^bVgnYViVWVhZXdcigda[^aZl^aaWZ^c VhiVcYWn[dgbViVcYbjhiWZbVYZV[iZgndj]VkZXgZViZYi]ZWVX`jed[i]Zeg^bVgnYViVWVhZ# I]^hXVcWZYdcZl^i]HFAEajhdgGB6C!Wjih^cXZlZVgZVagZVYnldg`^c\^cGB6C!lZl^aa jhZi]Z[daadl^c\XdbbVcY/ RMAN> BACKUP FORMAT '/scratch/oracle/Stage/Control%U' CURRENT CONTROLFILE FOR STANDBY;
Step 3: Copy the Required Files i]Zeg^bVgnhnhiZb# [Matrix] ls –l total 349912 -rw-r----- 1 matrix -rw-r----- 1 matrix -rw-r----- 1 matrix -rw-r----- 1 matrix -rw-r----- 1 matrix -rw-r--r-- 1 matrix -rw-r----- 1 matrix
6aad[i]ZcZXZhhVgn[^aZhVgZcdl^cndjghiV\^c\Y^gZXidgndc
g900 10289152 Sep g900 97857024 Sep g900 247267328 Sep g900 1146880 Sep g900 1366528 Sep g900 2182 Sep g900 1536 Sep
7 6 6 6 6 6 6
04:25 22:56 23:01 23:02 23:02 22:47 22:47
Control27jpvcq8_1_1 Database23jpupeu_1_1 Database24jpuph9_1_1 Database25jpupqr_1_1 Database26jpuprg_1_1 initMatrix_DR0.ora orapwMatrix_dr0
8deni]ZhZ[^aZhidndjghiVcYWnhnhiZb^cidi]ZhVbZY^gZXidgnjh^c\VcZildg`XdendghdbZ `^cYd[ZmiZgcVaigVchedgibZX]Vc^hb¸bdk^c\i]Z[^aZhdciVeZ![dgZmVbeaZ!dge]nh^XVaan
96
DgVXaZ9ViV<jVgY&&g=VcYWdd` bdk^c\i]ZY^h`hidi]ZhiVcYWnhnhiZb#>[ndjVgZ\d^c\idWZjh^c\iVeZidbV`Zi]ZGB6C WVX`je!i]Zdcani]^c\hndjcZZYidXdenVgZi]Z^c^i^Va^oVi^dceVgVbZiZgVcYeVhhldgY[^aZh#
Step 4: Prepare the Standby Database >[ndjgeg^bVgnVcYhiVcYWnh^iZhVgZZmVXiani]ZhVbZ! ndjYdcdicZZYidbdY^[nbVcnd[i]ZeVgVbZiZgh^ci]Z^c^i#dgV[^aZ[gdbi]Zeg^bVgnYViVWVhZ# 6iVb^c^bjb!ndjcZZYidX]Vc\Zi]ZDB_UNIQUE_NAMEidi]ZcVbZd[i]ZhiVcYWn!^cdjgXVhZ 'Matrix_DR0'# *.DB_UNIQUE_NAME='Matrix_DR0'
>[ndjgY^h`higjXijgZ^hY^[[ZgZci!ndjVahdcZZYidVYY^ci]Z[^aZcVbZXdckZgh^dceVgVbZiZgh hdi]Vii]Z[^aZh\didi]ZXdggZXiadXVi^dcdcY^h`#6\V^c!^[ndjVgZjh^c\6HB!i]^h^hcdicZXZhhVgn [dgi]ZXgZVi^dcd[i]ZhiVcYWnWjil^aaWZgZfj^gZY[dgaViZgYViV[^aZVYY^i^dchidi]Zeg^bVgn YViVWVhZ#>[ndjVgZcdijh^c\i]ZhVbZY^h`higjXijgZ!i]ZnldjaYadd`hdbZi]^c\a^`Zi]^h# *.DB_FILE_NAME_CONVERT='/matrix/','/matrix_dr0/', '/MATRIX/','/MATRIX_DR0/' *.DB_LOG_NAME_CONVERT='/matrix/','/matrix_dr0/' , '/MATRIX/','/MATRIX_DR0/'
Step 5: Restore the Backup DcXZi]ZeVgVbZiZghVgZVaahZiVcYi]ZkVg^djhY^gZXidg^Zh]VkZ WZZcXgZViZY!hiVgii]ZhiVcYWnje^cNOMOUNTbdYZ!VcYjh^c\GB6CXdccZXiidi]Zeg^bVgn YViVWVhZVhi]ZiVg\Zi^cGB6CiZgb^cdad\nVcYi]ZhiVcYWn^chiVcXZVhi]ZVjm^a^Vgn/ setenv ORACLE_SID Matrix_DR0 sqlplus '/ as sysdba' SQL> STARTUP NOMOUNT; rman target sys/oracle@Matrix auxiliary / Recovery Manager: Release 10.2.0.3.0 - Production on Sun Jan 25 13:53:57 2009 Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: Matrix (DBID=3892409046) connected to auxiliary database: Matrix (not mounted) RMAN> DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK DORECOVER;
>[ndjZcXdjciZgVcZggdg!RMAN-06024!l]Zcgjcc^c\i]^hXdbbVcY!ndj]VkZbdhia^`Zan ZcXdjciZgZYVWj\i]VilVhcdi[^mZYjci^agZaZVhZ&%#'#%#)#NdjldjaYhZZi]Z[daadl^c\djieji/ RMAN-00571: RMAN-00569: RMAN-00571: RMAN-03002: RMAN-03015: RMAN-06026: RMAN-06024:
=========================================================== =============== ERROR MESSAGE STACK FOLLOWS =============== =========================================================== failure of Duplicate Db command at 01/25/2009 15:03:55 error occurred in stored script Memory Script some targets not found - aborting restore no backup or copy of the control file found to restore
I]ZegdWaZb^hi]Vil]ZcGB6ChZihi]ZH8CidgZhidgZid!^ihZih^iiddadlVcYi]ZWVX`jehVkZ hZil^i]ndjghiVcYWnXdcigda[^aZ^c^iXVccdiWZjhZY#6WdkZi]ZZggdg!ndjldjaYhZZi]ZhXg^ei GB6CgjchidgZhidgZi]ZhiVcYWnXdcigda[^aZ/ contents of Memory Script: { set until scn 2463499;
8]VeiZg'/ >beaZbZci^c\DgVXaZ9ViV<jVgY
97
restore clone standby controlfile; sql clone 'alter database mount standby database'; }
6LIST BACKUP;^cGB6CldjaYh]dlndji]VindjghiVcYWnXdcigda[^aZWVX`jee^ZXZ^hVi VcH8C]^\]Zgi]Vci]ZcjbWZg^i^hign^c\idjhZ/ BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------11 Full 6.86M DISK 00:00:01 25-JAN-09 BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20090125T145951 Piece Name: /scratch/oracle/Stage/Control0dk5mv77_1_1 Standby Control File Included: Ckp SCN: 2463571 Ckp time: 25-JAN-09
I]Zh^beaZ[^midi]^hegdWaZb^hidhl^iX]ad\[^aZhVii]Zeg^bVgnVcYgZhiVgii]ZYjea^XViZ# I]ZgZ^hcdcZZYidY^hXdccZXindjgGB6ChZhh^dc[gdbi]Zeg^bVgnVcYi]ZhiVcYWn^chiVcXZ l]^aZi]Zhl^iX]^heZg[dgbZY#
Step 6: Configure the Standby Database
6YYi]ZHGA[^aZhidi]ZhiVcYWnYViVWVhZ[dggZYd
igVchedgi/ SQL> SQL> SQL> SQL>
ALTER ALTER ALTER ALTER
DATABASE DATABASE DATABASE DATABASE
ADD ADD ADD ADD
STANDBY STANDBY STANDBY STANDBY
LOGFILE LOGFILE LOGFILE LOGFILE
'+FLASH' '+FLASH' '+FLASH' '+FLASH'
SIZE SIZE SIZE SIZE
50M; 50M; 50M; 50M;
I]ZIZbe[^aZ]VhWZZcVYYZY[dgndjWnGB6C#NdjXVccdl[^c^h]YZ[^c^c\i]Z9ViV<jVgY eVgVbZiZghi]Vil^aaWZcZXZhhVgn^ci]ZhiVcYWngdaZVhlZaaVhi]Zeg^bVgngdaZl]ZcVhl^iX]dkZg dg[V^adkZgdXXjgh/ SQL> SQL> SQL> SQL> SQL>
ALTER SYSTEM SET FAL_SERVER=Matrix; ALTER SYSTEM SET FAL_CLIENT=Matrix_DR0; ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(Matrix,Matrix_DR0)'; ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO; ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='service=Matrix ASYNC DB_UNIQUE_NAME=Matrix VALID_FOR=(primary_role,online_logfile);
6cYhiVgii]Z6eeanegdXZhhdci]ZhiVcYWnYViVWVhZ/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
I]^hl^aaXgZViZVcYXaZVgi]ZDGA[^aZhhdi]Vii]ZnZm^hil]Zci]ZhiVcYWnWZXdbZhVeg^bVgn#
Step 7: Finalize the Primary Database gdaZigVch^i^dc/ SQL> SQL> SQL> SQL>
ALTER ALTER ALTER ALTER
DATABASE DATABASE DATABASE DATABASE
ADD ADD ADD ADD
STANDBY STANDBY STANDBY STANDBY
6YYi]ZHGA[^aZhhdi]Vii]ZnVgZ^ceaVXZ[dgV[jijgZ
LOGFILE LOGFILE LOGFILE LOGFILE
'+FLASH' '+FLASH' '+FLASH' '+FLASH'
SIZE SIZE SIZE SIZE
50M; 50M; 50M; 50M;
98
DgVXaZ9ViV<jVgY&&g=VcYWdd` HZii]Z9ViV<jVgYeVgVbZiZghdci]Zeg^bVgnYViVWVhZi]Vil^aaWZjhZYidhZcYgZYdidi]Z hiVcYWn#6ahdhZii]dhZeVgVbZiZghi]Vil^aaWZjhZYl]Zci]Zeg^bVgnWZXdbZhVhiVcYWn YViVWVhZV[iZgVgdaZigVch^i^dc/ SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(Matrix,Matrix_DR0)'; SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='service=Matrix_DR0 ASYNC DB_UNIQUE_NAME=Matrix_DR0 VALID_FOR=(primary_role,online_logfile)'; SQL> ALTER SYSTEM SET FAL_SERVER=Matrix_DR0; SQL> ALTER SYSTEM SET FAL_CLIENT=Matrix; SQL> ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;
IdhiVgihZcY^c\gZYd!hl^iX]ad\[^aZhdci]Zeg^bVgn/ SQL> ALTER SYSTEM SWITCH LOGFILE;
Ndjcdl]VkZV[jaan[jcXi^dc^c\e]nh^XVahiVcYWnYViVWVhZ#;d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[ni]ZeVgihd[ ndjgYViVWVhZi]Vil^aacdiWZbV^ciV^cZYWnHFA6eean#I]Z[^ghil^aah]dlndjl]VihX]ZbVh^c i]ZYViVWVhZVgZ^\cdgZYWnYZ[VjaiWnHFA/ SELECT OWNER FROM DBA_LOGSTDBY_SKIP WHERE STATEMENT_OPT = 'INTERNAL SCHEMA';
6cngZYd[dgi]ZhX]ZbVha^hiZYWni]^hXdbbVcYl^aaWZh`^eeZY#6hhjX]!Vcni]^c\i]Vindj b^\]ieji^ciddcZd[i]ZhZhX]ZbVhl^aaVahdWZh`^eeZY# I]ZhZXdcYXdbbVcYl^aaiZaandjl]^X]iVWaZh^ci]Zeg^bVgnYViVWVhZi]ViVgZVahd^c hjeedgiZYhX]ZbVhl^aaWZh`^eeZYVjidbVi^XVaanWnHFA6eean/ SQL> SELECT DISTINCT OWNER,TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED ORDER BY OWNER,TABLE_NAME; OWNER TABLE_NAME ------------------------------ -----------------------------OE CATEGORIES_TAB OE CUSTOMERS OE PURCHASEORDER OE WAREHOUSES PM ONLINE_MEDIA PM PRINT_MEDIA SH DIMENSION_EXCEPTIONS 8 rows selected.
I]ZYViVWVhZjhZY[dgi]^hfjZgnlVhVcdgbVahZZYYViVWVhZl^i]i]ZYZbdhX]ZbVhadVYZY# Idadd`[jgi]Zg^cidl]nVeVgi^XjaVgiVWaZ^hcdihjeedgiZY!ndjXVcYg^aaYdlc^cidi]Zk^ZlVcY add`Vii]ZjchjeedgiZYXdajbchd[ViVWaZ/ SQL> SELECT COLUMN_NAME,DATA_TYPE FROM DBA_LOGSTDBY_UNSUPPORTED WHERE OWNER='OE' AND TABLE_NAME = 'CUSTOMERS'; COLUMN_NAME DATA_TYPE ------------------------------ -------------------------------CUST_ADDRESS OBJECT PHONE_NUMBERS VARRAY CUST_GEO_LOCATION OBJECT
H^cXZOBJECTVcYVARRAYVgZYViVineZhi]ViHFA6eeanYdZhcdihjeedgi!VaagZYd[d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ZgZcihZid[l]Vi^h hjeedgiZYVcYl]Vi^hcdi#>[ndjVgZjh^c\DgVXaZ9ViVWVhZ&%gGZaZVhZ'!VahdgZ[Zgidi]ZB66 ¹HFA6eean7ZhiEgVXi^XZhºl]^iZeVeZg#&, DcXZndj]VkZeVhhZYi]Z¹hjeedgiZYdgcdiºiZhi!ndjVahdcZZYidbV`ZhjgZi]Vii]dhZ dW_ZXihi]Vil^aaWZbV^ciV^cZYWnHFA6eeanVgZjc^fjZan^YZci^[^ZY#>[i]ZnVgZcdi!ndjg^h` [Vaa^c\YgVbVi^XVaanWZ]^cYi]Zeg^bVgnYViVWVhZ#I]Z[daadl^c\XdbbVcYl^aa\^kZndjVa^hid[ VaaiVWaZhi]Vi]VkZVjc^fjZcZhhegdWaZb/ SQL> SELECT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_NOT_UNIQUE; OWNER TABLE_NAME ------------------------------ -----------------------------SCOTT BONUS SCOTT SALGRADE SH SALES SH COSTS SH SUPPLEMENTARY_DEMOGRAPHICS
DcVh^YZcdiZ!i]ZbVcjVahVnhndjh]djaYXgdhh"X]ZX`i]^ha^hil^i]i]ZjchjeedgiZYa^hiWn VYY^c\VNOT INidi]ZVWdkZfjZgn!Wjii]^hcdadc\ZghZZbhidWZcZXZhhVgn# SQL> SELECT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_NOT_UNIQUE WHERE (OWNER, TABLE_NAME) NOT IN (SELECT DISTINCT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED); OWNER TABLE_NAME ------------------------------ -----------------------------SCOTT BONUS SCOTT SALGRADE SH SALES SH COSTS SH SUPPLEMENTARY_DEMOGRAPHICS
=dlZkZg!_jhiWZXVjhZViVWaZh]dlhje^ci]Zk^ZlYdZhc¼ibZVci]Vi^igZVaan^hWVY!_jhii]Vi ndjl^aa\ZiVadid[ZmigVgZYdWZ^c\lg^iiZcidi]ZDGAhVcY]ZcXZhZciidi]ZhiVcYWnYViVWVhZh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RAPHICSiVWaZ/ SQL> DESC SH.SUPPLEMENTARY_DEMOGRAPHICS Name Null? ----------------------------------------- -------CUST_ID NOT NULL EDUCATION OCCUPATION HOUSEHOLD_SIZE YRS_RESIDENCE AFFINITY_CARD BULK_PACK_DISKETTES FLAT_PANEL_MONITOR HOME_THEATER_PACKAGE BOOKKEEPING_APPLICATION PRINTER_SUPPLIES Y_BOX_GAMES OS_DOC_SET_KANJI COMMENTS
Type ------------NUMBER VARCHAR2(21) VARCHAR2(21) VARCHAR2(21) NUMBER NUMBER(10) NUMBER(10) NUMBER(10) NUMBER(10) NUMBER(10) NUMBER(10) NUMBER(10) NUMBER(10) VARCHAR2(4000)
6aad[i]ZhZXdajbchVgZ\d^c\idWZlg^iiZcdjiidi]ZgZYdhigZVbl]Zi]Zgi]ZnX]Vc\ZYdgcdi! _jhihdHFA6eeanXVc[^cYi]Zg^\]igdldci]Zad\^XVahiVcYWn#LZfjdiZ[gdbi]ZOracle Utilities bVcjVa!8]VeiZg&-!jcYZg¹HjeeaZbZciVaAd\\^c\º/&If the table has neither a primary key nor a non-null unique index key, then all columns except LONG and LOB are supplementally logged; this is equivalent to specifying ALL supplemental logging for that row. Therefore, Oracle recommends that when you use database-level primary key supplemental logging, all or most tables be defined to have primary or unique index keys. 7ni]ZlVn!i]^hVeea^ZhidVcniVWaZi]Vi]Vhi]^hjc^fjZcZhhegdWaZb!ZkZci]dhZi]ViHFA 6eeanhVnhVgZjchjeedgiZY#Ndjl^aaWZ\ZcZgVi^c\gZYd[dgi]ZbVhlZaa!h]^ee^c\^iidi]Z hiVcYWnYViVWVhZhVcY]Vk^c\^ii]gdlcVlVn# ;^cVaan!l]Zcndj]VkZi]ZhZjc^fjZcZhh^hhjZhVcYndjgZhdakZi]Zbl^i]VY^hVWaZYG:AN XdchigV^ci!ndjhi^aacZZYid\didi]Zad\^XVahiVcYWnVcYVYYVc^cYZm[dgi]ZiVWaZhi]ViVgZ hjeedgiZYWnHFA6eean0di]Zgl^hZ!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ZX`ed^cih!bdhicdiVWanVthreadX]ZX`ed^ciadXVaX]ZX`ed^ci!Vdatabase X]ZX`ed^ci\adWVaX]ZX`ed^ci!VcYVdatafileX]ZX`ed^ci#
N
Online redo log (ORL) 6ahd`cdlch^beanVhgZYdad\h!DGA[^aZhXdciV^ceZgh^hiZcian hidgZYX]Vc\ZYgZYdgZXdgYh#I]ZgZYdgZXdgYh^ci]Zad\[^aZhVgZhidgZY^cH8ChZfjZci^Va dgYZg¸i]Vi^h!i]ZdgYZg^cl]^X]gZYdlVhlg^iiZc#L]Zcdca^cZgZYdad\hVgZ[jaa!i]Zn WZXdbZVgX]^kZYidi]ZVgX]^kZgZYdad\h#
N
Archived redo log 6gX]^kZYkZgh^dchd[dca^cZgZYdad\h#I]ZhZ[^aZh!YZZbZY^cVXi^kZ [^aZh!VgZVgX]^kZYWni]ZVgX]^kZegdXZhhZhiddcZdgbdgZYZ[^cZYad\VgX]^kZYZhi^cVi^dch#
ACID Properties DgVXaZ¼higVchVXi^dchVgZegdiZXiZYWni]ZACIDegdeZgi^Zh!l]^X]hiViZi]Vil]ZcVigVchVXi^dc^h hiVgiZY!^ibjhi[daadli]ZhZWVh^XgjaZh/ N
Atomicity I]ZZci^gZhZfjZcXZd[VXi^dchbjhiWZZ^i]ZgXdbeaZiZYdgVWdgiZY#I]Z igVchVXi^dcXVccdiWZeVgi^VaanhjXXZhh[ja#I]^h^hVahdgZ[ZggZYidVhi]Zall-or-nothing rule#
8]VeiZg(/ GZYdEgdXZhh^c\
109
N
Consistency I]ZigVchVXi^dcbdkZhi]ZhnhiZb[gdbdcZXdch^hiZcihiViZidVcdi]Zg#
N
Isolation 6igVchVXi^dc¼hZ[[ZXihdgX]Vc\ZhVgZcdik^h^WaZiddi]ZgigVchVXi^dchjci^a i]ZigVchVXi^dc^hXdbb^iiZY#
N
Durability 8]Vc\ZhbVYZWni]ZXdbb^iiZYigVchVXi^dcVgZeZgbVcZciVcYbjhihjgk^kZ hnhiZb[V^ajgZ#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ads Started redo scan Completed redo scan 94354 redo blocks read, 2982 data blocks need recovery Started redo application at Thread 1: logseq 62, block 427 Recovery of Online Redo Log: Thread 1 Group 2 Seq 62 Reading mem 0 Mem# 0: +DATA/Matrix/redo_02a.log Mem# 1: +DATA/Matrix/redo_02b.log Completed redo application Completed crash recovery at Thread 1: logseq 62, block 94781, scn 678972 2982 data blocks read, 2982 data blocks written, 94354 redo blocks read Mon Jul 07 21:44:34 2008
Cdi^XZi]ViV[iZgi]ZYViVWVhZ^hdeZcZY!XgVh]gZXdkZgnhiVgihWnhXVcc^c\i]ZgZYdi]gZVYhd[ i]Z[V^aZY^chiVcXZdg^chiVcXZh!l]^X]^hi]ZcgZVYVcYbZg\ZYWnH8C!WZ\^cc^c\Vii]Zad\ hZfjZcXZd[i]ZaVhi^cXgZbZciVaX]ZX`ed^ci[dgZVX]i]gZVY#I]^hhXVc\ZcZgViZhVa^hid[WadX`h i]VigZfj^gZgZXdkZgn#GZXdkZgni]ZchiVgihVii]^hed^ci!Veean^c\gZXdkZgngZYdidi]ZhZWadX`h#6i i]ZXdbeaZi^dcd[i]ZgZXdkZgn!VhjbbVgnd[i]ZgZYdWadX`hgZVYVhlZaaVhYViVWadX`hgZVYVgZ lg^iiZcidi]ZVaZgiad\#
110
DgVXaZ9ViV<jVgY&&g =VcYWdd`
Thread Merging Thread mergingd[i]ZgZYdgZXdgYh^heZg[dgbZYidZchjgZi]VicdjeYViZ^hbVYZidi]Z YViVWVhZdjid[dgYZg!hdi]ViVaaX]Vc\ZhVgZbVYZ^ci]ZdgYZgi]ZnlZgZdg^\^cVaanbVYZ# I]gZVYbZg\^c\^hY^hXjhhZY^cYZiV^a^c8]VeiZg-#
Media Recovery BZY^VgZXdkZgndXXjghl]Zci]ZgZ^hVadhhd[dcZdgbdgZYViVWVhZYViV[^aZhdgi]ZZci^gZ YViVWVhZ#DcXZi]ZcZXZhhVgnYViVWVhZYViV[^aZhVgZgZhidgZY!i]ZYViVWVhZcZZYhidWZgZXdkZgZY Z^i]ZgidVheZX^[^Xed^ci^ci^bZdgjeidi]Zed^ci_jhiWZ[dgZi]Z[V^ajgZ#>i^h^bedgiVciidcdiZ i]VigZXdkZgnWg^c\hi]ZZci^gZYViVWVhZVaadca^cZYViV[^aZhidi]ZhVbZXdch^hiZcied^ci^ci^bZ! dgH8C#BZY^VgZXdkZgn^hYg^kZc[gdbi]ZVgX]^kZYgZYdad\h#H^cXZi]Ze]nh^XVahiVcYWn VgX]^iZXijgZ^hWj^aijedcbZY^VgZXdkZgn!^i^hZbe]Vh^oZY]ZgZ# I]Z[daadl^c\ZmXZgei[gdbi]ZYViVWVhZVaZgi#ad\Y^heaVnhbZY^VgZXdkZgn[dghiVcYWn YViVWVhZh/ Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE THROUGH ALL SWITCHOVER DISCONNECT USING CURRENT LOGFILE Wed Jul 23 08:43:54 2008 Media Recovery Waiting for thread 1 sequence 35 Wed Jul 23 08:44:01 2008 Redo Shipping Client Connected as PUBLIC -- Connected User is Valid RFS[10]: Assigned to RFS process 20724 RFS[10]: Identified database type as 'physical standby' Primary database is in MAXIMUM PERFORMANCE mode Primary database is in MAXIMUM PERFORMANCE mode RFS[10]: Successfully opened standby log 5: '+FLASH/Matrix_DR0/onlinelog/group_5.257.660730583' Wed Jul 23 08:44:04 2008 Recovery of Online Redo Log: Thread 1 Group 5 Seq 35 Reading mem 0 Mem# 0: +FLASH/Matrix_DR0/onlinelog/group_5.257.660730583 Wed Jul 23 08:44:39 2008 Redo Shipping Client Connected as PUBLIC -- Connected User is Valid RFS[11]: Assigned to RFS process 20805 RFS[11]: Identified database type as 'physical standby' Wed Jul 23 19:12:54 2008 Media Recovery Waiting for thread 1 sequence 36 Wed Jul 23 19:12:55 2008 Primary database is in MAXIMUM PERFORMANCE mode kcrrvslf: active RFS archival for log 5 thread 1 sequence 35 RFS[10]: Successfully opened standby log 4: '+FLASH/Matrix_DR0/onlinelog/group_5.257.660730583' Wed Jul 23 19:14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XVcWZheZX^[^ZY[dghZkZgVa9BAdeZgVi^dch!hjX]Vh i]Z[daadl^c\/ CREATE TABLE AS SELECT CREATE INDEX ALTER INDEX ALTER TABLE ..[MOVE] [SPLIT] PARTITION SQLLOAD
L]Zci]ZUNRECOVERABLEdei^dc^hheZX^[^ZY!cdgZYd^h\ZcZgViZY[dgi]^hWViX]igVchVXi^dc0 ]dlZkZg!gZYd^hhi^aa\ZcZgViZY[dgi]ZYViVWVhZY^Xi^dcVgniVWaZh!VcYVhbVaaVbdjcid[gZYd^h \ZcZgViZYidYZ[^cZVc^ckVa^YVi^dcgVc\Zl^i]VhiVgi^c\WadX`VYYgZhhVcYH8C!gZ[aZXi^c\i]Z gVc\Zd[WadX`hVgZWZ^c\X]Vc\ZY# 6ai]dj\]i]ZUNRECOVERABLEdei^dc^hkZgnWZcZ[^X^Val]ZcadVY^c\aVg\ZVbdjcihd[YViV Z[[^X^Zcian!^i]VhV]j\ZYdlch^YZl]ZcjhZY^c9ViV<jVgYZck^gdcbZcih#L]ZcbZY^V gZXdkZgnZcXdjciZghi]ZYViVWadX`hl^i]^ci]^h^ckVa^YVi^dcgVc\Z!l]^X]dXXjghl]Zci]Z UNRECOVERABLEdeZgVi^dc^hjhZY!i]ZnVgZbVg`ZYVhsoft-corrupt!h^cXZi]ZnVgZb^hh^c\i]Z cZXZhhVgngZYd#I]Ze]nh^XVahiVcYWnYViVWVhZl^aai]Zci]gdli]Z[daadl^c\Zggdg/ ORA-01578: ORACLE data block corrupted (file # 10, block # 514) ORA-01110: data file 3: '+data/Matrix_DR0/datafile/users.278.56783987' ORA-26040: Data block was loaded using the NOLOGGING option
I]^hhVbZZggdgldjaYdXXjgdci]Zeg^bVgnYViVWVhZ^[ndj]VYideZg[dgbbZY^VgZXdkZgn# ;dgi]^hgZVhdc!^i^hbVcYVidgni]VindjWVX`jei]ZiVWaZheVXZYViV[^aZhdci]Zeg^bVgni]VilZgZ adVYZY^cUNRECOVERABLEbdYZ^bbZY^ViZanV[iZgi]Zcdad\\^c\deZgVi^dc^hXdbeaZiZY#Dc i]ZhiVcYWn!^[ndjhZZi]^hZggdg!ndjbjhibVcjVaangZXdkZg[gdb^ijh^c\dcZd[i]ZbZi]dYhlZ l^aaYZhXg^WZ^cVbdbZci# NdjXVcZbeadnhZkZgVabZVhjgZhidYZiZXiVc^cVYkZgiZcijhZd[cdad\\^c\deZgVi^dchdc ndjghiVcYWnYViVWVhZ/ N EgdVXi^kZanfjZgn[dgcdad\\^c\deZgVi^dchdci]Zeg^bVgn/ SQL> SELECT NAME, UNRECOVERABLE_CHANGE#, TO_CHAR(UNRECOVERABLE_TIME,'DD-MON-YYYY HH:MI:SS') FROM V$DATAFILE;
N EgdVXi^kZangjcDBVERIFYidX]ZX`[dgcdad\\^c\deZgVi^dchdci]ZhiVcYWn/ $ dbv file=users.dbf DBVERIFY - Verification starting : FILE DBV-00200: Block, dba 35283426, already DBV-00200: Block, dba 35283427, already DBV-00200: Block, dba 35283428, already
= users.dbf marked corrupted marked corrupted marked corrupted
>[cdad\\^c\deZgVi^dchVgZYZiZXiZY!i]Z[daadl^c\hiZehXVcWZjhZYidgZXdkZgi]ZV[[ZXiZY YViV[^aZh#
8]VeiZg(/ GZYdEgdXZhh^c\
113
Managed Recovery 6ai]dj\]i]ZDgVXaZYdXjbZciVi^dchiViZhi]Vindjh]djaYjhZALTER DATABASE MANAGED STANDBY DATABASE <..>idVaiZgi]ZWZ]Vk^dgd[bVcV\ZYgZXdkZgn!ndjXVcVahdjhZi]Z h]dgiZcZYkZgh^dc/RECOVER MANAGED STANDBY DATABASE <..>#GZbZbWZgidValVnh jhZi]ZMANAGED`ZnldgY0di]Zgl^hZ!ndjl^aaWZeZg[dgb^c\bVcjVagZXdkZgnVcYWneVhh^c\ 9ViV<jVgY#
Dci]ZhiVcYWnYViVWVhZ/ 1.
EZg[dgbVRECOVER MANAGED STANDBY DATABASE CANCEL#I]^hl^aahidei]ZgZYdVeean#
2.
;dgi]ZV[[ZXiZYcdad\\^c\[^aZh!Ydi]^h/ ALTER DATABASE DATAFILE OFFLINE DROP
I]^hl^aaoffline i]ZV[[ZXiZYYViV[^aZh# 3.
EZg[dgbVRECOVER MANAGED STANDBY DATABASE DISCONNECT#I]^hl^aagZhiVgii]Z gZYdVeean#
Dci]Zeg^bVgnYViVWVhZ/ 4.
Jh^c\GB6C!WVX`jei]ZV[[ZXiZYYViV[^aZhVcYXdeni]Zbidi]ZhiVcYWnYViVWVhZVcY gZeaVXZi]ZV[[ZXiZY[^aZh#
5.
EZg[dgbVRECOVER MANAGED STANDBY DATABASE CANCEL#I]^hl^aahidei]ZgZYdVeean#
6.
Dca^cZi]ZegZk^djhand[[a^cZYYViV[^aZhjh^c\i]^h/ ALTER DATABASE DATAFILE ONLINE
7.
EZg[dgbVRECOVER MANAGED STANDBY DATABASE DISCONNECT#I]^hl^aagZhiVgii]Z gZYdVeean#
I]ZWZhibZi]dY!d[XdjghZ!^hidVkd^Yi]^hcdad\\^c\bZhhVcYegZkZcicdad\\^c\deZgVi^dch dci]Zeg^bVgnYViVWVhZ^ci]Z[^ghieaVXZ#;daadl^c\VgZdei^dchi]ViXVcWZjhZYdci]Zeg^bVgn YViVWVhZ[dgi]ZkVg^djhaZkZahd[Zc[dgXZbZci/ N
Database level ALTER DATABASE FORCE LOGGING I]^h^hi]ZgZXdbbZcYZY9ViV<jVgYhZii^c\!Vhi]^hZchjgZhi]ViVaaigVchVXi^dchVgZ ad\\ZYVcYXVcWZgZXdkZgZYi]gdj\]bZY^VgZXdkZgndggZYdVeean#
N
Tablespace level ALTER TABLESPACE FORCE LOGGING 6hhiViZY![dgXZad\\^c\Vii]ZYViVWVhZaZkZa^hi]ZgZXdbbZcYZYdei^dc0]dlZkZg!^c heZX^VaXVhZh^i^hWZcZ[^X^VaidhZi[dgXZad\\^c\Vii]ZiVWaZheVXZaZkZa¸[dgZmVbeaZ!^[ VcVeea^XVi^dc\ZcZgViZhaVg\ZVbdjcihd[igVch^ZciiVWaZYViVl]ZgZadVYi^bZhVgZbdgZ ^bedgiVcii]Vci]ZgZXdkZgnd[i]ZhZiVWaZh!VcYi]ZigVch^ZciiVWaZYViVXVcWZZVh^an gZadVYZYV[iZgbZY^VgZXdkZgn#>ci]ZhZXVhZh!^ibVnWZYZh^gVWaZid\gdjeVcYhidgZ Vaai]ZhZigVch^ZciiVWaZh^ciddcZdgbdgZiVWaZheVXZhi]ViYdcdi]VkZ[dgXZad\\^c\ ZcVWaZYidVaadlcdad\\^c\deZgVi^dch#6aadi]ZgiVWaZheVXZhl^aa]VkZ[dgXZad\\^c\# I]^hdei^dcegdk^YZh[^cZgXdcigdadkZg[dgXZad\\^c\0]dlZkZg!^iXdbZhVii]ZZmeZchZd[ ]^\]ZgbVcV\ZVW^a^inXdhih!i]ZcZZYidbdc^idgi]ZjhZd[i]ZhZcdad\\^c\iVWaZheVXZh! VcYi]ZcZZYidgZhdakZi]ZjcgZXdkZgVWaZYViV[^aZhVihl^iX]dkZgdg[V^adkZg#
114
DgVXaZ9ViV<jVgY&&g =VcYWdd` N
Table level [CREATE | ALTER] TABLE FORCE LOGGING I]^hhZii^c\^hh]dlcdcan[dgi]ZhV`Zd[XdbeaZiZcZhh#HZii^c\i]^hViViVWaZaZkZaXVc WZXjbWZghdbZ0i]ZgZ[dgZ!^i^hgZXdbbZcYZYidYdi]Z[dgXZad\\^c\Vii]ZYViVWVhZ aZkZa#
The Components of a Physical Standby 6hY^hXjhhZY^c8]VeiZg&!i]Z9ViV<jVgYVgX]^iZXijgZXVcWZXViZ\dg^oZY^cidi]gZZbV_dg XdbedcZcih# N
Data Guard Redo Transport Services GZYdIgVchedgiHZgk^XZhVgZjhZYidigVch[Zgi]Z gZYdi]Vi^h\ZcZgViZYWni]Zeg^bVgnYViVWVhZidi]ZhiVcYWnYViVWVhZ#
N
Data Guard Apply Services 6eeanHZgk^XZhgZXZ^kZhVcYVeea^Zhi]ZgZYdhZciWnGZYd IgVchedgiHZgk^XZhidi]ZhiVcYWnYViVWVhZ#
N
Data Guard Role Management Services GdaZBVcV\ZbZciHZgk^XZhVhh^hi^cYViVWVhZ gdaZX]Vc\Zh^chl^iX]dkZgVcY[V^adkZghXZcVg^dh#
;^\jgZ("&^aajhigViZhi]ZkVg^djhXdbedcZcihVcYi]ZYViV[adl^c9ViV<jVgYe]nh^XVahiVcYWn# @ZZe^cb^cYi]Vii]ZhZhZgk^XZhZm^hi^cWdi]e]nh^XVaVcYad\^XVaYViVWVhZXdc[^\jgVi^dch#>ci]^h X]VeiZg!i]Z[dXjhl^aaWZdc9ViV<jVgYe]nh^XVahiVcYWn# >i^hi]ZXdbW^cVi^dcd[igVchedgiVcYVeeanhZgk^XZhi]ViVaadlhi]ZhncX]gdc^oVi^dcd[Veg^bVgn VcY^ihhiVcYWnYViVWVhZh#IdbV`Zi]^hVaa]VeeZc!hZkZgVaDgVXaZWVX`\gdjcYegdXZhhZheaVnV`Zn gdaZ^ci]Ze]nh^XVahiVcYWn9ViV<jVgY[gVbZldg`#
Redo buffer
Primary Database
LNS
RFS
MRP LSP
LGWR
Online Redo Logs
Standby Database
Standby Redo Logs
ARCH ARCH
Archived Redo Logs
FIGURE 3-1.
Data Guard components
Archived Redo Logs
8]VeiZg(/ GZYdEgdXZhh^c\
115
>ci]Zeg^bVgnYViVWVhZ!i]Z[daadl^c\egdXZhhZhVgZ^bedgiVci/ N
LGWR I]Zad\lg^iZgegdXZhh[ajh]Zhad\Wj[[Zgh[gdbi]ZH<6idDGA[^aZh#
N
LNS I]ZAd\Lg^iZgCZildg`HZgk^XZACHgZVYhi]ZgZYdWZ^c\[ajh]ZY[gdbi]ZgZYd Wj[[ZghWni]ZA
N
ARCH I]ZVgX]^kZgegdXZhhZhVgX]^kZhi]ZDGA[^aZhidVgX]^kZad\[^aZh#Jeid(%6G8= egdXZhhZhXVcZm^hi!VcYi]ZhZ6G8=egdXZhhZhVgZVahdjhZYid[ja[^aa\VegZhdaji^dc gZfjZhih#CdiZi]VidcZ6G8=egdXZhh]VhVheZ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^aaWZXdbZ VXi^kViZYdcgdaZbVcV\ZbZciX]Vc\Zhhl^iX]dkZg#>i^hgZfj^gZYi]Vii]ZHGAWZXdc[^\jgZYl^i] i]ZhVbZh^oZVhi]ZDGA[^aZhdgi]ZHGAhl^aacdiWZjhZY#;jgi]ZgbdgZ!^i^hgZXdbbZcYZYid ]VkZN &HGA[^aZheZg^chiVcXZYZ[^cZYdci]ZhiVcYWnh^iZ!l]ZgZN^hi]ZidiVacjbWZgd[gZYd ad\bZbWZgheZgi]gZVYdci]Zeg^bVgnh^iZ# I]Z[daadl^c\psXdbbVcYZmVbeaZh]dlhi]Z^bedgiVci]^\]a^\]iZYegdXZhhZhdci]Z hiVcYWnh^iZ/ racnode1 > ps -ef |grep -i Matrix_DR0 oracle 6507 1 0 21:23 ? oracle 6509 1 0 21:23 ? oracle 6513 1 0 21:23 ? oracle 6515 1 0 21:23 ? oracle 6517 1 0 21:23 ? oracle 6521 1 0 21:23 ? oracle 6523 1 0 21:23 ? oracle 6525 1 0 21:23 ? oracle 6527 1 0 21:23 ? oracle 6529 1 0 21:23 ? oracle 6531 1 0 21:23 ? oracle 6533 1 0 21:23 ? oracle 6535 1 0 21:23 ? oracle 6537 1 0 21:23 ? oracle 6544 1 0 21:23 ? oracle 6546 1 0 21:23 ? oracle 6548 1 0 21:23 ? oracle 6550 1 0 21:23 ? oracle 8329 1 0 21:31 ? oracle 8333 1 0 21:31 ? oracle 8335 1 0 21:31 ?
00:00:00 00:00:00 00:00:00 00:00:00 00:00:00 00:00:11 00:00:01 00:00:01 00:00:01 00:00:02 00:00:00 00:00:00 00:00:02 00:00:00 00:00:00 00:00:01 00:00:00 00:00:00 00:00:00 00:00:01 00:00:01
ora_pmon_MATRIX_DR0 ora_vktm_MATRIX_DR0 ora_diag_MATRIX_DR0 ora_dbrm_MATRIX_DR0 ora_psp0_MATRIX_DR0 ora_dia0_MATRIX_DR0 ora_mman_MATRIX_DR0 ora_dbw0_MATRIX_DR0 ora_lgwr_MATRIX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ci]^hX]VeiZgXdkZghi]ZY^[[ZgZcXZhWZilZZcDgVXaZ 9ViVWVhZ&%gVcY&&gEBG# N Checkpoint phase I]^he]VhZ^ckdakZh[ajh]^c\i]ZgZXZcianbdY^[^ZYWj[[Zgh bdY^[^ZYWni]ZeVgVaaZagZXdkZgnhaVkZhidY^h`VcYVahdi]ZjeYViZd[YViV[^aZ ]ZVYZghidgZXdgYX]ZX`ed^ciXdbeaZi^dc# HiZeh&id)VgZXdci^cjdjhangZeZViZYjci^aZ^i]ZggZXdkZgn^hhideeZYdgVgdaZigVch^i^dc hl^iX]dkZgdg[V^adkZgdXXjgh#
Real-time Apply L]ZcgZYd^hgZXZ^kZYWnVcG;Hdci]ZhiVcYWnhnhiZb!i]ZG;HegdXZhhlg^iZhi]ZgZYdYViVid VgX]^kZYgZYdad\hdgdei^dcVaanidi]ZHGA#H^cXZDgVXaZ9ViVWVhZ&%g!l^i]GI6!l]^X]gZfj^gZh HGA!i]ZGZYd6eeanl^aaVjidbVi^XVaanVeeangZYdY^gZXian[gdbi]ZHGA#;^\jgZ("'^aajhigViZhi]Z GZYd6eeanegdXZhh[adl#
PR0x RFS
Real-Time Apply
Standby Redo Logs
ARCH
Archived Redo Logs
FIGURE 3-2.
MRP
Redo Apply process flow
Physical Standby
118
DgVXaZ9ViV<jVgY&&g =VcYWdd`
I]Z[daadl^c\XdbbVcY^hjhZYidZcVWaZi]ZgZVa"i^bZVeean[ZVijgZ^ce]nh^XVahiVcYWn YViVWVhZh#I]^hXdbbVcY^h^hhjZYdci]ZhiVcYWnh^iZ/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
@ZZe^cb^cYi]Vi^[HGAhVgZcdiYZ[^cZYl]ZcZcVWa^c\gZVa"i^bZVeean!i]ZjhZgl^aagZXZ^kZ VcORA-38500ZggdgbZhhV\Z# IdYZiZgb^cZl]Zi]ZggZVa"i^bZVeean^hZcVWaZY!fjZgni]ZRECOVERY_M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Z deZgVi^dch!^i^hgZXdbbZcYZYi]Vindj]VkZaVg\ZgDGA[^aZhVcYbViX]^c\HGA[^aZh#:beadn^c\ aVg\ZggZYdad\[^aZhl^i]gZVa"i^bZVeeanVaadlhVeeanhZgk^XZhidgZXdkZg[dgadc\ZgeZg^dYhd[ i^bZ!i]jhb^c^b^o^c\i]ZgZXdkZgndkZg]ZVY#
Scaling and Tuning Data Guard Apply Recovery HZkZgVagZXdbbZcYVi^dchXVc^begdkZi]ZGZYd6eeangViZVhlZaaVhgZYdigVchb^hh^dc#I]Z [daadl^c\YZhXg^WZh]dlidhXVaZVcYijcZGZYd6eean#
Top Six Considerations for Tuning the Recovery Rate I]Z[daadl^c\Xdch^YZgVi^dchVcYWZhiegVXi^XZhXVc^begdkZi]ZgZXdkZgngViZ#CdiZi]Vidi]Zg 9ViV<jVgYijc^c\Xdch^YZgVi^dch!hjX]VhgZYdh]^ee^c\!lZgZXdkZgZY^c8]VeiZg'# N During media recovery, at each log boundary (log switch), Oracle does a full checkpoint and updates all the file headers#>i^hgZXdbbZcYZYi]Vindj^cXgZVhZi]Zeg^bVgn YViVWVhZ¼hDGAVhlZaaVhi]ZhiVcYWnYViVWVhZ¼hHGAh^oZhhdi]ViVad\hl^iX]dXXjghVi Vb^c^bjbd[&*"b^cjiZ^ciZgkVah# N Use the PARALLEL option while in managed recovery#I]ZcZmihZXi^dcXdkZgheVgVaaZa bZY^VgZXdkZgn^cbdgZYZiV^a#
8]VeiZg(/ GZYdEgdXZhh^c\
119
N Implement real-time apply#6ai]dj\]i]^hgZXdbbZcYVi^dcYdZhcdiY^gZXianV[[ZXi gZXdkZgngViZ!^iYdZhY^gZXianV[[ZXi^begdkZhndjggZXdkZgni^bZdW_ZXi^kZGID# N Media recovery hinges on the DBWR’s ability to write out modified blocks from the buffer cache to disk as efficiently as possible#>i^hkZgn^bedgiVcii]Vii]Z97LG egdXZhhZh]VkZZcdj\]>$DWVcYl^Yi]ideZg[dgbi]^hiVh`#Id^cXgZVhZ97LG i]gdj\]eji!ValVnhjhZcVi^kZVhncX]gdcdjh>$DWnhZii^c\DISK_ASYNCH_IO=TRUE YZ[Vjai#>ci]ZgVgZXVhZi]ViVhncX]gdcdjh>$D^hcdiVkV^aVWaZ!jhZDBWR_IO_SLAVES id^begdkZi]ZZ[[ZXi^kZYViVWadX`lg^iZgViZl^i]hncX]gdcdjh>$D# N As with all cases of database recovery, the most important factor is I/O bandwidth# DgVXaZbZY^VgZXdkZgn^hYg^kZcVcYegZYdb^cVcianYZeZcYZcidc>$DWVcYl^Yi]!VcY l^i]djihj[[^X^Zci>$DWVcYl^Yi]!i]ZVeeanegdXZhhl^aaWZhiVaaZY#I]jh^i^h^bedgiVciid ZchjgZi]ViZcdj\]>$DWVcYl^Yi]^hVkV^aVWaZdci]ZhiVcYWnh^iZ#8Va^WgViZT>D^hVcZl ji^a^in^cigdYjXZY^c&&g#I]ViVaadlhVjhZgid\Vj\Zi]ZdkZgVaa>$Di]gdj\]ejidci]Z hZgkZg#;dgbdgZYZiV^ahdc8Va^WgViZT>DhZZBZiVA^c`CdiZ,',%+'#& N Remember that media recovery is heavily dependent on the Oracle buffer cache#I]jhV aVg\ZYViVWVhZXVX]Zh^oZXVch^\c^[^XVcian^begdkZbZY^VgZXdkZgneZg[dgbVcXZ#L]^aZ^c bVcV\ZYgZXdkZgnbdYZ!hZkZgVahiVcYWnYViVWVhZH<6XdbedcZcihXVcWZgZYjXZY!VcY i]^hbZbdgnXVcWZbdkZYVcYgZVaadXViZYidi]ZDB_CACHE_SIZE#;dgZmVbeaZ!bZbdgn VhhdX^ViZYl^i]i]ZJAVA_POOL!DB_KEEP_CACHE_SIZE!DB_RECYCLE_CACHE_SIZE! VcYVedgi^dcd[i]ZSHARED_POOL_SIZEXVcWZgZVaadXViZYidi]ZDB_CACHE_SIZE# =dlZkZg!jedchl^iX]dkZgdg[V^adkZg!i]ZcZleg^bVgnl^aagZfj^gZVegdYjXi^dc"gZVYnhZi d[^c^i^Va^oVi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Xi^kZ9ViV<jVgYidelV^iZkZcih# N >YZci^[n>$DWdiiaZcZX`h^cgZXdkZgnVgZVVcYYViVVgZV# N Bdc^idg8EJjhV\Z# NOTE Chapter 6 covers the V$ database views in greater detail.
Data Guard Views I]Z[daadl^c\^bedgiVcik^ZlhXVcWZjhZYidbdc^idg9ViV<jVgYe]nh^XVahiVcYWngZXdkZgn egd\gZhh#6hVbeaZdjiejid[ZVX]k^Zl^hVahdh]dlc#
V$MANAGED_STANDBY I]^hk^ZlY^heaVnhXjggZcihiVijh^c[dgbVi^dc[dgheZX^[^Xe]nh^XVa hiVcYWnYViVWVhZWVX`\gdjcYegdXZhhZh#I]^hk^ZlXVcWZjhZYidYZiZgb^cZVXi^k^inWnegdXZhh# >[ndjgeg^bVgnYViVWVhZ^hcdiVG68!i]ZXdajbcTHREAD#^ci]Z[daadl^c\fjZgnl^aaValVnh XdciV^ci]ZcjbWZgdcZ/ SQL> SELECT PROCESS, CLIENT_PROCESS,THREAD#, SEQUENCE#,STATUS FROM V$MANAGED_STANDBY; PROCESS CLIENT_P THREAD# SEQUENCE# STATUS --------- -------- ---------- ---------- -----------ARCH ARCH 1 0 CONNECTED ARCH ARCH 1 0 CONNECTED RFS N/A 0 0 IDLE RFS N/A 0 0 IDLE RFS LGWR 1 774 IDLE RFS LGWR 2 236 IDLE RFS UNKNOWN 0 0 IDLE MRP0 N/A 1 774 APPLYING_LOG 8 rows selected.
V$DATAGUARD_STATS I]^hk^ZlY^heaVnhkVg^djh^c[dgbVi^dcVWdjii]ZgZYdYViV#I]^h^cXajYZh gZYdYViV\ZcZgViZYWni]Zeg^bVgnYViVWVhZi]Vi^hcdinZiVkV^aVWaZdci]ZhiVcYWnYViVWVhZVcY ]dlbjX]gZYd]VhcdinZiWZZcVeea^ZYidi]ZhiVcYWnYViVWVhZ#I]^h^cY^gZXianh]dlh]dlbjX] gZYdYViVVii]ZXjggZcied^ci^ci^bZXdjaYWZadhi^[i]Zeg^bVgnYViVWVhZXgVh]ZY#
8]VeiZg(/ GZYdEgdXZhh^c\
121
SQL> SELECT * FROM V$DATAGUARD_STATS; NAME VALUE -------------------------------- ---------------apply finish time +00 00:00:00.0 apply lag +00 00:00:13 estimated startup time 24 standby has been open N transport lag +00 00:00:05
V$STANDBY_APPLY_SNAPSHOT I]^hk^Zlegdk^YZhi]ZXjggZcigZYdVeeangViZ^c@7$hZXdcY/ SQL> select to_char(snapshot_time,'dd-mon-rr hh24:mi:ss') snapshot_time, thread#, sequence#, applied_scn, apply_rate from V$standby_apply_snapshot; SNAPSHOT_TIME THREAD# SEQUENCE# APPLIED_SCN APPLY_RATE ------------------ -------- --------- --------------- ---------15-05-08 15:45:08 1 31527 3273334169433 68234 15-05-08 15:45:08 2 23346 3273334169449 68234
V$RECOVERY_PROGRESS I]^hk^ZlXVcWZjhZYidbdc^idgZ[[^X^ZcigZXdkZgndeZgVi^dchVh lZaaVhidZhi^bViZi]Zi^bZgZfj^gZYidXdbeaZiZi]ZXjggZcideZgVi^dc^cegd\gZhh/ SQL> select to_char(start_time, 'DD-MON-RR HH24:MI:SS') start_time, item, round(sofar/1024,2) "MB/Sec" from v$recovery_progress where (item='Active Apply Rate' or item='Average Apply Rate'); START_TIME ITEM MB/SEC ----------- ------------------------------- -------07-JUL-08 11:49:44 Active Apply Rate 6.15 07-JUL-08 11:49:44 Average Apply Rate 5.90 06-JUL-08 23:13:34 Active Apply Rate 5.76 06-JUL-08 23:13:34 Average Apply Rate 1.73
Physical Data Guard and Statspack 6cVano^c\eZg[dgbVcXZd[i]ZhiVcYWnYViVWVhZine^XVaanbZVcicVk^\Vi^c\i]gdj\]bVcnV$ k^ZlhidXdaaZXii]ZgZfj^gZYeZg[dgbVcXZYViV#>cVYY^i^dc!YjZidi]ZgZVY"dcancVijgZd[9ViV <jVgYe]nh^XVahiVcYWn!i]ZHiViheVX`ji^a^inXdjaYcdiWZZmZXjiZYdci]ZhiVcYWnYViVWVhZ# I]jh![dgYViVWVhZkZgh^dchd[&%gVcY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>cdjgZmVbeaZ! lZheZX^[^ZYHI97NE:G;Vhi]ZhiVcYWnjhZg#
Defining the Standby Database CZmi!ndj¼aacZZYidXdccZXiidi]Zeg^bVgnYViVWVhZVhi]Z HI97NE:G;jhZgVcYZmZXjiZi]ZhWVYY^ch#hfahXg^ei/ SQL> connect stdbyperf/your_password SQL> @sbaddins
L]Zci]ZhWVYY^ch#hfahXg^ei^h^ckd`ZY!^il^aaegdbei[dgi]Z[daadl^c\/ N I]ZIgVcheVgZciCZildg`^c\HjWhigViZICHVa^Vhd[i]ZhiVcYWnYViVWVhZ^chiVcXZ N I]ZeVhhldgYd[i]ZeZg[hiVijhZgdci]ZhiVcYWnh^iZ I]ZhWVYY^ch#hfahXg^eieZg[dgbhi]Z[daadl^c\iVh`h/ N 6YYhi]ZhiVcYWn^chiVcXZidi]ZHiViheVX`Xdc[^\jgVi^dc N 8gZViZhVeg^kViZYViVWVhZa^c`idi]ZeZg[hiVihX]ZbVdci]ZhiVcYWnh^iZ N 8gZViZhVhZeVgViZEgdXZYjgVaAVc\jV\Z$HigjXijgZYFjZgnAVc\jV\ZEA$HFAeVX`V\Z dci]Zeg^bVgnYViVWVhZ[dgZVX]YZ[^cZYhiVcYWnYViVWVhZ
Creating Statspack Snapshots DcXZi]ZhiVcYWnYViVWVhZ^hYZ[^cZYXdggZXian^ci]ZHI97NE:G; hX]ZbV!ndjXVcWZ\^cidiV`ZhiVcYWnHiViheVX`hcVeh]dih# I]ZhiViheVX`T1instance_name3#hcVeegdXZYjgZdci]Zeg^bVgnYViVWVhZVXXZhhZhi]Zstats$ k^Zlhdci]ZhiVcYWnYViVWVhZk^Vi]ZYViVWVhZa^c`VcYhidgZhi]^hYViV^ci]ZHI97NE:G;dci]Z eg^bVgnYViVWVhZ#>cdjgZmVbeaZ!BVig^mT9G%^hYZ[^cZYVhdjghiVcYWnYViVWVhZl]ZchYY^ch#hfa lVhZmZXjiZY#;dgZmVbeaZ!l]^aZi]ZhiVcYWn^hdeZcZYgZVY"dcan!ad\^cidi]Zeg^bVgnYViVWVhZ Vhi]ZHI97NE:G;jhZgVcYZmZXjiZi]ZhcVeegdXZYjgZ/ SQL> connect stdbyperf/your_password SQL> exec statspack_Matrix_DR0.snap
6ai]dj\]bdhid[i]ZhiVcYWnHiViheVX`gZedgi^hh^b^aVgidVhiVcYVgYHiViheVX`gZedgi!hdbZ kZgnheZX^[^XhiVcYWnhiVi^hi^XhVgZXdaaZXiZYVcYegZhZciZY^ci]ZhiVcYWngZedgi#I]Z[daadl^c\ ^aajhigViZhildcZlhZXi^dchd[i]ZhiVcYWnHiViheVX`gZedgid[eVgi^XjaVg^ciZgZhiidi]ZhiVcYWn YViVWVhZ/ N GZXdkZgnegd\gZhhhiVih N BVcV\ZYhiVcYWnhiVih
8]VeiZg(/ GZYdEgdXZhh^c\
123
Top 5 Timed Events Event Waits Time(s) Avg %Total --------------------------------- -------- ------- ------ ----shared server idle wait 32 960 30005 40.0 recovery read 93,398 767 8 31.9 parallel recovery control message 25,432 536 21 22.3 CPU time 28 1.2 latch free 3,813 25 1 1.0 Recovery Progress Stats DB/Inst: Matrix_DR0/Matrix_DR0 End Snap: 360 -> End Snapshot Time: 07-Jun-08 05:37:42 -> ordered by Item, Recovery Start Time desc Recovery Start Time Item Sofar Units Redo Timestamp ------------------- ----------------- -------------- ------- -----------------06-Jun-08 06:52:06 Active Apply Rate 1,024 KB/sec 06-Jun-08 06:52:06 Active Time 30,315 Seconds 06-Jun-08 06:52:06 Apply Time per Lo 709 Seconds 06-Jun-08 06:52:06 Average Apply Rat 424 KB/sec 06-Jun-08 06:52:06 Checkpoint Time p 0 Seconds 06-Jun-08 06:52:06 Elapsed Time 81,943 Seconds 06-Jun-08 06:52:06 Last Applied Redo 474,368,821 SCN+Tim 07-Jun-08 05:37:49 06-Jun-08 06:52:06 Log Files 41 Files 06-Jun-08 06:52:06 Redo Applied 33,988 Megabyt ----------------------------------------------------------------------Managed Standby Stats DB/Inst: Matrix_DR0/Matrix_DR0 End Snap: 360 -> End Snapshot Time: 07-Jun-08 05:37:42 -> ordered by Process Process pid Status Resetlog Id Thread Seq Block Num ----------- ---------- ------------ ----------- ------ ------- ----------Client Proc Client pid Blocks Delay(mins) ----------- ---------- -------------- -------------ARCH 262 CLOSING 655982533 1 290 2013185 ARCH 262 758 0 ARCH 264 CLOSING 655982533 1 289 2041857 ARCH 264 1,671 0 ARCH 266 CLOSING 655982533 1 291 2023425 ARCH 266 623 0 ARCH 268 CONNECTED 0 0 0 0 ARCH 268 0 0 MRP0 762 APPLYING_LOG 655982533 1 292 1879769 N/A N/A 2,097,152 0 RFS 17949 IDLE 655982533 1 292 1878764 LGWR 17272 1,006 0 RFS 18121 IDLE 0 0 0 0 UNKNOWN 17524 0 0 RFS 18280 IDLE 0 0 0 0 UNKNOWN 17517 0 0 -------------------------------------------------------------------
124
DgVXaZ9ViV<jVgY&&g =VcYWdd` I]Z[daadl^c\iVWaZY^heaVnhkVg^djhhXg^eihjhZYidhjeedgiVcYbVcV\Zi]ZhiVcYWnHiViheVX`/ Procedure Name
Description
Prompted Info
hWgZedgi
9ViVWVhZ>9!^chiVcXZcjbWZg!]^\]VcY adlhcVeh]dih>9idXgZViZi]ZgZedgi
hWejg\Z
Ejg\ZhVhZid[hcVeh]dih#I]ZhXg^ei ejg\ZhVaahcVeh]dihWZilZZci]Zadl VcY]^\]hcVeh]di>9h[dgi]Z\^kZc ^chiVcXZ#
9ViVWVhZ>9!^chiVcXZcjbWZg!adl VcY]^\]hcVeh]dih>9h
hWYZa^ch
9ZaZiZhVc^chiVcXZ[gdbi]Z Xdc[^\jgVi^dc!VhlZaaVhVhhdX^ViZY EA$HFAeVX`V\Zh#
>chiVcXZcVbZ
hWYgde
9gdehi]ZhiYWneZg[jhZgVcY iVWaZh#I]ZhXg^eibjhiWZgjcl]Zc XdccZXiZYidHNHdg^ciZgcVa#
hWVYY^ch
:mZXjiZi]^hhXg^ei[gdbi]Zeg^bVgn YViVWVhZidVYYVhiVcYWn^chiVcXZid i]ZXdc[^\jgVi^dc#
ICHVa^Vhd[i]ZhiVcYWnYViVWVhZ ^chiVcXZ!eVhhldgYd[i]ZeZg[hiVijhZg dci]ZhiVcYWnh^iZ
NOTE We have authored a MetaLink note ' on using Statspack and an Active Data Guard standby database. As the use of Statspack with Data Guard evolves, we will update this note.
Physical Standby Corruption Detection :Vga^Zg^ci]^hX]VeiZg!lZY^hXjhhZY]dlidYZiZXiVcYVkd^YjhZg"XgZViZYXdggjei^dcegdWaZbh l]Zccdad\\^c\deZgVi^dchVgZVaadlZYdci]Zeg^bVgnYViVWVhZ#7ji9ViV<jVgYXVc]Zaendj YZiZXiVcYgZXdkZg[gdbbVcndi]Zg]VgYlVgZ"XgZViZYXdggjei^dcZkZcihbjX][VhiZgi]VcbVcn di]ZgY^hVhiZggZXdkZgnhdaji^dch#
11g New Data Protection Changes I]^hhZXi^dcXdkZghhZkZgVad[i]ZcZlXdggjei^dcYZiZXi^dc[ZVijgZh^cigdYjXZY^cDgVXaZ 9ViVWVhZ&&g#CdiZi]Vii]ZhZ[ZVijgZhVgZcdiVaaheZX^[^XVaan[dge]nh^XVahiVcYWnYViVWVhZh!Wji [dgXdbeaZiZcZhhlZ¼aaYZhXg^WZi]Z[ZVijgZVcYh]dl]dlhiVcYWnYViVWVhZhaZkZgV\Zi]Zb#I]Z cZmihZXi^dcl^aaXdkZgi]ZcZlXdggjei^dc[ZVijgZh[dgi]Ze]nh^XVahiVcYWn# >cDgVXaZ9ViVWVhZ&&g!kVg^djhYViVWVhZXdbedcZcihaVnZghVcYji^a^i^ZhXVcVjidbVi^XVaan YZiZXiVXdggjeiWadX`VcYgZXdgY^i^ci]ZV$DATABASE_BLOCK_CORRUPTIONk^Zl#>cegZ"&&g kZgh^dch!dcanGB6ClVhXVeVWaZd[gZXdgY^c\^cidi]^hk^Zl#6c:ciZgeg^hZBVcV\ZgVaZgiXVcWZ ig^\\ZgZYl]ZcZkZgVcZlWadX`[gdbVcjcgZXdkZgVWaZZkZci^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ViVXVeijgZbZX]Vc^hbiddi]Zg YViVWVhZhi]VibVncZZYdcanVhjWhZid[i]Zeg^bVgnYViVWVhZ¼hYViV#I]^h^hedhh^WaZ dcan[gdbDgVXaZ9ViVWVhZ&&gdclVgY# I]gZZbV_dgVheZXihh]djaYWZXdch^YZgZYl]Zcndj¼gZYZVa^c\l^i]Vad\^XVahiVcYWn YViVWVhZ/ N
Dataset available at the logical standby I]^h]VhildeVgih/;^ghiVcY[dgZbdhi!ndj cZZYidX]VgVXiZg^oZl]ViiVWaZhVgZbV^ciV^cZYVii]Zad\^XVahiVcYWnYViVWVhZVcY ]dlidXjhidb^oZi]ZhZid[gZea^XViZYiVWaZh#HZXdcY!ndjcZZYidjcYZghiVcY]dlid Xjhidb^oZVad\^XVahiVcYWnYViVWVhZidiV`ZVYkVciV\Zd[^ihigjZedlZg/i]ZVW^a^inid d[[adVYndjgVeea^XVi^dch!Vaadl^c\i]ZXgZVi^dcd[VYY^i^dcVahX]ZbVdW_ZXihhjX]Vh bViZg^Va^oZYk^Zlh!^cYZmZh!VcYhddc#
N
Steady state operational issues 6ihiZVYnhiViZ!ndjcZZYid[dXjhdcildXdbedcZcih/ I]Z[^ghi^hi]ZgZYdigVchedgihZgk^XZi]VibV`ZhhjgZi]VigZYd\ZcZgViZYVii]Zeg^bVgn YViVWVhZVgg^kZhVii]ZhiVcYWnh^iZegdbeianVcYVaacZildg`Y^hXdccZXi^dchVgZ]VcYaZY igVcheVgZcian#I]^hlVhY^hXjhhZY^cYZiV^a^c8]VeiZg'#I]ZhZXdcY^hi]ZHFA6eean hZgk^XZi]Vib^cZhVcYVeea^Zhi]ZgZYdgZXdgYhidbV^ciV^ci]Zad\^XVahiVcYWnYViVWVhZ VcYegdk^YZhcZVggZVa"i^bZgZedgihVcYfjZg^Zh#LZl^aaXdcXZcigViZdci]ZHFA6eean hZgk^XZh^ci]^hX]VeiZg#
8]VeiZg)/ Ad\^XVaHiVcYWn N
129
Role transitions I]ZHFA6eeanhZgk^XZVahdegdk^YZhi]ZVW^a^inidX]Vc\ZgdaZh WZilZZcVeg^bVgnVcYVad\^XVahiVcYWnYViVWVhZ#GdaZigVch^i^dcXVcWZbdgZXdbeaZm ^cad\^XVahiVcYWnVhdeedhZYidhiZVYnhiViZdeZgVi^dcVaegdXZhhZh!WZXVjhZVeea^XVi^dc XdccZXi^k^incZZYhidWZXdch^YZgZY^cVYY^i^dcidi]ZegdXZhhZh^ckdakZYl^i]YViVWVhZ gdaZigVch^i^dchdci]ZcZleg^bVgn#GdaZigVch^i^dc!^ci]ZXdciZmid[HFA6eean!h]djaY WZgdji^cZaniZhiZY^cndjgY^hVhiZggZXdkZgn9GZck^gdcbZci#GdaZigVch^i^dcl^aacdiWZ XdkZgZY^ci]^hX]VeiZg!VhVbdgZYZiV^aZYY^hXjhh^dc^hegdk^YZY^c8]VeiZg-#
Characterizing the Dataset Available at the Logical Standby >ci]^hhZXi^dc!lZl^aaY^hXjhhkVg^djh^hhjZhgZaViZYidi]ZgZea^XViZYYViV/l]Vi\ZihgZea^XViZY! ]dlgZea^XViZYYViV^hegdiZXiZY[gdbVXX^YZciVabdY^[^XVi^dc!VcY]dlndjXVclg^iZXjhidb^oZ hdaji^dchl]ZgZcVi^kZgZYd"WVhZYgZea^XVi^dchjeedgi^haVX`^c\#I]ZclZl^aaY^hXjhhkVg^djh ^hhjZhgZaViZYidXjhidb^o^c\Vad\^XVahiVcYWnidgZVa^oZ^ih[jaaediZci^Va¸^cXajY^c\i]ZVW^a^inid d[[adVYVeea^XVi^dch[gdbi]Zeg^bVgnYViVWVhZ#
Characterizing the Dataset Replicated from the Primary Database 6ad\^XVahiVcYWn^h[^ghiVcY[dgZbdhiVhiVcYWn!hdhdbZfjZhi^dchVg^hZcVijgVaan/ N L]VieVgid[i]Zeg^bVgnYViVWVhZ¼hYViVhZil^aaWZgZea^XViZYVii]Zad\^XVahiVcYWn4 N 8VclZe^X`VcYX]ddhZi]ZiVWaZhi]ViVgZgZea^XViZYVii]Zad\^XVahiVcYWn4 N L]ViegZkZcihjhZgh[gdbbdY^[n^c\i]ZgZea^XViZYYViVVii]Zad\^XVahiVcYWnYViVWVhZ4 N >hi]ZgZVcnlVnidgZea^XViZhX]ZbVdW_ZXihi]ViYdcdi]VkZcVi^kZgZYd"WVhZY gZea^XVi^dchjeedgi4
Determining What Gets Replicated at the Logical Standby Database 9ViV<jVgYad\^XVahiVcYWnl^aagZea^XViZYViVWVhZhX]ZbVdW_ZXihjcaZhhi]Zn[VaajcYZgi]Z [daadl^c\i]gZZXViZ\dg^Zh/ N I]ZdW_ZXiWZadc\hidi]ZhZid[^ciZgcVahX]ZbVhi]ViHFA6eeanYdZhcdibV^ciV^c Zmea^X^ian# N I]ZdW_ZXiXdciV^chVYViVineZ[dgl]^X]cVi^kZgZYd"WVhZYhjeedgi^haVX`^c\^c HFA6eean# N I]ZdW_ZXi^hi]ZiVg\Zid[VcZmea^X^ih`^egjaZheZX^[^ZYWni]Z976#
Determining the Set of Internal Schemas Not Maintained by SQL Apply hZil^i]i]Z[daadl^c\fjZgn/ SQL> SELECT OWNER FROM DBA_LOGSTDBY_SKIP WHERE STATEMENT_OPT = 'INTERNAL SCHEMA' ORDER BY OWNER;
NdjXVc[^cYi]Z
130
DgVXaZ9ViV<jVgY&&g=VcYWdd`
>[ndj^hhjZYi]^hfjZgndcVYViVWVhZgjcc^c\i]Z&&g G&hd[ilVgZ!^il^aagZijgc&,hX]ZbVh i]ViVgZVjidbVi^XVaanh`^eeZYWnHFA6eean#I]Zildbdhi^bedgiVcidcZhided^cidjiVgZHNH VcYHNHI:B#L]nYdZhHFA6eeanh`^ei]ZhZ4BdhidW_ZXih^ci]ZhZhX]ZbVhhjX]Vhi]ZiVWaZh D7?!8DA!VcYhddc^cHNHhX]ZbVVgZbV^ciV^cZYi]gdj\]9ViV9Z[^c^i^dcAVc\jV\Zh 99Ahdg^ckdXVi^dchd[hjeea^ZYEA$HFAegdXZYjgZh#HFA6eeangZea^XViZh99AhVcYhjX] ^ckdXVi^dcd[hjeea^ZYEA$HFAad\^XVaan!VcYi]jh9BAhZcXdjciZgZYdchnhiZbbZiVYViViVWaZh VgZgZea^XViZYad\^XVaanWn^ckd`^c\i]Z]^\]ZgaZkZadeZgVi^dch#HdgZbZbWZgi]Vi^[ndjVgZ eaVcc^c\idjhZVad\^XVahiVcYWnYViVWVhZ!YdcdiXgZViZVjhZgiVWaZ^cdcZd[i]ZhZ^ciZgcVa hX]ZbVh#I]Znl^aacdiWZgZea^XViZY^cndjgad\^XVahiVcYWnYViVWVhZ#
Determining the Tables Not Being Replicated Because of Unsupported Data Types NdjXVc [^cYi]ZhZid[iVWaZhl^i]Vh^beaZfjZgnVhlZaa/ SQL> SELECT DISTINCT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED;
>[ndjlVciidjhZVcjcYdXjbZciZYk^Zli]Vil^aagZijgci]ZgZhjaih[VhiZg!igni]Z[daadl^c\/ SQL> SELECT OWNER, TABLE_NAME FROM LOGSTDBY_UNSUPPORTED_TABLES;
LZbZci^dcZYi]ZegZhZcXZd[Zmea^X^ih`^egjaZh^ci]Za^hid[X]VgVXiZg^hi^XhVhhdbZi]^c\ i]Vil^aahidegZea^XVi^dcd[V\^kZciVWaZ#LZZmeadgZi]^h^cbdgZYZiV^a^ci]ZcZmihZXi^dc#
Customizing a Logical Standby Database to Replicate Only a Subset of Tables 9ViV<jVgYVaadlhndjidheZX^[ngjaZhhdi]VindjXVch`^ei]ZgZea^XVi^dcd[ViVWaZdgVhZid[ iVWaZhVii]Zad\^XVahiVcYWnYViVWVhZ#GZbZbWZg!i]dj\]!i]Vi&%%eZgXZcid[i]ZgZYd^hValVnh igVch[ZggZYidi]ZhiVcYWnYViVWVhZ#I]Zh`^ee^c\^ci]^hXVhZVeea^Zhidl]ViHFA6eeanl^aa VXijVaanegdXZhhVii]ZhiVcYWnYViVWVhZl^i]i]VigZYd#
Using DBMS_LOGSTDBY.SKIP to Skip Replication of Tables 9ViV<jVgYegdk^YZhVc ^ciZg[VXZi]ViVaadlhndjidjhZi]ZedlZgd[eViiZgcbViX]^c\idheZX^[nhZid[dW_ZXihi]Vih]djaY cdiWZgZea^XViZYVii]Zad\^XVahiVcYWnYViVWVhZ#AZi¼hadd`Vii]Z^ciZg[VXZ^cbdgZYZiV^a/ DBMS_LOGSTDBY.SKIP ( STMT IN VARCHAR2, SCHEMA_NAME IN VARCHAR2 DEFAULT NULL, OBJECT_NAME IN VARCHAR2 DEFAULT NULL,
Myth Buster: Standard Log-based Replication Can Give You an Equivalent of a Logical Standby Database 6hl^i]Vaabni]h!i]ZgZ^hVcZaZbZcid[igji]idi]^h#>[VaandjlVci^hYViVhidgZY^cndjg iVWaZh!ndjXVc\ZiVcZfj^kVaZcid[Vad\^XVahiVcYWni]gdj\]i]^gY"eVgingZea^XVi^dc hdaji^dch#7jindjgYViVWVhZ^hbdgZi]Vci]ZYViVXdciV^cZY^cndjgiVWaZh#L]ViVWdji ndjg_dWh4L]ViVWdjindjgK^gijVaEg^kViZ9ViVWVhZKE9eda^X^Zh4L]ViVWdjieaVccZY VcYjceaVccZYZkZcihVcYi]Z\jVgVciZZd[oZgdYViVadhh4L]ViVWdjiigVcheVgZci b^\gVi^dcd[ndjgVeea^XVi^dchi]ViYZeZcYdchZfjZcXZh4I]Zigji]^h!^[ndjlVciV ijgc`ZndcZ"lVngZea^XVi^dcd[ndjgl]daZYViVWVhZi]Viegdk^YZhndjl^i]]^\]VkV^aVW^a^in VcYY^hVhiZggZXdkZgn^cdcZeVX`V\Z!i]ZgZ^hcdhjWhi^ijiZ[dg9ViV<jVgYAd\^XVaHiVcYWn#
8]VeiZg)/ Ad\^XVaHiVcYWn PROC_NAME USE_LIKE ESC
131
IN VARCHAR2 DEFAULT NULL, IN BOOLEAN DEFAULT TRUE, IN CHAR1 DEFAULT NULL);
>cZhhZcXZ!ndjXVcheZX^[ni]ZineZd[hiViZbZcih9ViVBVc^ejaVi^dcAVc\jV\ZP9BARdg99A! VhheZX^[^ZYWni]ZstmtVg\jbZci!dcl]^X]idVeeani]Zh`^egjaZh#I]Zschema_nameVcY ob ect_nameVg\jbZcihXVciV`Zl^aYXVgYh#I]Zuse_like^cY^XViZhl]Zi]ZgHFA6eean h]djaYjhZi]ZLIKEXdcY^i^dcidbViX]i]ZeViiZgcdgadd`[dgVcZmVXibViX]!VcYescWZ]VkZh i]ZhVbZlVnndjldjaYZmeZXii]Zescape characteridWZ]VkZl]ZcjhZY^cVLIKEXdcY^i^dc# I]Zbdhi^bedgiVciVg\jbZci^hproc_name!l]^X]ndjXVcheZX^[n[dg99AhiViZbZcih#>i VaadlhndjidheZX^[nVegdXZYjgZi]Vil^aaWZ^ckd`ZYWZ[dgZi]Z99AhiViZbZciXVcWZZmZXjiZY! VcY^iXVcgZijgcVcZl99AhiViZbZci[dgHFA6eeanidZmZXjiZdgVh`HFA6eeanidhidel^i]Vc Zggdg#CdiZi]VindjXVccdiheZX^[nVjhZg"hjeea^ZYegdXZYjgZ^ci]Zproc_nameVg\jbZci^[ndj VgZheZX^[n^c\V9BAh`^egjaZ0ViiZbei^c\idYdhdl^aagZhjai^cVcDG6"&+&%)Zggdg#& HjeedhZ![dgZmVbeaZ!lZlVciidh`^egZea^XVi^dcd[i]ZiVWaZ=G#:BEADN::#LZXVc^hhjZ i]Z[daadl^c\hiViZbZci/ SQL> EXECUTE DBMS_LOGSTDBY.SKIP(STMT => 'DML', SCHEMA_NAME => 'HR', OBJECT_NAME => 'EMPLOYEE');
I]Vi^hh^beaZZcdj\]#CdiZi]Vih^cXZlZheZX^[^ZY9BAZmea^X^ian!i]^hl^aah`^edcan9BAhdc =G#:BEADN::099AhiViZbZcihZcXdjciZgZY[dgi]^hiVWaZl^aahi^aaWZgZea^XViZY#>[lZlVciid h`^ei]dhZ!idd!lZXVc^hhjZi]Z[daadl^c\hiViZbZci/ SQL> EXECUTE DBMS_LOGSTDBY.SKIP(STMT => 'SCHEMA_DDL', SCHEMA_NAME => 'HR', OBJECT_NAME => 'EMPLOYEE');
L]Vi^[lZlVciidh`^eVaa9BAdeZgVi^dchdcVaadW_ZXih^ci]Z=GhX]ZbV4>i^hh^beaZ/ SQL> EXECUTE DBMS_LOGSTDBY.SKIP(STMT => 'DML', SCHEMA_NAME => 'HR', OBJECT_NAME => '%');
>[lZlVciidWZbdgZhZaZXi^kZVcYh`^eVaa9BAdeZgVi^dchdciVWaZhl^i]i]ZegZ[^mEMP! lZXVclg^iZi]Viidd/ SQL> EXECUTE DBMS_LOGSTDBY.SKIP(STMT => 'DML', SCHEMA_NAME => 'HR', OBJECT_NAME => 'EMP%');
LZl^aaadd`ViZmVbeaZhd[i]ZegdXZYjgZ^ckdXVi^dc^caViZghZXi^dch#Cdli]VilZ`cdl ]dlidheZX^[ni]ZeViiZgchi]Vi\dkZgcl]Vil^aacdiWZgZea^XViZYVii]Zad\^XVahiVcYWn YViVWVhZ!lZVgZ^cVedh^i^dcidVchlZgi]ZfjZhi^dclZedhZY^ci]Z[^ghihjWhZXi^dc/L]Vi dW_ZXihVgZcdiWZ^c\gZea^XViZYWZXVjhZd[i]ZegZhZcXZd[h`^egjaZh4
Determining Which Tables Are Not Being Replicated Because of Skip Rules ;^ghi!]ZgZ¼hi]Z XViVad\k^ZlidfjZgnid[^cYdjil]^X]h`^egjaZhVgZVXi^kZ^cndjgad\^XVahiVcYWnYViVWVhZ/ SQL> SELECT OWNER, NAME, USE_LIKE, ESC FROM DBA_LOGSTDBY_SKIP WHERE STATEMENT_OPT = 'DML'; &
>cdi]ZgldgYh!HFA6eeanYdZhcdiVaadlndjidigVch[dgbV9BAhiViZbZci^cidVY^[[ZgZci9BAhiViZbZci# =dlZkZg!^iVaadlhndjidYdhjX]VigVch[dgbVi^dcdcV99AhiViZbZci#
132
DgVXaZ9ViV<jVgY&&g=VcYWdd`
6ai]dj\]i]^hl^aah]dlndji]Zh`^egjaZh^cZ[[ZXi!i]ZfjZgnYdZhcdiegdk^YZi]Za^hid[ iVWaZhWZ^c\h`^eeZY#I]Vi^hVa^iiaZbdgZXdbea^XViZY#LZl^aaYdi]^h^cildhiZeh/;^ghi!lZl^aa h]dlndj]dlidYZiZgb^cZl]Zi]ZgViVWaZl^aabViX]Vcnd[i]ZeViiZgchVh^YZci^[^ZYWni]Z h`^egjaZh#HZXdcY!lZl^aa^iZgViZdkZgVaaiVWaZhi]ViVgZegZhZciVii]Zad\^XVahiVcYWnVcYVeean i]ZYZiZgb^cVcidcZVX]d[i]Zb#LZl^aaegZhZci^iVhi]gZZegdXZYjgZhid]^\]a^\]ii]ZhiZeh ^ckdakZY# 1. 8gZViZV[jcXi^dci]ViiV`ZhVhX]ZbVVcYViVWaZcVbZVcYgZijgchIGJ:^[i]ZiVWaZ^h h`^eeZYVii]Zad\^XVahiVcYWnVcY;6AH:di]Zgl^hZ/ CREATE OR REPLACE FUNCTION SYS.IS_TABLE_SKIPPED( TAB_OWNER IN VARCHAR2, TAB_NAME IN VARCHAR2) RETURN NUMBER IS COUNT_MATCH NUMBER := 0; BEGIN SELECT COUNT(*) INTO COUNT_MATCH FROM DBA_LOGSTDBY_SKIP S WHERE STATEMENT_OPT = 'DML' AND ERROR = 'N' AND 1 = CASE WHEN USE_LIKE = 'Y' THEN CASE WHEN ESC = 'Y' THEN CASE WHEN TAB_OWNER LIKE S.OWNER ESCAPE ESC AND TAB_NAME LIKE S.NAME ESCAPE ESC THEN 1 ELSE 0 END WHEN ESC = 'N' OR ESC IS NULL THEN CASE WHEN TAB_OWNER LIKE S.OWNER AND TAB_NAME LIKE S.NAME THEN 1 ELSE 0 END END WHEN USE_LIKE = 'N' THEN CASE WHEN TAB_OWNER = S.OWNER AND TAB_NAME = S.NAME THEN 1 ELSE 0 END ELSE 0 END; RETURN COUNT_MATCH; END IS_TABLE_SKIPPED;
2. CdlXgZViZi]ZcZXZhhVgnineZh[dgi]ZiVWaZ[jcXi^dci]Vil^aaVaadljhid^iZgViZdkZg VaaiVWaZh^ci]ZDBA_ALL_TABLESk^ZlVcYYZiZgb^cZl]Zi]Zgi]ZiVWaZ^hZmea^X^ian h`^eeZYVii]Zad\^XVahiVcYWn/ SQL> CREATE TYPE STANDBY_TAB AS OBJECT ( TABLE_OWNER VARCHAR2(32), TABLE_NAME VARCHAR2(32)); / SQL> CREATE TYPE STANDBY_SKIPPED_TAB AS TABLE OF STANDBY_TAB;
8]VeiZg)/ Ad\^XVaHiVcYWn
133
3. CdlXgZViZi]ZiVWaZ[jcXi^dc/ SQL> CREATE OR REPLACE FUNCTION GET_ALL_SKIPPED_TABS RETURN STANDBY_SKIPPED_TAB PIPELINED IS TYPE REF1 IS REF CURSOR; OUT_REC STANDBY_TAB := STANDBY_TAB(NULL, NULL); CUR1 REF1; BEGIN OPEN CUR1 FOR 'SELECT OWNER, TABLE_NAME FROM DBA_ALL_TABLES'; LOOP FETCH CUR1 INTO OUT_REC.TABLE_OWNER, OUT_REC.TABLE_NAME; EXIT WHEN CUR1%NOTFOUND; IF (SYS.IS_TABLE_SKIPPED(OUT_REC.TABLE_OWNER, OUT_REC.TABLE_NAME) <> 0) THEN PIPE ROW(OUT_REC); END IF; END LOOP; CLOSE CUR1; RETURN; END GET_ALL_SKIPPED_TABS; /
NdjXVccdljhZi]ZiVWaZ[jcXi^dcid\ZiVaah`^eeZYiVWaZh/' SQL> SELECT * FROM TABLE(SYS.GET_ALL_SKIPPED_TABS) ;
Adding a Previously Skipped Table to the Set of Replicated Tables CdllZ]VkZVlVnd[ `cdl^c\l]ViiVWaZhVgZh`^eeZYVii]Zad\^XVahiVcYWnYjZidZmea^X^ih`^egjaZh#L]Vi^[lZ X]Vc\Zdjgb^cYhb^YlVni]gdj\]4LZaa!^ihZZbhh^beaZ#6aalZcZZYidYd^hidjhZDBMS_ LOGSTDBY.UNSKIPVcYgZbdkZi]ZgjaZ[gdbdjghZid[h`^egjaZh#6cY^i^hVabdhii]Vih^beaZ# =dlZkZg!lZXVccdih^beanhiVgigZea^XVi^c\X]Vc\Zhidi]ZiVWaZ0lZ[^ghicZZYid\ZiVXj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ViVgZcdiWZ^c\gZea^XViZY[gdbi]Zeg^bVgnYViVWVhZ#6GUARDhZii^c\d[ALLi]ZYZ[Vjai[dgV ad\^XVahiVcYWn^hi]Zbdhihig^c\Zci!Vh^iegZkZcihjhZgbdY^[^XVi^dchidVaaiVWaZh^cVYViVWVhZ! gZea^XViZYWnHFA6eeandgcdi#I]ZNONEVcYALLhZii^c\hVgZVkV^aVWaZidVaaYViVWVhZheg^bVgn dgdi]Zgl^hZ!l]ZgZVhi]ZSTANDBYhZii^c\^hbZVc^c\[jadcandcVad\^XVahiVcYWnYViVWVhZ# NdjXVchZii]ZGUARDidSTANDBYWn^hhj^c\i]Z[daadl^c\HFAhiViZbZci/ SQL> ALTER DATABASE GUARD STANDBY;
NdjegdWVWanYdcdilVciidhZii]Zad\^XVahiVcYWnGUARDdci]Zeg^bVgnYViVWVhZ Zmea^X^ian#>[ndjlZgZidYdhd!^ildjaYfj^X`anWg^c\egdYjXi^dcidV]Vai# SQL> CONNECT SYS/ORACLE AS SYSDBA CONNECTED. SQL> ALTER DATABASE GUARD STANDBY; DATABASE ALTERED. SQL> CONNECT SCOTT/TIGER CONNECTED. SQL> UPDATE EMP SET SAL=9999 WHERE EMPNO=7902; UPDATE EMP SET SAL=9999 WHERE EMPNO=7902 * ERROR AT LINE 1: ORA-16224: DATABASE GUARD IS ENABLED
NdjldjaY\Zii]ZhVbZgZhjaihl^i]ALLdci]Zeg^bVgnYViVWVhZ#D[XdjghZALL^hVkZgn fj^X`lVnidbV`ZndjgegdYjXi^dcYViVWVhZVgZVY"dcanYViVWVhZl^i]djiVh]jiYdlc#
Myth Buster: Standard Log-based Replication Can Give You an Equivalent to Logical Standby – Part 2 L^i]djiDgVXaZ¼h^ciZ\gViZYHFA6eeanhdaji^dc!VgZea^XVi^dchdaji^dcXVccdiegdk^YZi]Z Wj^ai"^cegdiZXi^dcd[i]ZGUARD#
8]VeiZg)/ Ad\^XVaHiVcYWn
135
Replicating Unsupported Tables AZi¼hadd`Vii]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WaZ!VcZcign^h^chZgiZY^cid >I#:BEADN::HidhiVgiVldg`dgYZgidVaadXViZVcZlXdbejiZg[dgi]ZZbeadnZZ#Hd^ci]ZgZYd higZVb!ndjl^aahZZgZYdgZXdgYhgZaViZYidi]Zdg^\^cVa^chZgiid=G#:BEADN::H[daadlZYWnV ig^\\ZgZY^chZgiid>I#:BEADN::H# NdjdWk^djhanYdcdilVciHFA6eeanid[^gZi]Zig^\\ZgVii]Zad\^XVahiVcYWnYViVWVhZ l]Zc^i^chZgihi]Zgdl^ci]Z=G#:BEADN::HiVWaZ!h^cXZ^i^h\d^c\idZcXdjciZgi]Z^chZgiid
Myth Buster: Standard Log-based Replication Can Give You an Equivalent to Logical Standby – Part 3 I]^gY"eVgingZea^XVi^dcegdYjXihYdcdi]VkZi]ZVW^a^inidY^hVWaZ[^g^c\d[i]Zig^\\Zgh#Hdid YZeadni]Zb!ndjl^aa]VkZidY^hVWaZi]Zig^\\ZghndjghZa[#I]^hXVcWZegdWaZbVi^X! ]dlZkZg!h^cXZdcVgdaZigVch^i^dc!WZ[dgZVeea^XVi^dchXVcXdccZXiidi]ZcZleg^bVgn YViVWVhZ!ndjl^aa]VkZidgjcVEA$HFAegdXZYjgZidZcVWaZVaaig^\\Zghi]Vindj]VY egZk^djhanY^hVWaZY#I]^h^cXgZVhZhndjgYdlci^bZ#
)
LZgZVa^oZi]Vii]^h^hkV\jZ#=dlZkZg!l]Zi]Zgi]ZgViZ^h]^\]dgadlYZeZcYhhdbjX]dcndjgYViVVcY ]VgYlVgZXdc[^\jgVi^dci]VilZVgZjcVWaZidWZbdgZheZX^[^X# * HZZi]ZB66eVeZg¹:miZcYZY9ViVineZHjeedgi/HFA6eeanVcYHigZVbhºVilll#dgVXaZ#Xdb$iZX]cdad\n$ YZeadn$VkV^aVW^a^in$eY[$bVVTZYihdkZgk^Zl#eY[#
136
DgVXaZ9ViV<jVgY&&g=VcYWdd`
i]Z>I#:BEADN::H^ci]ZgZYdad\VcnlVn#=dlZkZg!ndjYdlVcii]Zig^\\ZgidWZegZhZciVii]Z ad\^XVahiVcYWnYViVWVhZ!^cXVhZndjhl^iX]dkZgdg[V^adkZgid^i# Hdl]ViYdZhi]^h]VkZidYdl^i]gZea^XVi^c\jchjeedgiZYYViVineZh4LZaa!VigVY^i^dcVa 9BAig^\\Zg]Vhl]ViDgVXaZXVaahi]Zfire_once_onlyegdeZgin/i]ZG97BH[^gZhi]Zbdcan l]ZcVgZ\jaVgjhZgegdXZhh^hhjZhV9BAdeZgVi^dc#I]ZhZig^\\ZghVgZVjidbVi^XVaanY^hVWaZY^c i]ZXdciZmid[HFA6eeanegdXZhhZh#=dlZkZg!ndjXVcXgZViZVig^\\ZgVcYhZii]Zfire_once_ onlyegdeZginidFALSE#+>ci]^hXVhZ!DgVXaZG97BHl^aa[^gZi]Zig^\\ZgcdbViiZgl]^X] egdXZhh^h^hhj^c\i]Z9BA# Cdli]Vindj`cdlndjXVclg^iZVig^\\Zgi]Vil^aaVahd[^gZVii]Zad\^XVahiVcYWnYViVWVhZ ^ci]ZXdciZmid[i]ZHFA6eeanegdXZhhZh!aZi¼hZmeadgZ]dl^iXVcWZjhZYidbV^ciV^cVc di]Zgl^hZjchjeedgiZYiVWaZ#,;dgZVX]iVWaZndjlVciidgZea^XViZjh^c\ig^\\Zghi]Vi[^gZVii]Z ad\^XVahiVcYWn!ndjl^aacZZYidXgZViZi]gZZhX]ZbVdW_ZXih/ N
A logging table I]^hl^aaWZjhZYidXVeijgZi]ZigVch[dgbZYbdY^[^XVi^dcidi]ZWVhZ iVWaZhjX]i]ViHFA6eeanXVcgZea^XViZi]Zad\\^c\iVWaZ#
N
A base table trigger I]^hl^aa[^gZVii]Zeg^bVgnYViVWVhZidXVeijgZi]ZX]Vc\Zh^ci]Z ad\\^c\iVWaZ#
N
A logging table trigger I]^hl^aa[^gZViWdi]i]Zeg^bVgnVcYi]Zad\^XVahiVcYWn YViVWVhZh!Wji^il^aacZZYidWZlg^iiZc^chjX]VlVni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i]Zfire_once_onlyegdeZginhZiidFALSE#NdjbjhiiV`Zi]gZZhiZeh idhZii]Zig^\\Zg/NdjXgZViZVig^\\ZgVhY^hVWaZY#NdjX]Vc\Zi]Zfire_once_onlyegdeZginidFALSE#I]Zc ndjZcVWaZi]Zig^\\Zg# , HjeedhZ![dgZmVbeaZ!i]Vindj]VkZViVWaZi]ViXdciV^chdcZdgbdgZXdajbchd[i]ZjchjeedgiZYYViVineZh#
8]VeiZg)/ Ad\^XVaHiVcYWn
137
N SDO_GEOMETRYXdajbchXVcWZgZegZhZciZYVhVX]VgVXiZgaVg\ZdW_ZXi8AD7# JhZi]ZTO_WKTGEOMETRY^ci]ZWVhZiVWaZig^\\ZgVcYFROM_WKTGEOMETRY ^ch^YZi]Zad\\^c\iVWaZig^\\Zg#7di]egdXZYjgZhVgZYZ[^cZY^ci]ZH9DTJI>A eVX`V\Z!^ci]ZB9HNHhX]ZbV# N NdjcZZYVYY^i^dcVaXdajbch^ci]Zad\\^c\iVWaZid^YZci^[ni]Zgdld[i]ZWVhZiVWaZ# I]ZhZVgZcZZYZYidegdXZhhi]ZUPDATEVcYDELETEhiViZbZcihXdggZXian#AZi¼hXVaa i]ZhZXdajbchidentification columns. N ;dgiVWaZhl^i]Veg^bVgn`Zn!i]ZXdajbchbV`^c\jei]Zeg^bVgn`Znh]djaYWZi]Z ^YZci^[^XVi^dcXdajbch# N >[ndjgiVWaZYdZhcdi]VkZVeg^bVgn`Zn!Wji]VhVcdc"cjaajc^fjZ^cYZm!bV`Z i]ZhZXdajbchndjg^YZci^[^XVi^dcXdajbch# N >[ndjgiVWaZYdZhcdi]VkZZ^i]ZgVeg^bVgn`Zndgcdc"cjaajc^fjZ^cYZm!ndjl^aa cZZYidjhZVaaXdajbch^cndjg^YZci^[^XVi^dchZi#-
Characteristics of the Trigger on the Base Table I]ZWVhZiVWaZig^\\ZgXVcZm^hiViWdi]i]Z eg^bVgnVcYi]Zad\^XVahiVcYWnYViVWVhZh#H^cXZi]^h^hVgZ\jaVg9BAig^\\Zg!^il^aacdi[^gZ^c i]ZXdciZmid[VHFA6eeanegdXZhh# N I]Zig^\\Zgh]djaYWZVgZ\jaVgig^\\Zgl^i]i]Zfire_once_onlyegdeZginhZiidTRUE# N ;dgVcn9BAdci]ZWVhZiVWaZ!i]Zig^\\Zgh]djaY N [^ghi^chZgiVgdl^ci]Zad\\^c\iVWaZ^YZci^[n^c\i]ZdeZgVi^dcVcYad\\^c\VaakVajZh cZZYZYidgZeaVni]ZdeZgVi^dc^ch^YZi]Zad\\^c\iVWaZig^\\ZgVii]Zad\^XVahiVcYWn YViVWVhZ0 N cZmiYZaZiZi]Zgdl[gdbi]Zad\\^c\iVWaZidegZkZcii]Zh^oZd[i]Zad\\^c\iVWaZ [gdb^cXgZVh^c\#
Characteristics of the Trigger on the Logging Table [daadl^c\X]VgVXiZg^hi^Xh/
I]Zad\\^c\iVWaZig^\\Zgbjhi]VkZi]Z
N I]Zfire_once_onlyegdeZginh]djaYWZhZiidFALSE# N I]Zig^\\Zgh]djaYcdieZg[dgbVcnX]Vc\ZhVii]Zeg^bVgnYViVWVhZ#NdjXVcYZiZgb^cZ l]Zi]Zgi]Zig^\\ZgcZZYhideZg[dgbVcnVXi^dcWn^ckd`^c\i]Zdbms_logstdby.is_ apply_server[jcXi^dc^ch^YZi]Zig^\\ZgWdYn# N I]Zig^\\ZgcZZYhideZg[dgbi]ZXdggZhedcY^c\VXi^dc^ci]ZWVhZiVWaZVh^cY^XViZYWn i]ZDML_TYPEXdajbc^ci]Zad\\^c\iVWaZ#>[ndjVgZldg`^c\dcAD7XdajbchjhZY idgZea^XViZVARRAYdgSDO_GEOMETRY!ndjl^aacZZYi]Zig^\\ZgideZg[dgbVhZXdcY UPDATEhiViZbZci[daadl^c\Vcn^chZgidgUPDATEd[i]ZWVhZiVWaZ#
Example of Trigger-based Replication in Action I]Z[daadl^c\ZmVbeaZh]dlhi]Zad\\^c\ iVWaZYZ[^c^i^dcVcYig^\\ZghdjgXZ[dgi]Z:BEADN::iVWaZ^ci]ZI:HIhX]ZbV!l]^X]XdciV^ch
-
>ci]^hXVhZ!ndjgWVhZiVWaZWZiiZgWZhbVaa^ch^oZdg]VkZVkZgnadljeYViZgViZ!h^cXZndjVgZ\d^c\id^cXjgi]Z Xdhid[V[jaa"iVWaZhXVc[dgZkZgnjeYViZY$YZaZiZYgdl#
138
DgVXaZ9ViV<jVgY&&g=VcYWdd`
VcdW_ZXiXdajbci]Vi^hi]ZjhZg"YZ[^cZYineZNAME_TYP#I]ZiVWaZ]VhVeg^bVgn`ZnYZ[^cZY dci]ZXdajbc>9# 1. 9ZiZgb^cZi]ZWVhZiVWaZYZ[^c^i^dcVcYi]ZYZ[^c^i^dcd[i]ZjhZg"YZ[^cZYineZjhZYWn i]ZiVWaZ/ SQL> SET LONG 32009 SQL> SELECT DBMS_METADATA.GET_DDL(OBJECT_TYPE => 'TABLE', NAME => 'EMPLOYEE', SCHEMA => 'TEST') AS TABLE_DEF FROM DUAL; TABLE_DEF -----------------------------------------------------------------------CREATE TABLE "SYS"."EMP" ( "ID" NUMBER, "NAME" "TEST"."NAME_TYP" , CONSTRAINT "TEST_EMP_PK" PRIMARY KEY ("ID") USING 10 TABLESPACE "TEST_TBS" ENABLE ) 11 TABLESPACE "TEST_TBS" SQL> SELECT DBMS_METADATA.GET_DDL(OBJECT_TYPE => 'TYPE', NAME => 'NAME_TYP', SCHEMA => 'TEST') AS TYP_DEF FROM DUAL; TYP_DEF ---------------------------------------------------------------------------CREATE OR REPLACE TYPE "TEST"."NAME_TYP" AS OBJECT ( FIRST_NAME VARCHAR2(32), LAST_NAME VARCHAR2(32));
H^cXZndjjhZYDBMS_METADATA.GET_DDLndjVagZVYn`cdli]Zeg^bVgn`Zn[dgi]Z iVWaZ/^ci]^hXVhZ!^iXdch^hihd[dcZXdajbc!>9#I]Zad\\^c\iVWaZbjhiigVX`i]ZdaYVcY cZlkVajZhd[>9i]ZdaYkVajZ^hidYZiZgb^cZi]ZgdlidWZbdY^[^ZY#>[ViVWaZYdZh cdi]VkZVeg^bVgn`ZnYZ[^cZY!ndjl^aad[XdjghZcZZYidjhZVcdc"cjaajc^fjZ^cYZm# Gjci]Z[daadl^c\hiViZbZcidci]Zeg^bVgnYViVWVhZidXgZViZi]Zad\\^c\iVWaZ#HFA 6eeanl^aaXgZViZi]ZiVWaZVjidbVi^XVaandci]ZhiVcYWnYViVWVhZ#I]Zad\\^c\iVWaZ XdciV^chdcanWj^ai"^cYViVineZhhjeedgiZYWnHFA6eean#I]ZViig^WjiZhfirst_name! last_name[gdbi]ZNAME_TYPjhZg"YZ[^cZYineZVgZgZegZhZciZYVhhZeVgViZXdajbch log_first_name!log_last_name^ci]Zad\\^c\iVWaZjh^c\i]ZhVbZWj^ai"^cYViV ineZVhi]ZtypeViig^WjiZ#
.
LZcZZYidhZii]^h!h^cXZdbms_metadata.get_ddlgZijgchV8AD7!VcYWnYZ[VjaiHFAEajhh]dlhdcani]Z [^ghi-%X]VgVXiZghd[V8AD7Xdajbc# &% ;dggZVYVW^a^in!lZYdcdih]dli]ZXdbeaZiZdjieji]ZgZ# && LZ]VkZigjcXViZYi]Zdjieji]ZgZVhlZaa#
8]VeiZg)/ Ad\^XVaHiVcYWn
139
6aagZbV^c^c\Xdajbch[gdbi]ZWVhZiVWaZ^cdjgXVhZdeptVgZgZegZhZciZY^ci]Z ad\\^c\iVWaZlog_deptjh^c\i]ZhVbZYViVineZjhZY^ci]ZWVhZiVWaZ# SQL> CREATE TABLE TEST.LOG_EMPLOYEE ( ACTION VARCHAR2(1), LOG_ID_OLD NUMBER, LOG_ID_NEW NUMBER, LOG_FIRST_NAME VARCHAR2(32), LOG_LAST_NAME VARCHAR2(32), LOG_DEPT NUMBER); SQL> ALTER TABLE ADD CONSTRAINT TEST_LOG_EMP_PK PRIMARY KEY (LOG_ID_OLD);
2. 8gZViZi]ZWVhZiVWaZig^\\Zgi]Vil^aaWZ[^gZYdci]Zeg^bVgnYViVWVhZ[dgVcn9BA V\V^chii]ZWVhZiVWaZI:HI#:BEADN::^cdjgZmVbeaZ#I]Zig^\\Zgl^aa^chZgiVgdl^c i]Zad\\^c\iVWaZ[dgZVX]gdlbdY^[^ZYdci]ZWVhZiVWaZ# SQL> CREATE OR REPLACE TRIGGER TEST.EMPLOYEE_PRIMARY_TRIG AFTER DELETE OR INSERT OR UPDATE ON EMPLOYEE FOR EACH ROW DISABLE12 DECLARE L_THIS_ROW ROWID := NULL; BEGIN -- INSERT: 'I', LOG_ID_OLD AND LOG_ID_NEW BOTH GET THE SAME VALUE IF INSERTING THEN -- INSERT (ACTION = 'I'): INSERT INTO TEST.LOG_EMPLOYEE VALUES ('I' , :NEW.ID, :NEW.ID, :NEW.ID, :NEW.NAME.FIRST_NAME, :NEW.NAME.LAST_NAME, :NEW.DEPT) RETURNING ROWED INTO L_THIS_ROW; ELSIF UPDATING THEN -- UPDATE (ACTION = 'U'): LOG_ID_OLD AND LOG_ID_NEW ARE DIFFERENT INSERT INTO TEST.LOG_EMPLOYEE VALUES ('U' , :NEW.ID, :NEW.ID, :NEW.NAME.FIRST_NAME, :NEW.NAME.LAST_NAME, :NEW.DEPT) RETURNING ROWID INTO L_THIS_ROW; ELSIF DELETING THEN -- DELETE (ACTION = 'D'): AND WE ONLY NEED LOG_ID_OLD VALUE TO BE LOGGED INSERT INTO TEST.LOG_EMPLOYEE(ACTION, LOG_ID_OLD) VALUES ('D', :OLD.ID); END IF; -- DELETE THE ROW FROM THE LOGGING TABLE. -- THE STANDBY TRIGGER WILL NOT FIRE ON THE DELETE. DELETE FROM TEST.LOG_EMPLOYEE WHERE ROWED = L_THIS_ROW; END; /
&'
NdjcZZYidXgZViZi]^hVhY^hVWaZY^cdgYZgidhncX]gdc^oZi]ZXVeijg^c\d[i]ZX]Vc\Zhl^i]i]Z^chiVci^Vi^dcd[ i]ZjchjeedgiZYiVWaZhVii]Zad\^XVahiVcYWnYViVWVhZ#
140
DgVXaZ9ViV<jVgY&&g=VcYWdd` 3. 8gZVi^c\i]Zad\\^c\iVWaZig^\\Zg#NdjXVcXgZViZ^iVii]Zeg^bVgnYViVWVhZVcY]VkZHFA 6eeangZea^XViZ^iVjidbVi^XVaan#>i^h[^gZYdci]Zad\^XVahiVcYWnYViVWVhZ[dgVcn9BA V\V^chii]Zad\\^c\iVWaZ:BEADN::TAD<^ci]^hZmVbeaZi]VidXXjghdci]ZhiVcYWn YViVWVhZ# CREATE OR REPLACE TRIGGER TEST.EMPLOYEE_STANDBY_TRIG AFTER INSERT OR UPDATE ON TEST.EMPLOYEE_LOG FOR EACH ROW BEGIN -- ONLY RUN ON STANDBY DATABASE IF DBMS_LOGSTDBY.IS_APPLY_SERVER() THEN IF INSERTING THEN CASE :NEW.ACTION -- IF INSERT ACTION, INSERT THE NEW ROW WHEN 'I' THEN INSERT INTO PLAYERS VALUES (:NEW.LOG_ID_NEW, NAME_TYP( :NEW.LOG_FIRST_NAME, :NEW.LOG_LAST_NAME), :NEW.LOG_DEPT ); -- IF UPDATE ACTION, THEN UPDATE ROW IN BASE TABLE WHEN 'U' THEN UPDATE TEST.EMPLOYEE E SET E.ID = :NEW.LOG_ID_NEW, E.NAME.FIRST_NAME = :NEW.LOG_FIRST_NAME, E.NAME.FIRST_NAME = :NEW.LOG_LAST_NAME, E.DEPT = :NEW.LOG_DEPT WHERE E.ID = :NEW.LOG_ID_OLD; -- IF DELETE ACTION, THEN DELETE ROW FROM BASE TABLE WHEN 'D' THEN DELETE FROM PLAYERS WHERE ID = :NEW.LOG_ID_OLD; END CASE; END IF; END IF; END; /
4. HZii]Zfire_once_onlyegdeZgind[i]Zad\\^c\iVWaZig^\\ZgidFALSE#NdjcZZYidYd i]^hdcWdi]i]Zeg^bVgnVcYi]Zad\^XVahiVcYWnYViVWVhZh# SQL> EXECUTE DBMS_DDL.SET_TRIGGER_FIRING_PROPERTY (SCHEMA_NAME => 'TEST', TRIGGER_NAME => 'EMPLOYEE_STANDBY_TRIG', FIRE_ONCE => FALSE);
5. LOCK TABLE TEST.EMPLOYEE IN SHARE MODE;
8]VeiZg)/ Ad\^XVaHiVcYWn
141
B. (SESSION#1) WE NEED TO SWITCH THE LOGFILE HERE, TO GET THE SCN TO BUMP UP SQL> ALTER SYSTEM SWITCH LOGFILE; C. (SESSION#1) WE CAN NOW QUERY V$DATABASE TO GET THE CURRENT SCN OF THE DATABASE SQL> SELECT CURRENT_SCN FROM V$DATABASE; CURRENT_SCN ---------------------------------52018672 D. (SESSION#2) ENABLE THE LOGGING TABLE TRIGGER SQL> ALTER TRIGGER TEST.EMPLOYEE_PRIM_TRIG ENABLE; E. (SESSION#1) ISSUE COMMIT TO RELEASE THE LOCK. SO THE WRITE OUTAGE ON THE TABLE IS MINIMAL. SQL> COMMIT; -- RELEASE THE LOCK F. (SESSION#1) USE THE SCN OBTAINED IN STEP C, TO EXPORT THE CONTENTS OF THE TABLE USING THE FLASHBACK_SCN CLAUSE OF DATAPUMP EXPORT SQL> EXPDP TEST/TEST TABLES=EMPLOYEE DIRECTORY=DPUMP_DIR1 DUMPFILE=EMP_SCN.DMP FLASHBACK_SCN = 52018672
6. >bedgii]ZYViV[dgI:HI#:BEADN::Vii]Zad\^XVahiVcYWnYViVWVhZ/ SQL> IMPDP TEST/TEST TABLES=EMPLOYEE DIRECTORY=DPUMP_DIR1 DUMPFILE=EMP_SCN.DMP
7. GZhiVgiHFA6eean SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
Customizing Your Logical Standby Database (or Creating a Local Dataset at the Logical Standby) Cdli]Vindj`cdl]dlidYZiZgb^cZl]ViYViVhZindjgad\^XVahiVcYWnYViVWVhZ^hbV^ciV^c^c\! ^i^hi^bZidZmeadgZi]ZXVeVW^a^i^Zhi]VibVYZndjlVciidYZeadnVad\^XVahiVcYWnYViVWVhZ^c i]Z[^ghieaVXZ/i]ZVW^a^inidXjhidb^oZ^iidd[[adVYegdXZhh^c\[gdbi]Zeg^bVgnYViVWVhZ#
Creating Materialized Views on the Logical Standby Database HFA6eeanYdZhcdigZea^XViZVcn99AhgZaViZYidi]ZbViZg^Va^oZYk^ZlhBKhdgBKad\h#&( =dlZkZg!ndjVgZ[gZZidXgZViZBKhVcYBKad\hdcbV^ciV^cZYiVWaZhVii]Zad\^XVahiVcYWn YViVWVhZ!VcYi]ZhZadXVaBKhl^aaWZgZ[gZh]ZY^cVlVni]VindjZmeZXi/Dc"Xdbb^igZ[gZh]l^aa WZig^\\ZgZYVhHFA6eeanegdXZhhZhXdbb^iVigVchVXi^dcl^i]bdY^[^XVi^dchidVWVhZiVWaZ0
&(
=dlZkZg!h^cXZVad\^XVahiVcYWn^hXgZViZY[gdbVe]nh^XVahiVcYWn!i]ZBKhVcYBKad\hi]VilZgZXgZViZYVi i]Zeg^bVgnYViVWVhZWZ[dgZndjXdckZgiZYndjge]nh^XVahiVcYWnYViVWVhZ^cidVad\^XVahiVcYWnl^aagZbV^c^ci]Z ad\^XVahiVcYWnYViVWVhZ#
142
DgVXaZ9ViV<jVgY&&g=VcYWdd`
dc"YZbVcY^cXgZbZciVadg[jaagZ[gZh]ZhXVcWZhX]ZYjaZYVii]Zad\^XVahiVcYWnYViVWVhZjh^c\ 97BHTH8=:9JA:GdgndjXVc^hhjZi]ZgZ[gZh]Y^gZXian# SQL> EXECUTE DBMS_RNVIEW.REFRESH (LIST => 'CUSTOMER.TRADE_TRACK_MV', METHOD => 'F');
NZh!^i^hi]Vih^beaZ
Creating Scheduler Jobs on the Logical Standby Database NdjXVcXgZViZVhX]ZYjaZg_dWdci]Zad\^XVahiVcYWn^ci]ZjhjValVn#=dlZkZg!ndjcZZYid `cdlVa^iiaZW^ibdgZVWdji97BHT?D7HVcY97BHTH8=:9JA:GVcYi]Z^g^ciZgVXi^dcl^i]i]Z ad\^XVahiVcYWnYViVWVhZ# ?dWhXgZViZYl^i]i]Z97BHT?D7HeVX`V\ZVii]Zeg^bVgnVgZgZea^XViZYVjidbVi^XVaandc i]Zad\^XVahiVcYWnYViVWVhZ#I]^hlVn!i]Z_dWhVgZVkV^aVWaZdci]Zad\^XVahiVcYWnl]Zcndj hl^iX]dkZgdg[V^adkZgid^i#NdjXVcVahdXgZViZadXVa_dWhdcndjgad\^XVahiVcYWnYViVWVhZ# ?dWhXgZViZYl^i]i]Z97BHTH8=:9JA:GeVX`V\ZVii]Zeg^bVgnYViVWVhZVgZcdigZea^XViZY idi]Zad\^XVahiVcYWnYViVWVhZ#=dlZkZg!_dWhXgZViZYl^i]97BHTH8=:9JA:GVgZgdaZ"VlVgZ# 7nYZ[Vjai!hX]ZYjaZg_dWhXgZViZYdcVYViVWVhZ^c]Zg^ii]ZgdaZd[i]ZYViVWVhZ!hdhX]ZYjaZg_dWh XgZViZYVii]Zeg^bVgnYViVWVhZl^aa]VkZPRIMARYVhi]Z^gdatabase_roleVcYi]dhZXgZViZYVi i]ZhiVcYWnYViVWVhZl^aa]VkZLOGICAL STANDBYVhi]Z^gdatabase_roleViig^WjiZ#6_dWXVc WZXdbZZmZXjiVWaZdcanl]Zc^ihdatabase_rolebViX]Zhi]ZViig^WjiZ^ci]ZV$DATABASE k^Zl#HjeedhZ![dgZmVbeaZ!i]Vindj]VkZildYViVWVhZh!BVig^mVcYBVig^mT9G%!l^i]BVig^m WZ^c\i]ZXjggZcieg^bVgnVcYBVig^mT9G%WZ^c\i]ZXjggZciad\^XVahiVcYWnYViVWVhZ# N
Case 1: NdjlVcihX]ZYjaZg_dWREFRESH_TRADE_TRACK_MVidgjcdci]Zeg^bVgn gZ\VgYaZhhd[l]^X]dcZd[i]ZYViVWVhZh^hi]Zeg^bVgnYViVWVhZ/ (A) AT MATRIX: EXECUTE DBMS_SCHEDULER.CREATE_JOB (JOB_NAME => 'REFRESH_TT_MV_PRIM', JOB_TYPE => 'PLSQL_BLOCK', ENABLED => FALSE, AUTO_DROP => FALSE, START_DATE => SYSDATE, LIST => 'CUSTOMER.TRADE_TRACK_MV',REPEAT_INTERVAL => 'FREQ=HOURLY;INTERVAL=>12' , JOB_ACTION => 'BEGIN DBMS_MVIEW.REFRESH( LIST => 'CUSTOMER.TRADE_TRACK_MV', METHOD => 'F'); END; '); SQL> EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE(NAME => 'REFRESH_TT_MV_PRIM', ATTRIBUTE => 'ENABLED', VALUE => 'TRUE'); (B) AT MATRIX_DR0: SQL> EXECUTE DBMS_SCHEDULER.CREATE_JOB ((JOB_NAME => 'REFRESH_TT_MV_STDBY', JOB_TYPE => 'PLSQL_BLOCK', ENABLED => FALSE, AUTO_DROP => FALSE, START_DATE => SYSDATE, REPEAT_INTERVAL => 'FREQ=HOURLY;INTERVAL=>12', JOB_ACTION => 'BEGIN DBMS_MVIEW.REFRESH( LIST => 'CUSTOMER.TRADE_TRACK_MV', METHOD => 'F'); END; '); SQL> EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE(NAME => 'REFRESH_TT_MV_STDBY', ATTRIBUTE => 'DATABASE_ROLE', VALUE => 'PRIMARY'); SQL> EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE(NAME => 'REFRESH_TT_MV_STDBY', ATTRIBUTE => 'ENABLED', VALUE => 'TRUE');
8]VeiZg)/ Ad\^XVaHiVcYWn
143
CdiZi]ViVii]Zad\^XVahiVcYWnBVig^mT9G%!ndjcZZYZYVcVYY^i^dcVahiZed[X]Vc\^c\ i]Zdatabase_roleViig^WjiZ[dgi]Z_dWidPRIMARYVh^il^aaYZ[Vjaiidi]ZgdaZd[i]Z YViVWVhZ!l]^X]^hXjggZcianLOGICAL STANDBY# N
Case 2: NdjlVcihX]ZYjaZg_dWCHECK_SQL_APPLY_PROGRESSidgjcdci]ZYViVWVhZ i]Vi]VeeZchidWZi]Zad\^XVahiVcYWnYViVWVhZViVcn\^kZcbdbZci/ SQL> CREATE TABLE SYSTEM.SQL_APPLY_PROGRESS_GATHER AS SELECT SYSDATE, TIME_COMPUTED, NAME, VALUE FROM V$DATAGUARD_STATS; SQL > CREATE OR REPLACE PROCEDURE SYSTEM.SQL_APPLY_PROGRESS_GATHER AS BEGIN EXECUTE IMMEDIATE 'INSERT INTO SYSTEM.SQL_APPLY_PROGRESS_GATHER SELECT SYSDATE, TIME_COMPUTED, NAME, VALUE FROM V$DATAGUARD_STATS; COMMIT; END; /
6iWdi]BVig^mVcYBVig^mT9G%/ SQL> EXECUTE DBMS_SCHEDULER.CREATE_JOB (JOB_NAME => 'SQL_APPLY_STATS', JOB_TYPE => 'PLSQL_BLOCK', ENABLED => FALSE, AUTO_DROP => FALSE, START_DATE => SYSDATE, REPEAT_INTERVAL => 'FREQ=MINUTELY;INTERVAL=>15', JOB_ACTION => 'BEGIN SYSTEM.SQL_APPLY_PROGRESS_GATHER; END; '); SQL> EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE(NAME => 'SQL_APPLY_STATS', ATTRIBUTE => 'DATABASE_ROLE', VALUE => 'STANDBY'); SQL> EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE(NAME => 'SQL_APPLY_STATS', ATTRIBUTE => 'ENABLED', VALUE => 'TRUE');
CdiZ^ci]^hZmVbeaZi]VilZXdjaY]VkZXgZViZYi]Z_dWVhENABLEDl]ZclZXgZViZY^i ViBVig^mT9G%VcYh`^eeZYi]ZcZmiildhiZeh!h^cXZ^ildjaY]VkZ^c]Zg^iZYi]ZXdggZXi database_roleViig^WjiZi]ZgZ# N
Case 3:NdjlVcihX]ZYjaZg_dWUPDATE_BILLING_SUMMARYidgjcdcdcanBVig^mT9G% VcYdcanl]ZcBVig^mT9G%^hVad\^XVahiVcYWnYViVWVhZ/ AT MATRIX_DR0 SQL> EXECUTE DBMS_SCHEDULER.CREATE_JOB (JOB_NAME => 'UPDATE_BILLING_SUMMARY', JOB_TYPE => 'PLSQL_BLOCK', ENABLED => FALSE, AUTO_DROP => FALSE, START_DATE => SYSDATE, REPEAT_INTERVAL => 'FREQ=HOURLY;INTERVAL=>24', JOB_ACTION => 'BEGIN SYSTEM.UPD_BILLING_SUMMARY; END; ');
N
Case 4:NdjlVcihX]ZYjaZg_dWUPDATE_BILLING_SUMMARYidgjcdcandcBVig^mT 9G%!gZ\VgYaZhhd[i]ZgdaZd[i]ZYViVWVhZ/ AT MATRIX_DR0 SQL> EXECUTE DBMS_SCHEDULER.CREATE_JOB (JOB_NAME => 'UPDATE_BILLING_SUMMARY', JOB_TYPE => 'PLSQL_BLOCK', ENABLED => FALSE, AUTO_DROP => FALSE, START_DATE => SYSDATE, REPEAT_INTERVAL => 'FREQ=HOURLY;INTERVAL=>24', JOB_ACTION => 'BEGIN SYSTEM.UPD_BILLING_SUMMARY; END; ');
144
DgVXaZ9ViV<jVgY&&g=VcYWdd` SQL> EXECUTE DBMS_SCHEDULER.CREATE_JOB (JOB_NAME => 'UPDATE_BILLING_SUMMARY', JOB_TYPE => 'PLSQL_BLOCK', ENABLED => FALSE, AUTO_DROP => FALSE, START_DATE => SYSDATE, REPEAT_INTERVAL => 'FREQ=MINUTELY;INTERVAL=>15', JOB_ACTION => 'BEGIN SYSTEM.SQL_APPLY_PROGRESS_GATHER; END; '); SQL> EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE(NAME => 'UPDATE_BILLING_ SUMMARY', ATTRIBUTE => 'DATABASE_ROLE', VALUE => 'PRIMARY'); SQL> EXECUTE DBMS_SCHEDULER.SET_ATTRIBUTE(NAME => 'UPDATE_BILLING_ SUMMARY', ATTRIBUTE => 'ENABLED', VALUE => 'TRUE');
Offloading Log-based Replication (Streams Capture) to the Logical Standby NdjbVnWZ[Vb^a^Vgl^i]DgVXaZHigZVbhXVeijgZ!l]^X]^hDgVXaZ¼had\"WVhZYbjai^"bVhiZg gZea^XVi^dchdaji^dc#HigZVbhXVeijgZVcYVeean]VkZVadi^cXdbbdcl^i]9ViV<jVgYad\^XVa hiVcYWn!h^cXZWdi][ZVijgZhiV`ZVYkVciV\Zd[Vadid[i]ZXdbbdc^c[gVhigjXijgZ^ch^YZi]Z DgVXaZG97BH#NdjXVcjhZVad\^XVahiVcYWnYViVWVhZ^cXdc_jcXi^dcl^i]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hndj\di]gdj\]gdaZigVch^i^dch#;dg ^chiVcXZ!^[ndjXgZViZYVHigZVbhXVeijgZdcBVig^mT9G%l]Zc^ilVhVad\^XVahiVcYWn!i]Z HigZVbhXVeijgZl^aagZbV^cdcBVig^mT9G%!ZkZcl]ZcBVig^mT9G%WZXdbZhi]Zeg^bVgnVhV gZhjaid[VgdaZigVch^i^dcdeZgVi^dchjX]Vhhl^iX]dkZgVcY[V^adkZg#;dgi]ZHigZVbhXVeijgZid Xdci^cjZldg`^c\dci]Zad\^XVahiVcYWn!ndjl^aacZZYidlg^iZVgdaZigVch^i^dcig^\\Zga^`Zi]Z [daadl^c\/ CREATE OR REPLACE TRIGGER STREAMS_AQ_JOB_ROLE_CHANGE1 AFTER DB_ROLE_CHANGE ON DATABASE DECLARE CURSOR CAPTURE_AQ_JOBS IS SELECT JOB_NAME, DATABASE_ROLE FROM DBA_SCHEDULER_JOB_ROLES WHERE JOB_NAME LIKE 'AQ_JOB%';
&)
I]Ze]nh^XVahiVcYWnYViVWVhZ]Vhi]ZhVbZ97>9VcY\adWVaYViVWVhZcVbZVhi]Zeg^bVgnYViVWVhZ!hdi]Z HigZVbhXVeijgZl^aacdiZkZcgZVa^oZi]ViVhl^iX]dkZgdg[V^adkZg]Vh]VeeZcZYjcYZgcZVi]^i#>ildjaYadd`a^`Z hdbZdcZh^beanWdjcXZYi]ZYViVWVhZ^chiVcXZh#
8]VeiZg)/ Ad\^XVaHiVcYWn
145
U AQ_JOBS%ROWTYPE; MY_DB_ROLE VARCHAR2(16); BEGIN DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.ALERT_FILE, 'CHANGING ROLE OF AQ JOBS'); CURRENT_DB_ROLE := DBMS_LOGSTDBY.DB_ROLE(); OPEN AQ_JOBS; LOOP FETCH AQ_JOBS INTO U; EXIT WHEN AQ_JOBS%NOTFOUND; IF (U.DATABASE_ROLE = MY_DB_ROLE) THEN DBMS_SCHEDULER.SET_ATTRIBUTE(U.JOB_NAME, 'DATABASE_ROLE', MY_DB_ROLE); DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.ALERT_FILE, 'AQ JOB ' || U.JOB_NAME || ' CHANGED TO ROLE ' || MY_DB_ROLE); END IF; END LOOP; CLOSE AQ_JOBS; EXCEPTION WHEN OTHERS THEN BEGIN DBMS_SYSTEM.KSDWRT(DBMS_SYSTEM.ALERT_FILE, 'FAILED TO CHANGE ROLE OF AQ JOBS'); RAISE; END; END;
Understanding the Operational Aspects of a Logical Standby 7Z[dgZYZak^c\^cidi]ZdeZgVi^dcVaVheZXihd[HFA6eean!^i]Zaehid\ZiVc^YZVVWdji]dl^i^h ^beaZbZciZY#HdlZl^aaiV`ZVWg^Z[YZidjg^ch^YZi]Z^ciZgcVahd[HFA6eean#
Looking Inside SQL Apply HFA6eean^hi]ZaVnZgd[XdYZVcYVahdi]ZegdXZhh\gdjei]VibV^ciV^chi]ZDgVXaZad\^XVa hiVcYWnYViVWVhZ#I]gZZhd[ilVgZXdbedcZcihVgZgZhedch^WaZ[dgbV^ciV^c^c\Vad\^XVahiVcYWn YViVWVhZ/i]ZgZYdigVchedgihZgk^XZi]Vih]^ehi]ZgZYdhigZVbd[i]Zeg^bVgnYViVWVhZVcY eZg[dgbh\VegZhdaji^dc!i]Zb^c^c\hZgk^XZi]Vib^cZhi]ZgZYdVcYgZXdchigjXihi]ZZfj^kVaZci HFAhiViZbZcihVcYdg^\^cVaigVchVXi^dc\gdje^c\!VcYi]ZVeeanhZgk^XZi]VihX]ZYjaZhi]Zb^cZY igVchVXi^dch[dgXdcXjggZciVeea^XVi^dcVcYVXijVaanVeea^Zhi]Zb#6[djgi]hZgk^XZ^h]^YYZc^c eaV^ch^\]i¸i]ZXdgZYViVWVhZZc\^cZi]VieZg[dgbhi]ZbdY^[^XVi^dcVhY^gZXiZYWni]ZVeean hZgk^XZ#6ai]dj\]i]^hbVnWZdWk^djhidZkZgndcZ!lZbZci^dc^iid]^\]a^\]iVc^bedgiVci[VXi VWdjiVad\^XV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DadVY#Hd `ZZe^cb^cYVaai]gZZd[i]ZhZegdYjXZg"XdchjbZge^eZa^cZhVcYadd`ViVaad[i]Zbl]Zc ign^c\idijcZHFA6eean[dgndjgad\^XVahiVcYWnYViVWVhZ#GZbZbWZgi]Vi^i^h!V[iZgVaa!dcan Vcdi]ZgYViVWVhZ#
Understanding the Process Architecture of SQL Apply 6hlZhV^YZVga^Zg!HFA6eeanXdch^hihd[ildXdbedcZcih/i]Zb^c^c\Zc\^cZVcYi]ZVeean Zc\^cZ#L]Zcndj^hhjZi]Zalter database start logical standby applyhiViZbZci! i]Z[^ghiWVX`\gdjcYegdXZhhidhiVgi^hi]Zad\^XVahiVcYWnXddgY^cVidgegdXZhhAHE%#I]^h^hi]Z 8DDG9>C6IDGegdXZhh[dgHFA6eean#I]^h^cijgcheVlchildhZihd[egdXZhhZh/i]Zb^c^c\ egdXZhhZh^c&&gi]ZhZ]VkZi]ZegZ[^mora_ms!^bean^c\b^c^c\hZgkZghVcYi]ZVeeanegdXZhhZh ^c&&gi]ZhZ]VkZi]ZegZ[^mora_as!^bean^c\VeeanhZgkZgh# I]Zb^c^c\Zc\^cZXdbeg^hZhi]gZZineZhd[egdXZhhZh/ N
READER I]ZgZ^hdcandcZgZVYZgegdXZhh#>ih_dW^hidgZVYi]ZgZYdhigZVbZ^i]Zg [gdbi]ZVgX]^kZYad\hdg[gdbi]ZhiVcYWngZYdad\[^aZPHGAR#>iYdZhcdiYdVcn igVch[dgbVi^dcd[i]ZgZYdgZXdgYhZmXZeiidbV`ZVXden^c^ihh]VgZYWj[[Zg#
N
PREPARER I]ZgZXVcWZbjai^eaZegZeVgZgh#9ViV<jVgYjhZhVhiZe[jcXi^dcid YZiZgb^cZi]Zg^\]icjbWZgd[egZeVgZghl^i]VhiZed['%#Hd[dgi]Z[^ghi'%Veea^Zgh! dcanVh^c\aZegZeVgZgl^aaWZheVlcZY#6hZXdcYegZeVgZgl^aaWZheVlcZY^[ndjlZgZ idVh`[dg'&id)%Veea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SQL Apply H^cXZi]ZdkZgVaaHFA6eeanZc\^cZXVcWZXdch^YZgZYVegdYjXZg"XdchjbZghZijel^i]i]ZA8G XVX]Z^ci]Zb^YYaZjhZYVhi]Ze^eZa^cZ!i]ZhVa^ZcibZbdgn"gZaViZY^hhjZ^h]dli]ZbZbdgn \ZihbVcV\ZY#6hlZ^cY^XViZYZVga^Zg!ndjXVchZii]Zh^oZVaadXViZYidA8GXVX]Z#6\ddYgjaZ d[i]jbW^cidYVn¼hbVX]^cZhl^i]VaVg\ZVbdjcid[h]VgZYeddah^hidhZii]ZbZbdgnVaadXViZY idi]ZA8GXVX]Zid'%%B7!a^`Zhd/ SQL> EXECUTE DBMS_LOGSTDBY. APPLY_SET ( 'MAX_SGA', 200);
AZi¼hadd`^cbdgZYZiV^aVii]Zdg\Vc^oVi^dcd[i]ZA8GXVX]Z# 6hh]dlc^c;^\jgZ)"&!i]ZA8GXVX]Z^hY^k^YZY^cid[djgbV^cXdbedcZcih/dcZi]Vi]daYh i]ZgZYdgZXdgYhi]Zh^oZd[i]^h^hXdchiVci!Vcdi]Zgl]ZgZi]ZgZYdgZXdgYhVgZigVch[dgbZY^cid A8GhWjicdinZi\gdjeZY^cidigVchVXi^dch!Vi]^gYl]ZgZA8GhVgZ\gdjeZY^cidigVchVXi^dch VcYVgZgZVYn[dgXdchjbei^dcWni]ZVeeanXdbedcZci!VcYV[djgi]hZXi^dci]Vi^hbVYZjed[ jcjhZYbZbdgn#I]ZgZVYZgegdXZhhgZVYh[gdbi]ZgZYdad\hVgX]^kZYad\hdgi]ZHGAVcY[^aah
FIGURE 4-1.
Inside the LCR cache
148
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Setting Various SQL Apply–Related Parameters NdjXVcX]Vc\ZVabdhiVaaVheZXihd[HFA6eeanWnjh^c\dbms_logstdby.apply_set() l^i]dji[^ghi]Vk^c\idhideHFA6eean#I]ZZmXZei^dcidi]^hgjaZ^hi]ZeVgVbZiZgpreserve_ commit_order#>[ndj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Xi^dchhdi]Vi i]ZA8GXVX]Z^h*%eZgXZciZbein#6ii]^hed^ci!i]Zb^c^c\egdXZhhZhl^aalV`ZjeVcYadd`[dg VYY^i^dcVagZYdgZXdgYhidigVch[dgb^cidA8GhVcY\gdje^cidigVchVXi^dch#>[ndjlVciid[^cYdji ]dlbjX]d[i]ZMAX_SGA^hVXijVaan\Zii^c\jhZYWnHFA6eeanegdXZhhZh!ndjXVc^hhjZi]Z [daadl^c\fjZgn/ SQL> SELECT USED_MEMORY_SIZE FROM V$LOGMNR_SESSION WHERE SESSION_ID = (SELECT VALUE FROM V$LOGSTDBY_STATS WHERE NAME = 'SESSION ID'); USED_MEMORY_SIZE ---------------167600
L]nYdndjcZZYid^hhjZi]ZhjWfjZgnidgZhig^Xii]ZdjiejiidVh^c\aZsession_id4GZ[Zg WVX`idi]ZhZXi^dc!¹D[[adVY^c\Ad\"WVhZYGZea^XVi^dcHigZVbh8VeijgZidi]ZAd\^XVaHiVcYWn#º I]ZXdgZb^c^c\Zc\^cZ&*jhZYjcYZgcZVi]HFA6eean^hVahdjhZYjcYZgcZVi]HigZVbhXVeijgZ! VcYb^c^c\hZhh^dchVXi^kZ[dgVHigZVbhXVeijgZl^aaVahdh]dlje^ci]Zh]VgZYv$logmnr_ sessionk^Zl#>[ndjlZgZidgjci]^hfjZgnZkZgn[ZlhZXdcYhVcYX]Vgii]Zdjieji!ndjldjaY hZZi]ZbZbdgnjhZYWnA8GXVX]Z^cXgZVh^c\jeid.*eZgXZcid[i]ZMAX_SGAhZii^c\VcYi]Zc \gVYjVaangZYjX^c\jci^a^igZVX]Zh*%eZgXZcid[i]ZMAX_SGAhZii^c\WZ[dgZ\d^c\WVX`jeV\V^c# Hdl]Vi]VeeZch^[ndjYdcdiVaadXViZZcdj\]bZbdgnidHFA6eean4NdjbVncdi^XZi]Vii]Z b^c^c\Zc\^cZ^heV\^c\djibZbdgn[gdbA8GXVX]ZidY^h`system.logmnr_spill$ table# 6bdYZgViZVbdjcid[eV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ress.applied_scnVcYi]Zgdlh^csystem.logstdby$apply_ progress[dgbi]ZVeeanZc\^cZ¼hX]ZX`ed^ci^c[dgbVi^dc# I]Zb^c^c\Zc\^cZcZZYhid`ZZebdgZZaVWdgViZX]ZX`ed^ci^c[dgbVi^dc#>bV\^cZi]Z [daadl^c\hXZcVg^d/HdbZgd\jZVeea^XVi^dcdcZi]Vi[dg\diidad\ndjdjid[ndjghZhh^dcZkZc V[iZg^i]VhWZZcaZ[i^YaZ[dgVXdjeaZd[YVnhhiVgiZYVlg^iZigVchVXi^dcWVcYaZ[i^ideZc[dg XdjeaZd[YVnh#I]ZigVchVXi^dcbVYZV[ZlX]Vc\Zh!Wji^iY^YcdiXdbb^idggdaai]ZbWVX`# Cdl^i^hildYVnhaViZg!VcYndjhideHFA6eean#DWk^djhan!HFA6eeanXdjaYcdiXdbb^ii]Z X]Vc\ZhYdcZWnigVchVXi^dcW#>iXVccdilV^i^cYZ[^c^iZan[dgWidbV`Zje^ihb^cY#Hd^ihideh V[iZgVeean^c\X]Vc\ZhhjX]i]Vii]ZYViVWVhZ^hViVXdch^hiZcihiViZ#Cdll]ZcndjhiVgiHFA 6eeanV\V^c!^igZVaanldjaY]VkZid\dWVX`idi]ZVgX]^kZYad\hl]ZgZWbVYZ^ihX]Vc\ZhVcY gZVYildYVnh¼ldgi]d[VgX]^kZYad\hbdhid[l]^X]^hjhZaZhhldg`!h^cXZWbVn]VkZbVYZ dcandcZX]Vc\ZildYVnhWVX`#7jiVaai]ZhZ^cZ[[^X^ZcX^ZhVgZVkd^YZY!h^cXZHFA6eeanldjaY ]VkZX]ZX`ed^ciZYi]ZX]Vc\ZhbVYZWnW^cdcZd[^ihbZiVYViViVWaZhsystem.logmnr_age_ spill$# I]Zb^c^c\Zc\^cZ]VhVXdjciZgeVgiidv$logstdby_progress.applied_scnVcYi]^h^h v$logstdby_progress.restart_scn#I]Zb^c^c\Zc\^cZl^aagZVYdcangZYdad\hi]ViXdciV^c gZYdgZXdgYhl^i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gl]ZgZi]ZXdbb^idgYZg^c\^hcdihig^XianZc[dgXZYVhadc\ VhcdgdlYZeZcYZcXnZm^hihWZilZZcildigVchVXi^dch#Ndj\Zii]ZhZXdcY!aZhhhig^XihZii^c\VcY ediZci^VaandcZl^i]bdgZeZg[dgbVcXZ!ZheZX^Vaan^[ndjgldg`adVY^hDAIE"a^`Zl^i]hbVaa$ bZY^jb"h^oZYigVchVXi^dchXdbb^ii^c\Vi]^\]gViZ#NdjYdi]^hl^i]i]Z[daadl^c\hiViZbZci/ SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET (NAME => 'PRESERVE_COMMIT_ORDER', VALUE => FALSE);
CdiZi]VicdbViiZgl]^X]bdYZndjhZi!HFA6eeanl^aaegZhZgkZigVchVXi^dcWdjcYVg^Zh X]Vc\Zhi]ViXdbb^iiZYVidb^XVaanVii]Zeg^bVgnYViVWVhZXdbb^iVidb^XVaanVii]ZhiVcYWn YViVWVhZVcYl^aa]dcdggdlYZeZcYZcX^Zh^[ildigVchVXi^dchbdY^[ni]ZhVbZgdl!i]Znl^aa WZXdbb^iiZY^ci]ZhVbZdgYZgVii]Zad\^XVahiVcYWnVhi]ZnlZgZVii]Zeg^bVgnYViVWVhZ# NOTE Many third-party replication solutions do not offer the integrity of the transaction boundary. The performance numbers that they cite are often collected when they are violating the integrity of the transaction (by applying changes that happened together in the context of multiple transactions). ;dghdbZVeea^XVi^dch!i]^hbVnWZZcdj\]#7ji^[ndjVgZgjcc^c\i]ZhjeeanX]V^cd[V bV_dggZiV^aZg!ndjXVccdiV[[dgYidjeYViZi]ZXVg\dbVc^[Zhi^ci]gZZY^[[ZgZciigVchVXi^dchl]Zc ^ilVhYdcZ^cVh^c\aZigVchVXi^dcVii]Zeg^bVgn#Hdl]ViYdZhhig^XidgYZg^c\bZVc4Hig^Xi dgYZg^c\dgegZhZgk^c\Xdbb^idgYZgbZVchi]ViXdbb^ihVgZ^hhjZYVcYZmZXjiZY^ci]ZhVbZ dgYZgVh^ci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or SCN)
Transaction X
Transaction Y
&%
JeYViZGdlG&d[IVWaZI&
>chZgiGdlG&d[IVWaZI'
'%
>chZgiGdlG'd[IVWaZI'
(%
JeYViZGdlG'd[IVWaZI&
)%
8dbb^iM
*%
>chZgiGdlG(d[IVWaZI'
+%
>chZgiGdlG)d[IVWaZI'
,%
8dbb^iN
TABLE 4-1.
An Example Transaction History H1 at the Primary Database
Time (or SCN)
APPLIER#1
APPLIER#2
&%%
JeYViZGdlG&d[IVWaZI&
>chZgiGdlG&d[IVWaZI'
&&%
>chZgiGdlG'd[IVWaZI'
&'%
>chZgiGdlG(d[IVWaZI'
&(%
>chZgiGdlG)d[IVWaZI'
&)%
JeYViZGdlG'd[IVWaZI&
&*%
8dbb^iM
&+%
8dbb^iN
TABLE 4-2. An Example Transaction History (Associated with H1) at the Logical Standby with preserve_commit_order Set to TRUE
Time (or SCN)
APPLIER#1 (Applying X)
APPLIER#2 (Applying Y)
&%%
JeYViZGdlG&d[IVWaZI&
>chZgiGdlG&d[IVWaZI'
&&%
>chZgiGdlG'd[IVWaZI'
&'%
>chZgiGdlG(d[IVWaZI'
&(%
>chZgiGdlG)d[IVWaZI'
&)%
JeYViZGdlG'd[IVWaZI&
&*%
8dbb^iM
8dbb^iN
TABLE 4-3. An Example Transaction History (Associated with H1) at the Logical Standby with preserve_commit_order Set to FALSE
8]VeiZg)/ Ad\^XVaHiVcYWn
153
I]^hWg^c\hjhidi]ZcZmiide^Xd[Y^hXjhh^dc/=dlYdZhHFA6eeanXdbejiZgdl YZeZcYZcXn4>iYdZhi]^hWnXdbeji^c\hZkZgVa]Vh]kVajZh[dgZVX]A8G!dcZ[dgZVX]jc^fjZ XdchigV^cidci]ZiVWaZd[^ciZgZhi!VcYi]ZcjhZhi]Z]Vh]kVajZhidYZiZgb^cZl]Zi]ZgildA8Gh ]VkZVcnXdaa^h^dch#>[hd!i]ZigVchVXi^dcl^i]i]ZaViZgXdbb^iH8Cl^aalV^i[dgi]Z[^ghi igVchVXi^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ndjXVc\dV]ZVYl^i]dji]Vk^c\idlV^i[dgi]Zdi]Zg igVchVXi^dcidXdbb^i8VhZ&#Hdl]ViYdndjYdl]Zcndj]VkZhjheZcYZYYZeZcYZcXn XdbejiVi^dc[dgV\^kZcigVchVXi^dc4NdjlV^i[dgi]ViigVchVXi^dcidXdbb^iWZ[dgZndjXVc hX]ZYjaZVcnA8Gi]VidXXjggZYV[iZgi]ZXdbb^id[i]ViigVchVXi^dc#I]^h^hZhhZci^VaanVcVeean WVgg^Zg!VcY^i^hgV^hZYVcni^bZVaVg\ZigVchVXi^dcXdbb^ih#
Understanding How DDL Statements Are Handled Inside SQL Apply Cdli]VilZ]VkZZmeadgZY]dlHFA6eeanhX]ZYjaZh9BAigVchVXi^dch!^i^hi^bZidadd`Vi 99AhX]ZYja^c\#IldVheZXihd[99AigVchVXi^dchVgZ^bedgiVciid`ZZe^cb^cY/99A hiViZbZcihVXiVhi]ZWVgg^ZghncX]gdc^oVi^dced^ci^ci]ZXdciZmid[HFA6eean!VcY99A hiViZbZcihVgZhX]ZYjaZYhZg^VaanWnHFA6eeanl^i]i]ZZmXZei^dcd[Create Table As SelecthiViZbZcih!l]^X]bVnWZhX]ZYjaZYXdcXjggZcian#
Myth Buster: Third-party Replication Products Provide Better Latency, Because the Mining Is Usually Done at the Primary Site I]^hbni]]Vhi]ZediZci^Va[dgWZ^c\igjZdcan[dghbVaaigVchVXi^dch#GZbZbWZgi]Vii]Z aViZcXnd[^ciZgZhi^hcdi_jhi^c]dlfj^X`ani]ZYViV^hXVeijgZY!Wjil]Zc^i^hVeea^ZY#>c VabdhiVaaXVhZh!i]^gY"eVgingZea^XVi^dcegdYjXihYdcdi]VkZi]ZZV\ZgigVchVXi^dc hX]ZYja^c\[ZVijgZi]Vi¼hVkV^aVWaZ^cHFA6eean#I]jhi]ZgZhedchZi^bZ[dgVaVg\Z igVchVXi^dc^ckdak^c\b^aa^dchd[gdlhl^aaWZfj^iZ]^\]#6hhjb^c\i]ViVigVchV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]Z99A igVchVXi^dcVgZ]VcYZYdjiidi]Z6C6ANO:GegdXZhh#DcXZi]ZWVgg^ZgXdcY^i^dc^hhVi^h[^ZY!i]Z b^c^c\Zc\^cZVeea^Zhi]Z99Aidi]ZAd\B^cZgY^Xi^dcVgn!a^[ih^ihWVgg^Zg!VcYi]Zc]VcYhi]Z 99AigVchVXi^dcidi]Z6C6ANO:GegdXZhhidWZhX]ZYjaZY#I]Zb^c^c\Zc\^cZWVgg^Zgh]dlhje ^ci]Zv$logstdby_processk^Zl[dgi]ZBUILDERegdXZhh/ SQL> SELECT STATUS_CODE AS SC, STATUS FROM V$LOGSTDBY_PROCESS WHERE TYPE = 'BUILDER' ; SC STATUS ----- --------------------------------------------------------------44604 BARRIER SYNCHRONIZATION ON DDL WITH XID 1.15.256 (WAITING ON 17 TRANSACTIONS)
I]^hiZaahndji]Vii]Zb^c^c\Zc\^cZ^hlV^i^c\idVeeanigVchVXi^dc&*#'*+VcYi]Vi &,igVchVXi^dchcZZYidWZVeea^ZY[dgi]ZWVgg^ZgXdcY^i^dcidWZhVi^h[^ZY#I]ZVeeanZc\^cZVahd ZciZghVWVgg^ZghncX]gdc^oVi^dced^cil]Zc^igZXZ^kZhi]Z99AigVchVXi^dc#I]^hbZVchVai]dj\] i]Zb^c^c\Zc\^cZ¼hWVgg^Zg^ha^[iZYVcYi]Z6C6ANO:GegdXZhhXVchiVgigZXZ^k^c\igVchVXi^dchi]Vi Xdbb^iiZYV[iZgi]Z99A!i]Z8DDG9>C6IDGegdXZhhl^aacdiVhh^\cVcnigVchVXi^dcjci^ai]Z 99AigVchVXi^dcZmXZei[dgCreate Table As SelecthiViZbZcihVi]VcY]VhWZZcVeea^ZY hjXXZhh[jaan#L]ViYdZhi]^hbZVc4>ibZVchi]Vil]ZcV99AigVchVXi^dc^h\Zii^c\Veea^ZY!Vaa 9BAigVchVXi^dchi]ViXdbb^iiZYWZ[dgZi]Z99A]VkZWZZchjXXZhh[jaanVeea^ZYVcYcdigVchVXi^dc X]jc`i]ViXdbb^iiZYV[iZgi]Z99AigVchVXi^dcdg]VcYZYidi]Z6C6ANO:GV[iZgi]Z99A igVchVXi^dc!h^cXZi]ZgZXVcWZildigVchVXi^dchi]ViXdbb^iVii]ZhVbZH8C^h^cegdXZhhd[ WZ^c\Veea^ZYWnVc6EEA>:GegdXZhh# ;gdbi]^hYZhXg^ei^dc!^i[daadlhi]ViHFA6eeanhX]ZYjaZh99AhiViZbZcihdi]Zgi]Vc Create Table As SelecthiViZbZcihhZg^Vaan#I]^h^hYdcZidbV^ciV^chV[Zin!Wji^iYdZh]VkZ Vc^beVXi#HjeedhZndjeZg[dgbZYeVgi^i^dcbV^ciZcVcXZdeZgVi^dchdcildiVWaZhXdcXjggZcian Vii]Zeg^bVgn!VcYZVX]idd`dcZ]djgidXdbeaZiZ#6ii]Zad\^XVahiVcYWnh^iZ!i]Znl^aaWZ hX]ZYjaZYhZg^Vaan!VcY]ZcXZl^aaiV`ZVidiVad[ild]djghidXdbeaZiZ#I]jh^i^h^bedgiVciid d[[adVYaVg\ZgZdg\Vc^oVi^dcdeZgVi^dchidd[["eZV`]djgh#HFA6eeanVahdVaadlhndjidh`^e heZX^[^X99AdeZgVi^dch^[ndjldjaYa^`ZidYdi]Zbdji"d["WVcY#LZXVciV`ZVYkVciV\Zd[i]Z WVgg^ZghncX]gdc^oVi^dci]VilZY^hXjhhZYZVga^ZgideZg[dgb99AhiViZbZcihXdcXjggZcian dji"d["WVcYl^i]djik^daVi^c\hV[Zin#GZbZbWZgi]Z[daadl^c\ed^cih/ N I]Z99Ahi]VindjVgZeaVcc^c\ideZg[dgbXdcXjggZcianh]djaYWZhV[Z[dgXdcXjggZci deZgVi^dch#:mVbeaZhd[hjX]deZgVi^dchVgZ^cYZmgZWj^aYhdchZeVgViZiVWaZh!hZ\bZci h]g^c`deZgVi^dchdchZeVgViZiVWaZh!VcYhddc# N Ndj]VkZXdcigdadkZghjX]99AhVcY`cdli]Vii]Z99AhVgZcdi^hhjZYWnhdbZ Veea^XVi^dcjcWZ`cdlchiidndjYjg^c\i]ZcdgbVaegdXZhh^c\]djgh#I]^h^hjca^`Zan! ]dlZkZg!h^cXZndjldjaY]VkZcdi^XZYi]ZhadlYdlc#
8]VeiZg)/ Ad\^XVaHiVcYWn
155
Hdi]Z^YZV^hidhideHFA6eeanVii]Zg^\]ied^ci!eZg[dgbi]ZdeZgVi^dchXdcXjggZcianVcY dji"d[WVcYViWdi]i]Zeg^bVgnVcYi]Zad\^XVahiVcYWn!VcYi]ZcgZhiVgiHFA6eeanhdi]Vi^i YdZhcdiignidZmZXjiZi]Z99AhiViZbZcih^ihZa[# 1. ;^ghibV`ZhjgZi]ViHFA6eeanYdZhcdiZmZXjiZINDEX REBUILDhiViZbZcih^ihZa[# HjeedhZndj]VkZ^YZci^[^ZYildaVg\Z^cYZmZh!IG69:T=>HIDGNT>9MVcYE6NB:CIT =>HIDGNT>9M!Wdi]^ci]Z8JHIDB:GhX]ZbV!i]ViVgZXVcY^YViZh[dgc^\]iangZWj^aYh# NdjXVcY^gZXiHFA6eeancdiidVeeanALTER INDEXhiViZbZcih[dgi]ZhZild^cYZmZh l^i]i]Z[daadl^c\hiViZbZcih/ SQL> A1TER DATABASE STOP LOGICAL STANDBY APPLY; SQL> EXECUTE DTMS_LOGSTDBY.SKIP(STMT => 'ALTER INDEX', SCHEMA_NAME => 'CUSTOMER', OBJECT_NAME => 'TRADE_HISTORY_IDX'); SQL> EXECUTE DTMS_LOGSTDBY.SKIP(STMT => 'ALTER INDEX', SCHEMA_NAME => 'CUSTOMER', OBJECT_NAME => 'PAYMENT_HISTORY_IDX');
2. CZmindjcZZYidbV`ZhjgZi]ViHFA6eeanhidehWZ[dgZ^iZcXdjciZghhjX]Vc^cYZm gZWj^aYdeZgVi^dc#NdjXVcYZh^\c^iWnValVnheZg[dgb^c\VhZci^cZa99AVii]Zeg^bVgn YViVWVhZWZ[dgZndjgZWj^aYi]Z^cYZmZh!VcYgZ\^hiZg^c\Vh`^e]VcYaZgVii]Zad\^XVa hiVcYWnhdi]ViHFA6eeanl^aahidel]Zc^ihZZhi]ZhZci^cZa99A#Id`ZZei]ZY^hXjhh^dc h^beaZ!VhhjbZi]Vii]ZhZci^cZa99A^hVIGJC86I:deZgVi^dc!hdi]VindjXVc^hhjZ^i dkZgVcYdkZgV\V^c# 8gZViZi]ZhZci^cZaiVWaZ[^ghi/ SQL> CREATE TABLE TEST.STOP_SQL_APPLY(A NUMBER);
6ii]Zad\^XVahiVcYWn!ndjcZZYidYdildi]^c\h/hideHFA6eeanl]ZcndjhZZi]Z IGJC86I:deZgVi^dcdci]ZiZhi#hideThfaTVeeaniVWaZ!VcYdcXZi]Z^cYZmgZWj^aYh]VkZ WZZcYdcZhjXXZhh[jaanVcYHFA6eean]VhWZZcgZhiVgiZY!ndjcZZYidbV`ZhjgZndjYd cdihideV\V^cdcZcXdjciZg^c\i]ZIGJC86I:iVWaZ#HdndjcZZYidlg^iZild egdXZYjgZhVii]Zad\^XVahiVcYWn/dcZcZZYhidWZ^ckd`ZYWZ[dgZndjhiVgii]Z^cYZm gZWj^aYdeZgVi^dchVii]Zeg^bVgn!VcYi]Zdi]ZgV[iZgi]Z^cYZmgZWj^aYhVgZYdcZVii]Z ad\^XVahiVcYWn/ SQL> CREATE TABLE TEST.SQL_APPLY_MESG(CHECK_MSG VARCHAR2, MSG_TIME DATE); SQL> CREATE OR REPLACE PROCEDURE SYS.STANDBY_START_REBUILD AS BEGIN INSERT INTO TEST.SQL_APPLY_MESG VALUES ('STOP', SYSDATE); COMMIT; END; / SQL> CREATE OR REPLACE PROCEDURE SYS.STANDBY_END_REBUILD AS BEGIN DELETE FROM TEST.SQL_APPLY_MESG; COMMIT; END; /
156
DgVXaZ9ViV<jVgY&&g=VcYWdd` NdjVahdXgZViZVegdXZYjgZ[dgi]Zeg^bVgnYViVWVhZl]^X]^hh^beanidigjcXViZi]Z hZci^cZaiVWaZ/ SQL> CREATE OR REPLACE PROCEDURE SYS.PRIMARY_START_REBUILD AS BEGIN EXECUTE IMMEDIATE 'TRUNCATE TABLE TEST.STOP_SQL_APPLY'; END; /
3. CdlndjXVclg^iZi]Zh`^e]VcYaZgVii]Zad\^XVahiVcYWni]Vil^aahidedcandc ZcXdjciZg^c\i]ZIGJC86I:deZgVi^dcdci]ZiZhi#hZci^cZaTiVWaZdcan^[i]ZgZ^hVgdl ^ci]ZiZhi#hfaTVeeanTbZh\iVWaZ/ SQL> CREATE OR REPLACE PROCEDURE SYS.STOP_SQL_APPLY_ON_DDL (OLD_STMT IN VARCHAR2, STMT_TYP IN VARCHAR2, SCHEMA IN VARCHAR2, NAME IN VARCHAR2, XIDUSN IN NUMBER, XIDSLT IN NUMBER, XIDSQN IN NUMBER, ACTION OUT NUMBER, NEW_STMT OUT VARCHAR2) AS CHECK_MSG NUMBER := 0; BEGIN SELECT COUNT(MESSAGE_BODY) INTO CHECK_MSG FROM TEST. SQL_APPLY_MESG; -- WE ARE SIMPLY CHECKING WHETHER A ROW EXISTS OR NOT IN THE TABLE IF (CHECK_MSG = 1) THEN ACTION := DBMS_LOGSTDBY.SKIP_ACTION_ERROR; NEW_STMT := NULL; ELSE ACTION := DBMS_LOGSTDBY.SKIP_ACTION_APPLY; NEW_STMT := OLD_STMT; END IF; END; /
4. NdjcdlcZZYidgZ\^hiZgi]Zh`^e]VcYaZgidVheZX^[^X99AdeZgVi^dc/ SQL> EXECUTE DBMS_LOGSTDBY.SKIP( STMT => 'TRUNCATE TABLE', SCHEMA_NAME => 'TEST', OBJECT_NAME => 'STOP_SQL_APPLY');
Cdli]Vindj]VkZVaai]ZWj^aY^c\WadX`h!ndjXVcYZhXg^WZi]ZegdXZYjgZ[dg^cYZmgZWj^aYh/ STEP 1: AT THE LOGICAL STANDBY: MAKE SURE THAT SQL APPLY WILL STOP AT THE APPROPRIATE TIME. SQL> EXECUTE SYS.STANDBY_START_REBUILD; STEP 2: AT THE PRIMARY DATABASE: MAKE SURE THAT SQL APPLY STOPS BEFORE IT ENCOUNTERS THE INDEX REBUILD OPERATIONS SQL> EXECUTE SYS.PRIMARY_START_REBUILD;
8]VeiZg)/ Ad\^XVaHiVcYWn
157
6ii]Zeg^bVgnYViVWVhZ!ndjXVchiVgindjg^cYZmgZWj^aYh^ceVgVaaZa#Ndjl^aa]VkZid lV^i[dgHFA6eeanidhideWZ[dgZndjXVchiVgii]ZgZWj^aYdeZgVi^dch#NdjYdcdicZZYid iV`ZVcnbdgZVXi^dchVii]Zeg^bVgngZaViZYidi]Z^cYZmgZWj^aYh#6ii]Zad\^XVahiVcYWn i]dj\]!dcXZi]ZgZWj^aYh]VkZWZZc[^c^h]ZY!ndjl^aacZZYidbV`ZhjgZi]VidcgZhiVgi! HFA6eeanYdZhcdihidedcZcXdjciZg^c\i]ZIGJC86I:deZgVi^dcdci]ZhZci^cZaiVWaZ/ STEP 3: AT THE LOGICAL STANDBY DATABASE: SQL> EXECUTE SYS.STANDBY_END_REBUILD; SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
CdiZi]Vii]^hi^bZ!Vai]dj\]i]Zh`^e]VcYaZgsys.stop_sql_apply_on_ddl^hVXi^kZVcY l^aaWZ^ckd`ZY[dgi]ZigjcXViZiVWaZ99A!^il^aaVeean^iVcYXdci^cjZdc#
Tuning SQL Apply >[ndjlZgZidadd`Vii]ZHFA6eeanZc\^cZVhVegdYjXZg"XdchjbZghZije!i]Zijc^c\ViV]^\] aZkZa^ckdakZhX]ddh^c\i]Zi]gZZaZkZghi]Vindj]VkZ/ N >cXgZVhZi]ZWj[[ZgWZilZZci]ZegdYjXZghi]Zb^c^c\hZgkZghVcYi]ZXdchjbZgh i]ZVeeanhZgkZgh#I]ZdcanlVnidYdi]^h^hid^cXgZVhZi]ZMAX_SGAeVgVbZiZgi]Vi Xdcigdahi]Zh^oZd[i]ZLCR_CACHE# N >cXgZVhZi]Zi]gdj\]ejid[i]ZegdYjXZgdgi]Zb^c^c\Zc\^cZ^[i]ZegdYjXZgh^YZd[i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dgYh^cidA8Ghi]VcidVeeanVc A8Gk^VHFAidi]ZYViVWVhZ#
158
DgVXaZ9ViV<jVgY&&g=VcYWdd` 3. 6ii]^hed^ci!ndj`cdli]ViHFA6eean^h^cYZZYeVgid[i]ZegdWaZb#L]^X]Zc\^cZ^h i]ZWdiiaZcZX`4>h^ii]Zb^c^c\dgi]ZVeeanZc\^cZ4 N >[^i^hi]ZVeeanZc\^cZ!^cXgZVhZi]ZcjbWZgd[Veea^Zgh# N >[^i^hi]Zb^c^c\Zc\^cZ!YdndjcZZYid^cXgZVhZbZbdgnh^oZ[dgi]Zlcr_cache dgi]ZcjbWZgd[b^c^c\egdXZhhZh4 4. GZeZVii]ZhiZeh#''
Some Rules of Thumb I]ZYZ[VjaikVajZh[dghZkZgVaeVgVbZiZghi]ViXdcigdaHFA6eeanVgZcdi^YZVa[dgegdYjXi^dc hnhiZbh#HdlZhj\\Zhii]Z[daadl^c\/ N HZiMAX_SERVERSid-cjbWZgd[XdgZh/ SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET23 ('MAX_SERVERS',
64);
N HZiMAX_SGAid'%%B7/ SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET('MAX_SGA',
200);
N HZi_HASH_TABLE_SIZEid&%%%%%%%')&%b^aa^dc/ SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET('_HASH_TABLE_SIZE', 10000000);
N 9Z[Zg99Ahidd[["eZV`]djgh# N HZiPRESERVE_COMMIT_ORDERidFALSE# CdiZi]Vi[dgbVcnVeea^XVi^dch!i]ZYZ[Vjaihig^XidgYZg^c\^bedhZYWnHFA6eean^hcdi cZXZhhVgn!VcYndjXVcgZaVmi]^hl^i]djiV[[ZXi^c\i]ZXdggZXicZhhd[ndjgVeea^XVi^dchi]ViVgZ d[[adVYZYidi]Zad\^XVahiVcYWn# SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET('PRESERVE_COMMIT_ORDER', FALSE);
Determining Whether SQL Apply Is Lagging I]^h^hfj^iZh^beaZ#6h^beaZhZaZXi[gdbi]ZV$DATAGUARD_STATSk^Zll^aaegdk^YZndjl^i] i]ZVeeanhiVi^hi^Xh/ SQL> SELECT NAME, VALUE, UNIT FROM NAME VALUE -------------------- -----------APPLY FINISH TIME +00 00:00:03 APPLY LAG +00 00:00:05 TRANSPORT LAG +00 00:00:00
''
V$DATAGUARD_STATS; UNIT -----------------------------DAY(2) TO SECOND(1) INTERVAL DAY(2) TO SECOND(0) INTERVAL DAY(2) TO SECOND(0) INTERVAL
NdjcZZYidgZeZVii]Z6H=VcY6LGVcVanh^h#6ai]dj\]i]ZG97BHijc^c\lVhcdicZZYZY^c^i^Vaan!dcXZndj VaadXViZbdgZbZbdgnVcYegdXZhhZhidHFA6eean!^ibVni]Zc]^\]a^\]ii]ZcZZYidijcZi]ZG97BHdgi]Z>$D hjWhnhiZb#LZ]VkZZcXdjciZgZYVcjbWZgd[hjX]^chiVcXZh^ci]Z[^ZaY# '( 6hhjb^c\ndj]VkZV[djg"8EJWdml^i]YjVaXdgZegdXZhhdgh# ') HASH_TABLE_SIZEYZiZgb^cZhi]Zh^oZd[Vc^ciZgcVahigjXijgZjhZYidigVX`YZeZcYZcX^ZhWZilZZcY^[[ZgZci igVchVXi^dch#
8]VeiZg)/ Ad\^XVaHiVcYWn
159
I]ZkVajZhd[^ciZgZhiVgZapply lagVcYtransport lag#I]ZVeeanaV\kVajZ^cY^XViZh]dl XjggZcii]ZgZea^XViZYYViVVii]Zad\^XVahiVcYWn^h!VcYi]ZigVchedgiaV\kVajZ^cY^XViZh]dl bjX]d[i]ZgZYdYViVi]Vi]VhVagZVYnWZZc\ZcZgViZY^hb^hh^c\Vii]Zad\^XVahiVcYWn^ciZgbh d[gZYdgZXdgYh#Hd^[VeeanaV\^haVg\Zgi]VcndjgZmeZXiZYkVajZ!ndj]VkZVc^hhjZVcYndj cZZYidYg^aaYdlc#I]Zk^ZlVahdVchlZghi]ZgZYdigVchedgifjZhi^dcd[i]ZcZmihiZe# NOTE If the PVeeanaV\3ZmeZXiZYaV\Vii]Zad\^XVahiVcYWnR but PVeean aV\·igVchedgiaV\1ZmeZXiZYaV\Vii]Zad\^XVahiVcYWnR! then it is the redo transport that is keeping SQL Apply behind, and you need to look at your network.'*
Determining Whether SQL Apply Is the Bottleneck LZ]VkZVagZVYnh]dlcndj]dlidZa^b^cViZi]ZgZYdigVchedgiVhi]ZWdiiaZcZX`#I]ZcZmi i]^c\idYdl^aaWZidadd`Vindjg6LGVcY6H=gZedgi#I]^hl^aaZcVWaZndjid^YZci^[ndi]Zg WdiiaZcZX`h^ci]ZhnhiZb#;dg^chiVcXZ!ndjbVnWZVWaZid^YZci^[nVfjZgni]Vi^hYd^c\V[jaa iVWaZhXVcVcYXdbeZi^c\l^i]HFA6eean^ciZgbhd[8EJVcY>$DgZhdjgXZh!dgndjbVn[^cY i]ViVcjeYViZhiViZbZci^hhjZY[gdbHFA6eean^hjh^c\VWVYeaVcVcYcdie^X`^c\jeVc^cYZm i]Vi^ih]djaY]VkZ!VcYhddc#
Determining Which SQL Apply Component Is the Bottleneck DcXZndj]VkZZhiVWa^h]ZYi]ViHFA6eean^h^cYZZYi]ZWdiiaZcZX`!ndjcZZYid[^cYdjil]^X] eVgid[HFA6eeanid[dXjhdc#I]Z[^ghifjZgnidbV`ZhjX]VYZiZgb^cVi^dc^hidadd`Vii]Z egdYjXZg"XdchjbZge^eZa^cZ#>hi]Ze^eZa^cZ[jaa4 SQL> SELECT NAME, VALUE 'TRANSACTIONS%'; NAME -------------------TRANSACTIONS APPLIED TRANSACTIONS MINED
FROM V$LOGSTDBY_STATS WHERE NAME LIKE VALUE ------3764 4985
I]ZYZei]d[i]Ze^eZa^cZViVcn\^kZci^bZ^h(transactions mined – transactions applied)#Ndj l^aa]VkZidgjci]^hfjZgnVgdjcY&%dgbdgZi^bZhVi&"b^cjiZ^ciZgkVah#>[i]Zh^oZd[i]Ze^eZa^cZ ^hValVnhVgdjcYildi^bZhi]ZcjbWZgd[Veea^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S FROM V$LOGSTDBY_PROCESS WHERE TYPE = 'PREPARER' AND STATUS_CODE = 1616628; IDLE_PREPARER ------------0
2. BV`ZhjgZi]Vii]ZeZV`h^oZ^hlZaaWZadli]ZVbdjciVaadXViZY/ SQL> SELECT USED_MEMORY_SIZE FROM V$LOGMNR_SESSION WHERE SESSION_ID = (SELECT VALUE FROM V$LOGSTDBY_STATS WHERE NAME = 'LOGMINER SESSION ID'); USED_MEMORY_SIZE ---------------32522244
3. KZg^[ni]Vii]ZEG:E6G:GYdZhcdi]VkZZcdj\]gZVYnldg`[dgi]Z6EEA>:GegdXZhhZh/ SQL> SELECT (AVAILABLE_TXN PINNED_TXN) AS PIPELINE_DEPTH FROM V$LOGMNR_SESSION WHERE SESSION_ID = (SELECT VALUE FROM V$LOGSTDBY_STATS WHERE NAME = 'LOGMINER SESSION ID'); PIPELINE_DEPTH --------------8 SQL> SELECT COUNT(*) AS APPLIER_COUNT FROM V$LOGSTDBY_PROCESS WHERE TYPE = 'APPLIER'; APPLIER_COUNT ------------20
',
CdiZ^i^hY^[[^Xjaiid[^cYVEG:E6G:Gi]Vi^hcdi^cVc^YaZhiViZ!WZXVjhZ^cbdhiXVhZhi]ZnVgZlVnV]ZVYd[i]Z 6EEA>:GegdXZhhZh#Hdndjl^aacZZYidgjci]^hfjZgn^cVi^\]iaddeid\ZiVkVa^YgZhjai# '- DG6"&+&++/HFA6eeanegdXZhh^h^YaZ#
8]VeiZg)/ Ad\^XVaHiVcYWn
161
6ii]^hed^ci!Vaai]gZZXdcY^i^dch[dg^cXgZVh^c\i]ZcjbWZgd[EG:E6G:GH]VkZWZZcbZi# Cdl]dlYdndj^cXgZVhZi]ZcjbWZgd[egZeVgZgh47Z[dgZndjYdi]Vi!lZcZZYidadd`Vi]dl HFA6eeanVaadXViZhegdXZhhZh^c^ihY^hedhVa#HFA6eeanZmedhZhi]gZZeVgVbZiZghidXdcigdai]Z cjbWZgd[egdXZhhZh/MAX_SERVERS!PREPARE_SERVERS!VcYAPPLY_SERVERS#I]Z[daadl^c\ XdcY^i^dc]daYh/ MAX_SERVERS29 = PREPARE_SERVERS + APPLY_SERVERS + 3
JhjVaanndjh^beanheZX^[nMAX_SERVERSVcYaZiHFA6eeanY^k^YZi]ZVkV^aVWaZegdXZhhZh Vbdc\i]ZVeeanXdbedcZciVcYi]Zb^c^c\XdbedcZci#7nYZ[Vjai!HFA6eeanjhZhVegdXZhh VaadXVi^dcVa\dg^i]bi]ViVaadXViZhdcZPREPARE_SERVER[dgZkZgn'%hZgkZgegdXZhhZhVaadXViZY idHFA6eeanVhheZX^[^ZYWnMAX_SERVERS#>iVahda^b^ihi]ZcjbWZgd[PREPARE_SERVERSid*# I]jh!^[ndjhZiMAX_SERVERSidVcnkVajZWZilZZc&VcY'%!HFA6eeanVaadXViZhdcZhZgkZg egdXZhhidVXiVhVEG:E6G:G!VcYVaadXViZhi]ZgZhid[i]ZegdXZhhZhVh6EEA>:GHl]^aZhVi^h[n^c\ i]ZgZaVi^dch]^eegZk^djhanYZhXg^WZY#H^b^aVgan!^[ndjhZiMAX_SERVERSidVkVajZWZilZZc'&VcY )%!HFA6eeanVaadXViZhildhZgkZgegdXZhhZhidVXiVhEG:E6G:GHVcYi]ZgZhiVh6EEA>:GH#HFA 6eeanVaadlhndjiddkZgg^YZi]^hegdXZhhVaadXVi^dc[dgbjaVWnhZii^c\APPLY_SERVERSVcY PREPARE_SERVERSY^gZXian!egdk^YZYi]Vii]ZgZaVi^dch]^eVbdc\i]Zi]gZZeVgVbZiZghhiVnhigjZ# Hd!^cdjgXVhZ!lZldjaYa^`Zid^cXgZVhZi]ZEG:E6G:GegdXZhhZhidi]ZkVajZ(!l]^aZ `ZZe^c\i]Z6EEA>:GegdXZhhZhVii]ZhVbZcjbWZgd[(%#IdYdi]^h!lZl^aa[^ghicZZYid^cXgZVhZ i]ZcjbWZgd[MAX_SERVERS[gdb(*id(+!VcYi]ZcheZX^[^XVaanhZiPREPARE_SERVERSid(#(% SQL> EXECUTE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ViV<jVgY&&g=VcYWdd` N NdjhZZi]Zb^c^c\Zc\^cZeV\^c\djibZbdgnViVcjcVXXZeiVWaZgViZVcdgbVa^oZY gViZd[bdgZi]Vc*eZgXZci^hjcVXXZeiVWaZ#
LZ]VkZVagZVYnh]dlcndj]dlidYZiZgb^cZi]Z[^ghii]gZZXdcY^i^dch#LZlVciidgZ^iZgViZ i]ViidhZZi]ZkVg^Vi^dc^ch^oZ!ndjl^aacZZYidgjci]ZfjZgnV\V^chiv$logmnr_sessionZkZgn [ZlhZXdcYh# LZ]VkZVahdh]dlc]dlidXdbejiZ>9A:egZeVgZgh#NdjXVcYZiZgb^cZl]Zi]Zgi]Z 7J>A9:GegdXZhh^h^YaZ^cVh^b^aVg[Vh]^dc#I]^hfjZgncZZYhidWZgjcZkZgn[ZlhZXdcYhVh lZaa# CdllZ¼aah]dlndj]dlidXdbejiZi]ZcdgbVa^oZYeV\ZdjiVXi^k^in#IdYdi]^h!ndjl^aa ]VkZiddWiV^cViaZVhiildhcVeh]dihd[eV\ZdjiVXi^k^indkZgVc^ciZgkVad[*id&%b^cjiZh# STEP 1. ISSUE THE FIRST QUERY. SQL> SELECT NAME, VALUE FROM V$LOGSTDBY_STATS WHERE NAME LIKE '%PAGE%' OR NAME LIKE '%UPTIME%' OR NAME LIKE '%IDLE%'; NAME ---------------------------COORDINATOR UPTIME (SECONDS) BYTES PAGED OUT SECONDS SPENT IN PAGEOUT SYSTEM IDLE TIME IN SECS
VALUE ------------1200856 30000 78 3210
STEP 2. ISSUE THE QUERY AGAIN SAY IN 10 MINUTES. SQL> SELECT NAME, VALUE FROM V$LOGSDTBY_STATS WHERE NAME LIKE '%PAGE%' OR NAME LIKE '%UPTIME%' OR NAME LIKE '%IDLE%'; NAME VALUE -------------------------- --------------COORDINATOR UPTIME(SECONDS) 1201456 BYTES PAGED OUT 1020000 SECONDS SPENT IN PAGEOUT 205 SYSTEM IDLE TIME IN SECS 3210 STEP 3. COMPUTE THE NORMALIZED PAGEOUT ACTIVITY. FOR EXAMPLE: CHANGE IN COORDINATOR UPTIME (U)= (1201456 1200856) = 600 SECS AMOUNT OF ADDITIONAL IDLE TIME (I)= (3210 3210) = 0 CHANGE IN TIME SPENT IN PAGEOUT (P) = (205 78) = 127 SECS PAGEOUT TIME IN COMPARISON TO UPTIME = P/(U-I) = 127/600 20%
Ndjh]djaYlg^iZVEA$HFAegdXZYjgZi]ViiV`ZhVc^ciZgkVaVcYegdk^YZhi]ZcdgbVa^oZY eV\ZdjicjbWZg#>YZVaan!i^bZheZci^ceV\Zdjih]djaYWZaZhhi]Vc*eZgXZcid[i]Zjei^bZ#Cdl ^i^hjhjVaanVXXZeiVWaZ[dgcdgbVa^oZYeV\ZdjiidWZ]^\]Zgi]Vci]ZZmeZXiZYi]gZh]daY ^c[gZfjZcian!Wji^[ndjXdci^cjZidiV`ZhcVeh]dihVcYXdbejiZi]^hkVajZ!VcYndj[^cYi]Vii]Z cdgbVa^oZYeV\Zdji`ZZehk^daVi^c\i]ZVXXZeiVWaZi]gZh]daY!ndjl^aacZZYid^cXgZVhZi]ZA8G XVX]Zh^oZ#DcXZndj]VkZYZiZgb^cZYi]Vindjl^aacZZYidX]Vc\Zi]ZMAX_SGA!i]ZhiViZbZci ^hkZgnh^beaZ/ SQL> EXECUTE DBMS_LOGSTDBY.APPLY_SET( NAME => 'MAX_SGA', VALUE => 1024);
8]VeiZg)/ Ad\^XVaHiVcYWn
163
Tuning the Apply Engine 6ii]^hed^ci!ndj]VkZYZiZgb^cZYi]Vii]ZVeeanXdbedcZci^hi]ZWdiiaZcZX`#
Increasing the Number of APPLIER Processes
I]Z[daadl^c\XdcY^i^dchbjhiWZbZi/
N I]Ze^eZa^cZWZilZZci]Zb^c^c\VcYVeeanXdbedcZci!^cdi]ZgldgYhi]ZA8GXVX]Z! ]VhZcdj\]gZVYnldg`VkV^aVWaZ# N I]ZgZ^hcd^YaZ6EEA>:GegdXZhhdgi]ZgZVgZjcVhh^\cZYaVg\ZigVchVXi^dch# LZ]VkZVagZVYnh]dlZYndj]dlidYZiZgb^cZl]Zi]Zgi]ZgZVgZcd^YaZ6EEA>:GegdXZhhZh# CdlaZi¼hadd`Vi]dlndjYZiZgb^cZl]Zi]ZgjcVhh^\cZYaVg\ZigVchVXi^dchZm^hi# STEP 1 (LOOK AT THE DEPTH OF THE PIPELINE BETWEEN THE MINING ENGINE AND THE APPLY ENGINE) SQL> SELECT (AVAILABLE_TXN PINNED_TXN) AS PIPELINE_DEPTH FROM V$LOGMNR_SESSION WHERE SESSION_ID = (SELECT VALUE FROM V$LOGSTDBY_STATS WHERE NAME = 'LOGMINER SESSION ID'); PIPELINE_DEPTH --------------256 SQL> SELECT COUNT(*) AS APPLIER_COUNT FROM V$LOGSTDBY_PROCESS WHERE TYPE = 'APPLIER'; APPLIER_COUNT ------------20 STEP 2(A): LOOK FOR IDLE APPLIERS SQL> SELECT COUNT(1) AS IDLE_APPLIER FROM V$LOGSTDBY_PROCESS WHERE TYPE = 'APPLIER' AND STATUS_CODE = 16166; IDLE_APPLIER -----------3
CdiZi]ViHFA6eeanjhZhV`HV[ZVa\dg^i]b[dgigVchVXi^dcVhh^\cbZci/^i]daYhkVeea^Zgh Vh^YZ[dgVeean^c\XdbeaZiZXdbb^iiZYigVchVXi^dch#7nYZ[Vjai!HFA6eeanhZihk(& idWZ Veegdm^bViZan&$+d[i]ZcjbWZgd[Veea^ZgegdXZhhZh#I]jh!ndjbVn]VkZVc^hhjZ!ZkZci]dj\] ndj[^cYVeea^Zghi]ViVgZ^YaZ^cndjghnhiZb# STEP 2(B): LOOK FOR UNASSIGNED LARGE TRANSACTIONS SQL> SELECT VALUE FROM V$LOGSTDBY_STATS WHERE NAME = 'LARGE TXNS WAITING TO BE ASSIGNED'; VALUE ---------12
(&
CdiZkbjhiViaZVhiWZ&dg\gZViZg!di]Zgl^hZndjbVnVhh^\cVaaVeea^ZghidjcXdbb^iiZYigVchVXi^dchVcY\Zi ^cidVYZVYadX`#
164
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Determining Ill-behaved Workloads 6hbZci^dcZY!HFA6eeanhX]ZYjaZh99AhiViZbZcih hZg^Vaan#NdjXVcYZiZgb^cZi]ZcjbWZgd[99AigVchVXi^dch^cndjgldg`adVYWnfjZgn^c\i]Z v$logstdby_statsk^Zl/ SQL> SELECT NAME, VALUE NAME -------------DDL TXNS DELIVERED
FROM V$LOGSTDBY_STATS WHERE NAME = 'DDL TXNS DELIVERED'; VALUE --------------------------510
CdiZi]Vii]^hegdk^YZhi]ZidiVacjbWZgd[99AigVchVXi^dchi]Vi]VkZWZZcYZa^kZgZYidi]Z VeeanZc\^cZh^cXZi]ZaVhigZhiVgi#Ndjl^aacZZYid^hhjZi]^hfjZgndkZgVaVg\Z^ciZgkVaVcY hjWigVXii]ZildkVajZhidhZZ]dlbVcn99AhiViZbZcihlZgZYZa^kZgZYidi]ZVeeanZc\^cZ# CdiZi]VicdiVaa99AhiViZbZcihYZa^kZgZYidi]ZVeeanZc\^cZl^aaWZVeea^ZY¸i]Vi^h!99A hiViZbZcihi]ViVgZVhhdX^ViZYl^i]h`^eeZY^ciZgcVahX]ZbVhVgZcdiVeea^ZYWnHFA6eean#
Troubleshooting SQL Apply Ijc^c\HFA6eeanlVhY^hXjhhZY^cVhZeVgViZhZXi^dc¸^i^hValVnh^bedgiVciidZchjgZi]Vindj VgZ\Zii^c\i]Zbdhidjid[ndjgad\^XVahiVcYWn#I]ZgZVgZ!]dlZkZg!di]ZgVgZVh^cl]^X] egdWaZbhXVcdXXjg#H^cXZlZ^cXajYZVhZeVgViZigdjWaZh]ddi^c\X]VeiZg^ci]^hWdd`!lZl^aa XdcXZcigViZdcdcanV[Zl^hhjZh]ZgZgZ\VgY^c\HFA6eean#
Understanding Restarts in SQL Apply H^cXZVaa\ddY976hVgZ^ci]Z]VW^id[bdc^idg^c\i]Z^gVaZgiad\h!^[ndjVgZbVcV\^c\Vad\^XVa hiVcYWnYViVWVhZ!ndjl^aacZZYidbdc^idgi]ZDBA_LOGSTDBY_EVENTSk^Zll^i]ZfjVa^ciZch^in#
Understanding Restarts Due to ORA-4031 NdjbVnhZZi]Z[daadl^c\^ci]ZVaZgiad\/ ORA-4031: UNABLE TO ALLOCATE 2904 BYTES OF SHARED MEMORY ("SHARED POOL","UNKNOWN OBJECT","LOGMINER LCR C","KRVXRGR") INCIDENT DETAILS IN: /U01/APP/ORACLE/DIAG/RDBMS/APPLY/APPLY1/INCIDENT/INCDIR_6246890/APPLY1_MS00_13 611_I6246890.TRC KRVXERPT: ERRORS DETECTED IN PROCESS 47, ROLE READER. KRVXMRS: LEAVING BY EXCEPTION: 4031 ERRORS IN FILE /U01/APP/ORACLE/DIAG/RDBMS/APPLY/APPLY1/TRACE/APPLY1_MS00_13611.TRC: ORA-16234: RESTARTING TO RESET LOGICAL STANDBY LOGSTDBY STATUS: ORA-16111: LOG MINING AND APPLY SETTING UP LOGSTDBY STATUS: APPLY LWM 5368712584, HWM 5368712584, SCN 5368712584 LOGMINER: PARAMETERS SUMMARY FOR SESSION# = 1 LOGMINER: NUMBER OF PROCESSES = 3, TRANSACTION CHUNK SIZE = 201 LOGMINER: MEMORY SIZE = 200M, CHECKPOINT INTERVAL = 1000M
L]Vi^h\d^c\dc4L]nY^YHFA6eean\dYdlcl^i]DG6")%(&46cYl]nY^Y^icdiZcXdjciZg i]ZZggdgdcXZ^igZhiVgiZY4I]ZVchlZg]VhidYdl^i]]dli]Zb^c^c\Zc\^cZbVcV\ZhbZbdgn#
8]VeiZg)/ Ad\^XVaHiVcYWn
165
GZbZbWZgi]ZA8GXVX]Z4>i`ZZehA8Ghi]ViVgZVhhdX^ViZYl^i]bdY^[^XVi^dchbVYZidi]Z YViVWVhZ!VcYY^[[ZgZciA8GhgZfj^gZY^[[ZgZciVbdjcihd[bZbdgn#I]^h^hdWk^djh/Vc^chZgi hiViZbZci^chZgi^c\kVajZhidViVWaZl^i]&%Xdajbchl^aabdhia^`ZangZfj^gZaZhhheVXZi]VcdcZi]Vi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'%
BdY^[nG&d[I&
(%
GdaaWVX`id6
)%
BdY^[nG(d[I&
*% +% TABLE 4-4.
Transaction Y BdY^[nG'idI& BdY^[nG&d[I& 8dbb^i
8dbb^i Sample Valid Transaction History (H2) at the Primary Database
166
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Time/SCN
Applier#1 (X)
Applier#2 (Y)
&&%
BdY^[nG'd[I&
&'%
BdY^[nG&d[I&
&(%
8dbb^i
&)%
HVkZed^ci6
&*%
BdY^[nG&d[I&
&+%
GdaaWVX`id6
&,%
BdY^[nG(d[I&
&-%
8dbb^i
TABLE 4-5. Transaction Schedule (Associated with H2) at the Logical Standby if preserve_ commit_order Is Set to TRUE and with Computation of Row Dependencies CdiZi]Vih^cXZNXdbb^iiZYWZ[dgZM!i]ZgdlYZeZcYZcXndcG&gZhdakZY^cN¼h[VkdgVcY HFA6eeanhX]ZYjaZYNWZ[dgZ^iVaadlZYMidbdY^[ngdlG(' CdllZ¼aaadd`ViVedhh^WaZhX]ZYjaZ((Vii]Zad\^XVahiVcYWni]Vil^aagZhjai^cVYZVYadX`! l]ZcgdlYZeZcYZcX^ZhVgZcdiXdbejiZYhjX]Vh^ci]ZXVhZd[aVg\ZigVchVXi^dch#HZZIVWaZ)"+#
Time/SCN
Applier#1 (X)
Applier#2 (Y)
&&%
HVkZed^ci6
BdY^[nG'd[I&
&'%
BdY^[nG&d[I&
&(%
BdY^[nG&d[I&6eea^Zg'^hWadX`ZY cdl!VcYG97BHejihi]ZegdXZhh^c i]ZIM":CFd[6eea^Zg>il^aaWZ jcWadX`ZYdcanl]ZcMXdbb^ih#
&)%
GdaaWVX`id6
&*%
BdY^[nG(d[I&
&+%
MXVccdibV`Zegd\gZhhcdl^[ preserve_commit_order^h hZi#>ihXdbb^i^hV[iZgi]Vid[N#Hd Vai]dj\]^ihZZhi]ZXdbb^igZXdgY!^i XVccdiXdbb^i#
TABLE 4-6. Transaction Schedule (Associated with H2 ) Leading to Deadlock at the Logical Standby if preserve_commit_order Is Set to TRUE and Without the Computation of Row Dependencies ('
6ai]dj\]Vii]Zeg^bVgnYViVWVhZ!MbdY^[^ZYG&WZ[dgZNY^Y# CdiZi]ViHFA6eeanbVnZkZc\Zii]ZhVbZhX]ZYja^c\i]VilVhjhZYVii]Zeg^bVgnYViVWVhZ#>ci]^hXVhZ!cd YZVYadX`l^aadXXjg#
((
8]VeiZg)/ Ad\^XVaHiVcYWn
167
I]ZCOORDINATORegdXZhheZg[dgbhVYZVYadX`YZiZXi^dcWVhZYdcVi^bZdjikVajZ#DcXZ^i YZiZXihi]ZYZVYadX`!^il^aaVh`6eea^Zg&idgdaaWVX`#>cbVcnXVhZh^[i]^h^hi]Z[^ghiX]jc`i]Vi 6eea^Zg&^hVeean^c\!i]^h^hZcdj\]!h^cXZ6eea^Zg'l^aabV`Zegd\gZhhVcYlZl^aa\ZiWVX`id i]ZhX]ZYjaZh]dlc^cIVWaZ)")#=dlZkZg!^[lZgjc^cidVYZVYadX`b^YlVni]gdj\]VaVg\Z igVchVXi^dc!HFA6eeanl^aacZZYideZg[dgbVXdcigdaaZYgZhiVgi/WjiWZ[dgZYd^c\VgZhiVgi!^il^aa gZbZbWZgi]Vi^i]VYgjc^cidVYZVYadX`VcYi]VidcgZhiVgi^icZZYhidhX]ZYjaZMWZ[dgZNid\Zi VhV[ZhX]ZYjaZ# 7ZXVjhZndjcdl`cdl]dli]^hldg`h!ndjldc¼iWZVaVgbZYl]ZcndjhZZi]Z[daadl^c\ lVgc^c\h^ci]ZVaZgiad\/ LSP0: ROLLING BACK APPLY SERVER 2 LSP0: APPLY SERVER 2 ROLLED BACK LSP0: CAN'T RECOVER FROM ROLLBACK OF MULTI-CHUNK TXN, ABORTING.. LOGSTDBY APPLY PROCESS AS05 SERVER ID=5 PID=41 OS ID=17169 STOPPED LOGSTDBY APPLY PROCESS AS04 SERVER ID=4 PID=40 OS ID=17167 STOPPED LOGSTDBY APPLY PROCESS AS03 SERVER ID=3 PID=39 OS ID=17164 STOPPED LOGMINER: SESSION#=1, BUILDER MS01 PID=28 OS ID=17141 SID=86 STOPPED LOGSTDBY STATUS: ORA-16222: AUTOMATIC LOGICAL STANDBY RETRY OF LAST ACTION LOGSTDBY STATUS: ORA-16111: LOG MINING AND APPLY SETTING UP
Troubleshooting Stopped SQL Apply Ild^bedgiVci^hhjZhXVcXVjhZHFA6eeanidhide#BdgZXVhZhVcYi]Z^ghdaji^dchVeeZVg^c 8]VeiZg&(#
Handling ORA-26786 and ORA-26787 with “Skip Failed Transaction” 6ii^bZhndjl^aa[^cYi]ViHFA6eean]VhhideeZYl^i]dcZd[i]Z[daadl^c\Zggdgh/ N
ORA-26786 I]^h^hgV^hZYl]ZcHFA6eean[^cYhi]ZgdlidWZbdY^[^ZYjh^c\i]Z eg^bVgndgjc^fjZ`Zn^c[dgbVi^dcXdciV^cZYl^i]^ci]ZA8G!Wjii]ZWZ[dgZ"^bV\Zd[i]Z gdlYdZhcdibViX]i]Z^bV\ZXdciV^cZYl^i]^ci]ZA8G#
N
ORA-26787 I]^h^hgV^hZYl]ZcHFA6eeanXVccdi[^cYi]ZgdlidWZbdY^[^ZYjh^c\ i]Zeg^bVgndgjc^fjZ`Zn^c[dgbVi^dcXdciV^cZYl^i]^ci]ZA8G#
HFA6eeanegdk^YZhildlVnhidh`^eV[V^aZYigVchVXi^dc/ N JhZi]ZSKIP_FAILED_TRANSACTIONXaVjhZl]ZchiVgi^c\i]ZHFA6eeanegdXZhhZh N JhZi]Zdbms_logstdby.skip_transactionegdXZYjgZ# DjgVYk^XZ^hi]gZZ[daY/ N L]Zcndjh`^eV[V^aZYigVchVXi^dc^cdi]ZgldgYh!VigVchVXi^dci]ViXVjhZYHFA6eean idhide!ndjl^aacZZYidiV`ZXdbeZchVi^c\VXi^dchVii]Zad\^XVahiVcYWn# N NdjXVcjhZi]ZSKIP_FAILED_TRANSACTIONXaVjhZ^[ndj`cdli]Vii]ZigVchVXi^dc ^hV99AigVchVXi^dc!VcYndjXVcZ^i]Zg^\cdgZi]Z99AhV[ZanVii]Zad\^XVahiVcYWndg gZ^hhjZ^indjghZa[#
168
DgVXaZ9ViV<jVgY&&g=VcYWdd` N 7ZkZgnlVgnd[jh^c\SKIP_TRANSACTIONdgSKIP_FAILED_TRANSACTIONl]Zc YZVa^c\l^i]9BAigVchVXi^dch#Ndjl^aah^beanWZbdk^c\i]ZegdWaZbidVeeZVg hdbZi^bZ^ci]Z[jijgZ#
7Z[dgZndjh`^eVigVchVXi^dc!HFA6eeanlg^iZhi]Z[daadl^c\^ci]ZVaZgiad\VcYVahd^c DBA_LOGSTDBY_EVENTSWZ[dgZ^ihideh/ LOGSTDBY STMT: UPDATE "SALES"."CUSTOMER" SET "FIRST_NAME" = 'JOHN' WHERE "CUSTOMER_ID" = 21340 AND "FIRST_NAME" = 'JAHN' AND ROWID = 'AAAAAAAAEAAAAAPAAA' LOGSTDBY STATUS: ORA-26786: A ROW WITH KEY 21340 EXISTS BUT HAS CONFLICTING COLUMNS FIRST_NAME IN TABLE SALES.CUSTOMER LOGSTDBY PID 1006, ORACLE@STACO03 (P004) LOGSTDBY XID 0X0006.00E.00000417, THREAD 1, RBA 0X02DD.00002221.10
I]^hYdZhcdi\^kZndjVcn^c[dgbVi^dcVWdjil]ZgZi]ZigVchVXi^dchiVgiZY#NdjXVc! ]dlZkZg!jhZi]ZFLASHBACK_TRANSACTION_QUERY()k^ZlVii]Zeg^bVgnYViVWVhZid[^cYdji i]ZH8CVil]^X]i]ZigVchVXi^dchiVgiZY# SQL> SELECT START_SCN, COMMIT_SCN FROM FLASHBACK_TRANSACTION_QUERY WHERE XID = HEXTORAW(000600E00000417); START_SCN COMMIT_SCN ------------------56152032 56159340
Cdli]Vindj]VkZi]Zstart_scnVcYcommit_scn!ndjXVcgjci]Z[daadl^c\fjZgnVii]Z eg^bVgnYViVWVhZidb^cZi]ZVgX]^kZYad\hjh^c\DgVXaZ¼hAd\B^cZgji^a^in/ SQL> EXECUTE DBMS_LOGMNR.START_LOGMNR (STARTSCN => 56152032, ENDSCN => 56159340, OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG35 + DBMS_LOGMNR.CONTINUOUS_MINE); SQL> SELECT DISTINCT SEG_OWNER, TABLE_NAME FROM V$LOGMNR_CONTENTS WHERE XID = HEXTORAW(000600E00000417);
I]^hl^aagZijgcVaai]ZY^hi^cXiiVWaZhbdY^[^ZYWni]ZigVchVXi^dc#>[ndjlVciid`cdll]Vi i]ZVXijVaX]Vc\ZhlZgZ!ndjXVci]Zc^hhjZi]Z[daadl^c\fjZgn/ SQL> SELECT SQL_REDO FROM V$LOGMNR_CONTENTS WHERE XID = HEXTORAW(000600E00000417);
()
CdiZi]Vii]ZXdajbcM>9^hd[ineZG6L^chiZVYd[i]Zi]gZZ"ijeaZeg^ciZY^ci]ZVaZgiad\#NdjXVch^bean VeeZcYi]Zi]gZZXdbedcZcihVcYVeeani]ZHEXTORAW[jcXi^dcdci]Viid\Zii]ZM>9cZZYZY[dgi]ZFLASHBACK_ TRANSACTION_QUERYk^Zl# (* I]ZfjZgniZaahDgVXaZAd\B^cZgid[^cYi]ZVgX]^kZYad\[^aZhWZilZZci]ZH8CgVc\Z*+&*'%('VcY*+&*.()% [gdbi]ZXdcigda[^aZi]ZY^gZXi^kZcontinuous_mine!VcYjhZi]Zdca^cZYViVY^Xi^dcVgnd[i]ZYViVWVhZi]Z directive dict_from_online_catalogid^ciZgegZii]ZgZYdgZXdgYh[djcY#
8]VeiZg)/ Ad\^XVaHiVcYWn
169
BV`ZhjgZi]Vindj]VkZheddaZYi]ZdjiejiidViZmi[^aZ#DcXZndjVgZYdcZjh^c\Ad\B^cZg! h^beanZcYi]ZAd\B^cZghZhh^dcWn^hhj^c\i]Z[daadl^c\/ SQL> EXECUTE DBMS_LOGMNR.END_LOGMNR();
Handling ORA-04042 “Procedure, Function, Package, or Package Body Does Not Exist” I]^hZggdg^hbdhia^`ZanYjZidHFA6eeanZcXdjciZg^c\V 0) OR ((INSTR(UPPER(OLD_STMT),'REVOKE')) > 0) THEN IF SCHEMA IS NULL THEN INTERNAL_SCHEMA := 1; ELSE SELECT COUNT(1) INTO INTERNAL_SCHEMA FROM DBA_LOGSTDBY_SKIP WHERE OWNER = SCHEMA AND STATEMENT_OPT = 'INTERNAL SCHEMA'; END IF; END IF; IF INTERNAL_SCHEMA <> THEN NEW_STMT := NULL; -- RECORD THE FACT THAT WE JUST SKIPPED AN ERROR (CODE NOT SHOWN HERE) END IF; END IF; END HANDLE_ERROR_DDL; / 2. REGISTER THE SKIP_ERROR PROCEDURE WITH SQL APPLY SQL> EXECUTE DBMS_LOGSTDBY.SKIP_ERROR ( STATEMENT => 'NON_SCHEMA_DDL', -
170
DgVXaZ9ViV<jVgY&&g=VcYWdd`
SCHEMA_NAME => NULL, OBJECT_NAME => NULL, PROC_NAME => 'SYS.HANDLE_ERROR_DDL');
Conclusion DcXZV\V^c!i]ZX]VeiZg]VhWZZcadc\!WjilZ]deZ^i]VhWZZc^chigjXi^kZ#I]ZbV_dg^ind[i]Z egdWaZbhi]VieZdeaZZcXdjciZg^ci]ZXdciZmid[V9ViV<jVgY^beaZbZciVi^dcXVcWZViig^WjiZYid b^hjcYZghiVcY^c\h#I]Z[VXii]VindjVgZgZVY^c\i]^hWdd`WZ[dgZY^k^c\^cidYZeadnbZci^hVh^\c i]VindjVgZ^ci]ZegjYZcib^cdg^in#=ZgZ¼hdcZbdgZe^ZXZd[VYk^XZgZ\VgY^c\Vad\^XVahiVcYWn YZeadnbZci/The performance of a logical standby depends heavily on your workload at the primary. Ndjg[^ghidgYZgd[Wjh^cZhh^hidXgZViZVad\^XVahiVcYWnd[[ndjgXjggZcieg^bVgnYViVWVhZ VcYaZi^igjc[dgVl]^aZ#I]^hlVn!ndjl^aa\ZiVX]VcXZidign^idjidca^kZYViV!VcYndjXVc VahdkVa^YViZhdbZd[i]Z^hhjZhlZY^hXjhhZY^ci]^hX]VeiZg#
CHAPTER
5 >beaZbZci^c\DgVXaZ 9ViV<jVgY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liable Interface for Data Guard Cdi]^c\XdjaYWZ[jgi]Zg[gdbi]Zigji]#I]Z7gd`Zg]VhWZZcZkdak^c\h^cXZDgVXaZ.iVcY^h cdidcanVgZa^VWaZ^ciZg[VXZid9ViV<jVgY!Wji^hi]ZkZgn[djcYVi^dcjedcl]^X]bVcnd[ i]Z9ViV<jVgY[ZVijgZhVgZWj^ai!^cXajY^c\;Vhi"HiVgi;V^adkZg#
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
173
TIP Once you start using the Broker you must always use the Broker to make any changes to your Data Guard configuration. This means that you must use Grid Control or the Broker CLI DGMGRL to change any Data Guard settings. If you use SQL*Plus to make configuration changes, the Broker will put things back the way it sees the world or this will lead to inconsistencies between the Broker configuration parameters and the database.
The Broker Process Model 6hl^i]9ViV<jVgY¼higVchedgiVcYVeean[jcXi^dch!i]Z7gd`ZgjhZhVhZid[WVX`\gdjcYegdXZhhZh dcZVX]YViVWVhZ^cV9ViV<jVgYXdc[^\jgVi^dcidbdc^idgVcYbVcV\Zi]ZhZije#I]ZWVh^X egdXZhhZhVgZh]dlc^c;^\jgZ*" 6aai]Z7gd`ZgegdXZhhZhVgZhiVgiZYWni]Z7gd`Zgl]Zc^i^hZcVWaZYVcYi]ZYViVWVhZ^hhiVgiZY# Ndj!Vhi]Z976!]VkZcdXdcigdadkZgl]ViegdXZhhZhVgZhiVgiZYdg]dlbVcn0i]Vi^hXdbeaZiZan jeidi]Z7gd`Zg#>il^aahiVgiZVX]d[i]ZhZegdXZhhZhdcVaai]ZYViVWVhZh^cndjgXdc[^\jgVi^dc!i]Z [^ghiWZ^c\i]Z9ViV<jVgYBdc^idg9BDC!ZmeaV^cZYcZmi#I]ZegdXZhhZhVcY[^aZh^c;^\jgZ*"& VgZYZ[^cZYVh[daadlh/ N
Data Guard Monitor (DMON) I]^h7gd`Zg"XdcigdaaZgegdXZhh^hi]ZbV^c7gd`Zg egdXZhhVcY^hgZhedch^WaZ[dgXddgY^cVi^c\Vaa7gd`ZgVXi^dchVhlZaaVhbV^ciV^c^c\ i]Z7gd`ZgXdc[^\jgVi^dc[^aZh#I]^hegdXZhh^hZcVWaZYdgY^hVWaZYl^i]i]ZDG_BROKER_ STARTeVgVbZiZg#
N
Broker Resource Manager (RSM) I]ZGHB^hgZhedch^WaZ[dg]VcYa^c\VcnHFAXdbbVcYh jhZYWni]Z7gd`Zgi]VicZZYidWZZmZXjiZYdcdcZd[i]ZYViVWVhZh^ci]ZXdc[^\jgVi^dc# I]ZhZHFAXdbbVcYhVgZbVYZVhVgZhjaid[VX]Vc\Zidi]ZXdc[^\jgVi^dcbVYZi]gdj\] 9
Configuration Files
Standby Database
DMON
RSM
NSV
DRC
DRC
NSV
RSM
DMON Primary Database Configuration Files
FIGURE 5-1.
Data Guard Broker main processes
174
DgVXaZ9ViV<jVgY&&g=VcYWdd` N
Data Guard Net Server (NSVn) ;gdb&idnd[i]ZhZcZildg`hZgkZgegdXZhhZhXVc Zm^hi#I]ZnVgZgZhedch^WaZ[dgbV`^c\XdciVXil^i]i]ZgZbdiZYViVWVhZVcYhZcY^c\ VXgdhhVcnldg`^iZbhidi]ZgZbdiZYViVWVhZ#8dccZXi^dchidi]ZgZbdiZYViVWVhZVgZ bVYZjh^c\i]ZhVbZXdccZXi^YZci^[^Zgi]VindjheZX^[^ZY[dgi]ZYViVWVhZl]Zcndj XgZViZYi]ZXdc[^\jgVi^dc#
N
DRCn I]ZhZcZildg`gZXZ^kZgegdXZhhZhZhiVWa^h]i]ZXdccZXi^dc[gdbi]ZhdjgXZ YViVWVhZCHKnegdXZhh#6cCHKnid9G8nXdccZXi^dc^hh^b^aVgidi]ZAd\Lg^iZg CZildg`HZgk^XZACHidGZbdiZ;^aZHZgkZgG;HXdccZXi^dc[dgGZYdIgVchedgi# 6hl^i]GZYdIgVchedgi!l]Zci]Z7gd`ZgcZZYhidhZcYhdbZi]^c\YViVdgHFA![dg ZmVbeaZWZilZZcYViVWVhZh!^ijhZhi]^hCHKid9G8XdccZXi^dc#I]ZhZXdccZXi^dchVgZ hiVgiZYVhcZZYZY#
N
Configuration files I]Z7gd`ZghidgZhVaad[i]ZXdc[^\jgVi^dcYZiV^ah^ci]ZhZildW^cVgn XdbbVcY[^aZh#I]gdj\]i]ZYViV^ci]ZhZ[^aZh!i]Z7gd`Zg`cdlhl]ViYViVWVhZhbV`Z jei]ZXdc[^\jgVi^dc!i]Z^gXjggZci^ciZcYZYhiViZh!]dlidXdccZXiidZVX]dcZ!VcYl]Vi eVgVbZiZghidhZijel]ZcZVX]YViVWVhZhiVgihje#
NOTE Configuration files are flat files stored either on the operating system or inside Automatic Storage Management (ASM). The Broker manages these files, and they are not to be manipulated by you.
The Broker Process Flow >cV7gd`ZgXdc[^\jgVi^dc^i^hi]Z9ViV<jVgYBdc^idg9BDCegdXZhhdci]Zeg^bVgnYViVWVhZi]Vi ^hi]ZdlcZgd[i]ZXdc[^\jgVi^dc#:kZci]dj\]ndjbVnViiVX]idVcnYViVWVhZ^cVXdc[^\jgVi^dc jh^c\i]Z9!VaahiVcYWnYViVWVhZhbjhi\Zii]Z^gbVgX]^c\dgYZgh[gdbi]Zeg^bVgn 9BDC!VcYVaaXdbbVcYhidbdY^[ni]ZXdc[^\jgVi^dc!gZ\VgYaZhhd[l]^X]YViVWVhZndjVgZ XdccZXiZYid!VgZYdcZi]gdj\]i]Zeg^bVgn# >c;^\jgZ*"&!i]ZXdbbjc^XVi^dcWZilZZci]Zeg^bVgn9BDCegdXZhhVcYi]ZYViVWVhZh ^hh]dlcWnhda^Ya^cZh#L]Zci]Z9BDCcZZYhidXdbbjc^XViZl^i]i]ZhiVcYWnYViVWVhZh! ^ijhZhdcZd[i]ZCHKegdXZhhZhidhZcYldg`idVhiVcYWn#I]^h^h^ciZcYZYidegdiZXii]Z 9BDC[gdbVcZildg`]Vc\^[i]Za^c`\dZhYdlc^ci]Zb^YYaZd[i]^hhZcYVcYgZXZ^kZ egdXZhh#6cZmVbeaZd[i]^h`^cYd[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V[iZgVcCHKegdXZhh hiVgihje/ NSV1 started with pid=21, OS id=8962 *********************************************************************** Fatal NI connect error 12514, connecting to: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Matrix_DR.domain.com)(PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=Matrix_DR0_DGB.domain.com) (CID=(PROGRAM=oracle)(HOST=Matrix_DR)(USER=oracle)))) ... TNS-12564: TNS:connection refused ns secondary err code: 0 nt main err code: 0 nt secondary err code: 0 nt OS err code: 0
7ZXVjhZi]Zeg^bVgnYViVWVhZXVccdiXdccZXi!cd^c[dgbVi^dcXVcWZhZciidi]ZhiVcYWn#I]Z eg^bVgnYViVWVhZl^aaXdci^cjZidhiVgijeVcYi]Z7gd`Zgl^aaZmZXjiZVaai]ZhZijeXdbbVcYh jh^c\i]ZadXVaGHBegdXZhhidZmZXjiZi]ZHFAhiViZbZcih#Ndjl^aahZZdi]ZgICH"&'*+)Zggdgh V[iZgi]^h^ci]ZVaZgiad\l]Zci]ZGZYdIgVchedgiACHegdXZhhig^ZhidXdccZXiVhlZaaVhVcn ;ZiX]6gX]^kZAd\;6A\VegZhdaji^dcViiZbeih# L]Zci]Zeg^bVgn9BDC^hhjXXZhh[ja^cXdccZXi^c\idi]ZhiVcYWnYViVWVhZ!^il^aa^chigjXi i]ZadXVaGHBidhZcYi]ZhZijeXdbbVcYhidi]ZhiVcYWnYViVWVhZ#I]ZhZXdbbVcYhldjaY YZ[^cZi]ZcZXZhhVgn9ViV<jVgYeVgVbZiZghVcYhiVgii]ZVeeanhZgk^XZh^[gZfj^gZY#I]ZGHBl^aa hZcYi]ZhZXdbbVcYhjh^c\i]ZCHK·9G8XdccZXi^dceV^g# I]ZXdbbjc^XVi^dcWZilZZcVhiVcYWnYViVWVhZVcYi]Zeg^bVgnYViVWVhZ^hh]dlc^c ;^\jgZ*"&Wni]ZYVh]ZYa^cZh#L]ZcZkZgVhiVcYWnYViVWVhZhiVgihje!i]Z9BDCegdXZhhl^aa ^c^i^ViZVXdccZXi^dcidi]Zeg^bVgnYViVWVhZid[^cYdjil]Vi^ih]djaYWZYd^c\#GZbZbWZgi]Vi i]Zeg^bVgnYViVWVhZXdcigdahi]ZXdc[^\jgVi^dc#>[i]Zeg^bVgnYViVWVhZ^hcdigZVX]VWaZi]Z cZildg`dgeg^bVgnYViVWVhZ^hYdlc!i]^hXdccZXi^dcl^aa[V^a!VcYndjl^aahZZVICHZggdg^c i]ZhiVcYWnYViVWVhZ¼hVaZgiad\!Vh[daadlh/ Fatal NI connect error 12514, connecting to: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=Matrix.domain)(PORT=1521)) (CONNECT_DATA=(SERVER=DEDICATED) (SERVICE_NAME=Matrix.domain)(CID=(PROGRAM=oracle) (HOST=Matrix)(USER=oracle)))) . . . TNS-12564: TNS:connection refused ns secondary err code: 0 nt main err code: 0 nt secondary err code: 0 nt OS err code: 0
NdjXVciZaa[gdbi]ZICH^c[dgbVi^dci]Vii]^h^hVXdccZXi^dcidi]Zeg^bVgnYViVWVhZXVaaZY BVig^mVcYcdihdbZdi]Zg`^cYd[cZildg`Zggdg#I]Z[^m]ZgZ^hZ^i]ZgidhiVgijei]Zeg^bVgndg [^mi]ZcZildg`ZggdgXdcY^i^dc#I]^h`^cYd[Zggdgl^aaXVjhZVYZaVn^ci]ZhiVgijed[i]ZhiVcYWn YViVWVhZVhi]Z7gd`Zgig^ZhidYZiZgb^cZl]Vi^ih]djaYWZYd^c\#
176
DgVXaZ9ViV<jVgY&&g=VcYWdd`
INSV
INSV
INSV
INSV
Data Guard Primary Database
FIGURE 5-2.
Standby Database
Data Guard Broker RAC processes
^ci]^hX]VeiZg#DcXZi]Z7gd`Zg]Vhig^ZYidXdccZXiidi]Zeg^bVgnVXdjeaZd[i^bZh!i]ZhiVgije d[i]ZhiVcYWnYViVWVhZl^aaXdci^cjZV[iZgl]^X]i]Z7gd`Zgl^aaXdci^cjZidViiZbeiidXdccZXi idi]Zeg^bVg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iVcXZh^ci]ZG68# TIP Make sure you change the default location of the Broker configuration files before you start using the Broker. Their placement is controlled by the database parameters R ER LE and R ER LE . I]^hXdc[^\jgVi^dc^c[dgbVi^dc^hgZ[ZggZYidVhi]Zpropertiesd[i]ZXdc[^\jgVi^dcVcY^h Y^k^YZY^cid8dc[^\jgVi^dc"L^YZVcY>cY^k^YjVa9ViVWVhZegdeZgi^Zh#>cVYY^i^dc!i]Z7gd`ZgjhZh i]ZXdc[^\jgVi^dc[^aZhid`ZZeigVX`d[i]Z^ciZcYZYhiViZ^c[dgbVi^dc[dgZVX]YViVWVhZ#I]Z Xdc[^\jgVi^dc[^aZhd[VaaYViVWVhZhVgZ`Zei^chncXWni]Z7gd`Zg!Wjii]Z9BDCegdXZhhd[ i]Zeg^bVgnYViVWVhZ^hi]ZdlcZgd[i]ZbVhiZgXdend[i]Z[^aZh#8]Vc\ZhbVYZidVcnYViVWVhZ Xdc[^\jgVi^dcegdeZgin!gZ\VgYaZhhd[l]^X]YViVWVhZndj]VkZXdccZXiZYid!VgZX]VccZaZYWVX`id i]Zeg^bVgnYViVWVhZ9BDCegdXZhh!l]^X]i]ZcjeYViZhi]Zeg^bVgnYViVWVhZXdc[^\jgVi^dc[^aZh# I]ZXdc[^\jgVi^dc[^aZjeYViZ[adl^hh]dlc^c;^\jgZ*"&WnYdiiZYa^cZh#I]Zeg^bVgn9BDC egdXZhhjeYViZhi]ZadXVaXdc[^\jgVi^dc[^aZl]Zci]Z9ViVWVhZ6Yb^c^higVidg976bV`Zh X]Vc\Zhidi]ZegdeZgi^Zhd[i]ZXdc[^\jgVi^dc#I]^h^c[dgbVi^dc^hi]ZchZciidVaahiVcYWn YViVWVhZhjh^c\i]ZcdgbVaCHK·9G8egdXZhheV^g#DcXZi]ZgZbdiZXdc[^\jgVi^dc[^aZ^h jeYViZY!i]Z9G8egdXZhhd[i]ZhiVcYWncdi^[^Zhi]Z9BDCegdXZhhidgZ[gZh]^ih^c"bZbdgn Xdend[i]ZXdc[^\jgVi^dc[^aZ# >[i]Z976^hXdccZXiZYidi]ZhiVcYWnVcYbV`ZhX]Vc\Zhidi]ZXdc[^\jgVi^dcegdeZgi^Zh!i]Z X]Vc\ZhVgZXdbbjc^XViZYWVX`idi]Zeg^bVgn9BDCjh^c\VcCHK·9G8eV^g#I]Zeg^bVgn 9BDCjeYViZhi]ZXdc[^\jgVi^dc[^aZVcYi]ZegdXZhh^hgZeZViZYidXdbbjc^XViZi]ZX]Vc\Zhid VaahiVcYWnYViVWVhZh^ci]ZXdc[^\jgVi^dc# I]Z[VXii]Vii]Zeg^bVgn9BDC^hi]ZbVhiZgd[i]ZXdc[^\jgVi^dcYZiZgb^cZhl]Zc hdbZi]^c\l^aa]VeeZcdcVhiVcYWnYViVWVhZ#;dgZmVbeaZ!^[ndjhiVgijeVhiVcYWnVcY^i XVccdiXdccZXiidi]Zeg^bVgnYViVWVhZ!cd9ViV<jVgY[jcXi^dcVa^inhiVgi^c\jei]ZVeean egdXZhh!X]ZX`^c\[dg\Veh!VcYhddcl^aaWZeZg[dgbZYjci^ai]ZhiVcYWnYViVWVhZXVcXdccZXi idi]Zeg^bVgnYViVWVhZk^Vi]ZhVbZCHK·9G8eV^gVcYYZiZgb^cZl]Vi^i^hhjeedhZYidYd# TIP You can watch when the Broker sets up a standby database by shutting down the primary and standby databases, performing a of the standby alert log (if you are on UNIX or Linux), and then starting the standby database. You will see the standby attempt to make contact with the primary, fail a couple of times, and then wait. Once you start up the primary, you will see all of the Broker setup commands being executed on the standby database. NdjbVnVh`!¹L]Vi]VeeZchl]Zcbneg^bVgn^h\dcZVcY>cZZYid[V^adkZg4ºI]^h^hl]n i]Z7gd`Zg`ZZehgZYjcYVciXde^Zhd[i]ZXdc[^\jgVi^dc[^aZhViZVX]YViVWVhZ^ci]ZXdc[^\jgVi^dc!
178
DgVXaZ9ViV<jVgY&&g=VcYWdd`
hdl]ZcndjYd[V^adkZgVhiVcYWnYViVWVhZ!^iXVcYZiZgb^cZi]Zdg^\^cVahZii^c\h[dgi]ZZci^gZ Xdc[^\jgVi^dcVh^iWZXdbZhi]Z¹bVhiZgºd[i]ZXdc[^\jgVi^dc[^aZhWnWZXdb^c\i]Zeg^bVgn YViVWVhZ#GdaZigVch^i^dchl^aaWZY^hXjhhZY^c8]VeiZg-#
The Broker CLI I]ZaVhieVgid[i]ZejooaZ^h]dlid^ciZgVXil^i]i]Z7gd`Zg#Ndj]VkZildX]d^XZh/:ciZgeg^hZ BVcV\Zg9[ndjX]ddhZidjhZch]dgi!id\V^c[jaa[jcXi^dcVa^ind[9ViV<jVgY i]gdj\]9l^aahiVgijeVcYgZijgc VDGMGRL>egdbei/ [Matrix] dgmgrl DGMGRL for Linux: Version 11.1.0.6.0 – Production Copyright (c) 2000, 2005, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. DGMGRL>
I]^hYdZhcdiXdccZXindjidVcnYViVWVhZ¸cdiZkZcdjgXjggZciH>9BVig^m#IdXdccZXiidndjg 9ViV<jVgYXdc[^\jgVi^dc!ndjZ^i]ZgVYYVhaVh]$dgi]ZjhZgcVbZVcYeVhhldgYdci]Z XdbbVcYa^cZdgndjjhZi]ZCONNECTXdbbVcYV[iZgndj]VkZhiVgiZY9
&
6ii]Zi^bZd[i]^hlg^i^c\!DgVXaZBZiVA^c`CdiZ)&()-)#&egdk^YZh^c[dgbVi^dcVWdji9ViV<jVgYb^mZY eaVi[dgbhjeedgi#
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
179
Getting Started with the Broker Cdli]Vindj]VkZVe^XijgZd[i]ZkVg^djheVgihd[i]Z7gd`ZgVcY`cdl]dli]Zn^ciZgVXi!ndj b^\]ii]^c`i]VindjXVc_jbeg^\]i^cid9i^h^bedgiVcii]VindjjcYZghiVcY i]ZegZgZfj^h^iZhd[V7gd`ZgXdc[^\jgVi^dcVcY]dli]Z7gd`ZgeZg[dgbh^ihbV\^Xhdndj\Zii]Z bdhidjid[i]Z7gd`Zg#I]Z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DgVXaZ9ViV<jVgY7gd`Zg
181
ASMCMD> cd MATRIX ASMCMD> mkdir BROKER ASMCMD> exit
TIP Remember to pre-create the directories that you are going to use for the configuration files; otherwise the Broker will not be able to function and you won’t really know why unless you read the Broker logs and understand what they are saying. L]ZcndjXgZViZndjgXdc[^\jgVi^dcaViZgdc^ci]^hX]VeiZg!ndjl^aahZZi]Vii]Z7gd`Zg VXijVaan`ZZehi]ZgZVaXdc[^\jgVi^dcYViV[^aZ^cVcdi]ZgY^gZXidgnl]ZcndjjhZ6HB#6hndjXVc hZZ[gdbi]ZegZXZY^c\XdbbVcYh!lZXgZViZYVhjWY^gZXidgn^ci]ZYViVWVhZY^gZXidg^ZhXVaaZY 7GD@:G!VcYl]ZclZXgZViZi]ZXdc[^\jgVi^dc!i]Z7gd`Zgl^aaejiV[^aZ^ci]ViY^gZXidgnl^i] i]ZcVbZlZheZX^[^ZY^ci]ZeVgVbZiZg#7ji^[ndjadd`XadhZg!ndjl^aahZZi]Vii]ZcVbZ^h VXijVaanVa^c`idVcdi]Zg[^aZ^cVcdi]ZgY^gZXidgnXVaaZY96I6<J6G98DC;> [+ASM] asmcmd ASMCMD> cd DATA/MATRIX/BROKER ASMCMD> ls dr1matrix.dat ASMCMD> ls –l Type Redund Striped
Time
+DATA/MATRIX/DATAGUARDCONFIG/Matrix.298.671576301 ASMCMD> cd ../DATAGUARDCONFIG ASMCMD> ls –l Type Redund Striped Time DATAGUARDCONFIG UNPROT COARSE NOV 23 20:00:00 ASMCMD>
Sys N
Name dr1matrix.dat =>
Sys Y
Name Matrix.298.671576301
I]ZhZXdcYXdc[^\jgVi^dc[^aZ^ci]ZFLASHY^h`\gdjel^aaVahdWZa^c`ZYidi]ZhVbZ Y^gZXidgn^ci]ZFLASHY^gZXidgnigZZ# >[ndjhZii]ZhZeVgVbZiZghWji[dg\ZiidXgZViZi]ZY^gZXidg^Zhdci]Zeg^bVgnYViVWVhZ!ndjg CREATE CONFIGURATIONXdbbVcYl^aagZijgcV[^aZcdi[djcYZggdg[gdb9
7ji^[ndj\di^ig^\]idci]Zeg^bVgnYViVWVhZWjihZii]ZeVgVbZiZghdci]ZhiVcYWnYViVWVhZVcY i]Zc[dg\diidXgZViZi]ZY^gZXidg^Zhi]ZgZ!cdi]^c\l^aa]VeeZcl]ZcndjZcVWaZi]Z7gd`Zg^ci]Z cZmihiZeWnhZii^c\i]Z7gd`ZgSTARTeVgVbZiZgidTRUE#:kZcXgZVi^c\i]Z7gd`ZgXdc[^\jgVi^dc Xdb^c\jehddcl^aaldg`[^cZ#7ji^il^aacZkZgZm^ii]Z¹:cVWa^c\8dc[^\jgVi^dcºe]VhZ WZXVjhZ^iXVccdiXgZViZi]ZXdc[^\jgVi^dc[^aZh#6cYjcaZhhndjadd`^ci]Z7gd`ZgVaZgiad\d[i]Z hiVcYWnl]^X]gZh^YZh^ci]ZcdgbVaYViVWVhZVaZgiad\Y^gZXidgnVcY^hXVaaZYYgX1db_unique_ name3#ad\¸dgYgXBVig^mT9G%#ad\^cdjgXVhZVcYjcYZghiVcYl]Vi^i^hhVn^c\!ndjl^aacdi `cdll]ni]^h]VeeZcZY#I]Z[daadl^c\ZmVbeaZ^hVcZY^iZYe^ZXZd[i]Z7gd`Zgad\^cl]^X]i]Z 7GD@:G6HBY^gZXidgnY^YcdiZm^hijcYZgi]ZhiVcYWnYViVWVhZideY^gZXidgn/ DMON: >> Starting Data Guard Broker bootstrap DMON: Broker Configuration File Locations: dg_broker_config_file1 = "+DATA/matrix_dr0/broker/dr1matrix_dr0.dat"
182
DgVXaZ9ViV<jVgY&&g=VcYWdd`
dg_broker_config_file2 = "+FLASH/matrix_dr0/broker/dr2matrix_dr0.dat" DMON: Attach state object DMON: Entered rfm_get_chief_lock() for CTL_BOOTSTRAP, reason 2 DMON: chief lock convert for bootstrap DMON: cannot open configuration file "+DATA/matrix_dr0/broker/dr1matrix_dr0.dat" ORA-17503: ksfdopn:2 Failed to open file +DATA/matrix_dr0/broker/dr1matrix_dr0.dat ORA-15173: entry 'dr1matrix_dr0.dat' does not exist in directory 'broker' DMON: Error opening "+DATA/matrix_dr0/broker/dr1matrix_dr0.dat", error = ORA-16572 DMON: Establishing "+FLASH/matrix_dr0/broker/dr2matrix_dr0.dat" as the more current file DMON: cannot open configuration file "+FLASH/matrix_dr0/broker/dr2matrix_dr0.dat" ORA-17503: ksfdopn:2 Failed to open file +FLASH/matrix_dr0/broker/dr2matrix_dr0.dat ORA-15173: entry 'dr2matrix_dr0.dat' does not exist in directory 'broker' DMON: Error opening "+FLASH/matrix_dr0/broker/dr2matrix_dr0.dat", error = ORA-16572 DMON: Boot configuration,loading from "+FLASH/matrix_dr0/broker/dr2matrix_dr0.dat" DMON: cannot open configuration file "+FLASH/matrix_dr0/broker/dr2matrix_dr0.dat" ORA-17503: ksfdopn:2 Failed to open file +FLASH/matrix_dr0/broker/dr2matrix_dr0.dat ORA-15173: entry 'dr2matrix_dr0.dat' does not exist in directory 'broker' DMON: Configuration does not exist, server ready.
6hndjXVchZZ!^i^hcdidWk^djhi]Vii]ZegdWaZb^hi]Zb^hh^c\Y^gZXidgn7GD@:GjcYZgi]Z YViVWVhZB6IG>MT9G%Y^gZXidgndcWdi]i]ZDATAVcYFLASHY^h`\gdjeh#I]^hhZfjZcXZd[ Zggdghl^aaWZgZeZViZY[dgZkZgjci^andjY^hVWaZi]ZXdc[^\jgVi^dc!XgZViZi]Zb^hh^c\Y^gZXidgn! VcYi]ZcZcVWaZi]ZXdc[^\jgVi^dcV\V^c# DcXZndj]VkZeZg[dgbZYVaai]ZcZXZhhVgnY^gZXidgnldg`VcYhZii]ZeVgVbZiZgh^cVaad[ ndjgYViVWVhZh!ndjVgZgZVYnidhiVgijei]Z7gd`Zg#I]^h^hYdcZWnXdccZXi^c\idZVX]YViVWVhZ l^i]HFAEajhVcYhZii^c\i]Z7gd`ZgSTARTeVgVbZiZgidTRUE# SQL> ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;
I]^hYdZhcdiXgZViZVcn`^cYd[7gd`ZgXdc[^\jgVi^dc[dgndj!WZXVjhZi]Vi^hYdcZWn ZmZXji^c\XdbbVcYh^c9 SHOW PARAMETER DG_BROKER_START NAME TYPE VALUE dg_broker_start boolean TRUE SQL> ALTER SYSTEM SET 2 DG_BROKER_CONFIG_FILE1='+DATA/Matrix/Broker/dr1Matrix.dat'; ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1='+DATA/Matrix/Broker/dr1Matrix.dat' *
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
183
ERROR at line 1: ORA-02097: parameter cannot be modified because specified value is invalid ORA-16573: attempt to change or access configuration file for an enabled broker configuration
IdgZhdakZi]^hZggdg!ndjcZZYidhZii]ZSTARTeVgVbZiZgidFALSEVcYi]ZcgZ"ZmZXjiZ i]ZXdc[^\jgVi^dceVgVbZiZgX]Vc\Zh#DcXZXdbeaZiZ!hZii]ZSTARTeVgVbZiZgWVX` idTRUE# DcXZndj]VkZXgZViZYndjg7gd`ZgXdc[^\jgVi^dcl^i]9[ndjcZZYidbdkZi]Z[^aZh!ndjbjhihidei]Z7gd`Zg jh^c\i]ZDG_BROKER_STARTeVgVbZiZg!X]Vc\Zi]ZXdc[^\jgVi^dceVgVbZiZgh!Xdeni]Z[^aZh [gdbi]ZdaYadXVi^dcidi]ZcZladXVi^dc!VcYi]ZcgZ"ZcVWaZi]Z7gd`Zg#>[ndjYdcdiYdi]^h! ndjldjaYhZZi]ZDG6"&,*%(Zggdgh^ci]Z9G8ad\# NdjXVcVahdgZbdkZi]Z7gd`ZgXdc[^\jgVi^dcXdbeaZiZan!YZaZiZi]ZdaYXdc[^\jgVi^dc[^aZh! X]Vc\Zi]ZeVgVbZiZgh!gZ"ZcVWaZi]Z7gd`Zg!VcYi]ZcgZ"XgZViZi]ZXdc[^\jgVi^dc¸Wjii]Vi^hV adibdgZldg`#6cY^[ndjVgZjh^c\6HB!ndjXVc^bV\^cZ]dl]VgY^ildjaYWZidXdeni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c# >cVYY^i^dc!hiVgi^c\l^i]DgVXaZ9ViVWVhZ&%gGZaZVhZ'!i]Z7gd`ZgY^hXVgYZYi]ZjhZg¼h hZgk^XZVcYhiVgiZYjh^c\VcZlhZgk^XZXVaaZYMEI[dgIgVchedgi#I]ZMEIhZgk^XZlVhXdchigjXiZY [gdbi]ZDB_UNIQUE_NAMEd[i]ZYViVWVhZVcYVeeZcY^c\i]Zhig^c\_XPTidi]ZZcYd[i]Z 97TJC>FJ:TC6B:!Vh^cMatrix_XPT#6aaYViVWVhZhgjcc^c\^c&%#'dgaViZg]VkZi]^hMEI hZgk^XZgZ\^hiZgZYl^i]i]Za^hiZcZg#6eeVgZciani]^hcZlhZgk^XZXgZViZYfj^iZVhi^gl^i]hdbZjhZgh l]dY^Yc¼ijhZi]Z7gd`ZgVcYlVciZYi]ZhZgk^XZgZbdkZY[gdbi]Z^ghnhiZbh#I]^hXdjaYWZ VXXdbea^h]ZYWnhZii^c\i]Z]^YYZceVgVbZiZg"__DG_BROKER_SERVICE_NAMES"idVWaVc` hig^c\VcYgZhiVgi^c\i]ZYViVWVhZ/ SQL> ALTER SYSTEM SET "__DG_BROKER_SERVICE_NAMES"='' SCOPE=SPFILE;
184
DgVXaZ9ViV<jVgY&&g=VcYWdd` NOTE Two underscores appear at the front of R ER ERV E A E , and you must enclose the parameter name in double quotation marks. You have to change the SPFILE only. You cannot change this parameter in memory. To stop the service, you must restart the database.
I]^hcZlhZgk^XZY^YcdiWdi]ZgjhcZVganVhbjX]Vhi]ZlVni]Z7gd`ZgXdckZgiZYdjg ICHC6B:hidVcZmeVcYZYXdccZXihig^c\#;dgZmVbeaZ!^[ndjegdk^YZi]Z7gd`Zgl^i]BVig^mT9G% Vhi]ZIgVcheVgZciCZildg`^c\HjWhigViZICHXdccZXi^dc!l]ZcndjXgZViZndjgXdc[^\jgVi^dc!Vh^c MATRIX_DR0 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = matrix_dr0.domain)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = Matrix_DR0.domain) ) )
ndjgICHC6B:ldjaYWZigVchaViZYVcYhidgZYVhi]ZegdeZginInitialConnectIdentifier^c i]Z7gd`ZgXdc[^\jgVi^dc[^aZ!Vhi]Z[daadl^c\XdccZXihig^c\/ (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=matrix_dr0.domain) (PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=Matrix_DR0_XPT.domain) (INSTANCE_NAME=Matrix_DR0)(SERVER=dedicated)))
I]^hXdccZXi^dchig^c\ldjaYWZjhZYVhi]ZVg\jbZciidi]ZSERVICEViig^WjiZd[VLOG_ ARCHIVE_DEST_neVgVbZiZg[dgGZYdIgVchedgiidi]ZiVg\ZiYViVWVhZ#L]Zci]Zeg^bVgn YViVWVhZhiVgihjedgndjXgZViZVcYZcVWaZi]Z7gd`ZgXdc[^\jgVi^dc^ci]Z[^ghieaVXZ!ndj ldjaYhZZhdbZi]^c\a^`Zi]Z[daadl^c\^ci]ZVaZgiad\/ ALTER SYSTEM SET log_archive_dest_2= service="(DESCRIPTION= (ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=matrix_dr0.domain)(PORT=1521))) (CONNECT_DATA= SERVICE_NAME=Matrix_DR0_XPT.domain)(INSTANCE_NAME=Matrix_DR0) (SERVER=dedicated)))" LGWR ASYNC db_unique_name=Matrix_DR0 valid_for=(online_ logfiles,primary_role) reopen=30' SCOPE=BOTH;
>ci]^hbVccZg!i]ZICHC6B:[^aZldjaYWZ^\cdgZY[dgZkZgbdgZ!VcYhdldjaYVcn eVgi^XjaVghZii^c\hi]Vindj]VYXdc[^\jgZYi]Vii]Z7gd`ZgY^Ycdi]VcYaZ!hjX]Vhi]ZhZcYVcY gZXZ^kZWj[[Zgh^oZh# I]Z\gZVicZlh^hi]ViVhd[DgVXaZ9ViVWVhZ&&g,i]^hcdad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^indjgcZildg`#>[ndjlZgZjh^c\&%gVcYndjlVciZYidjhZi]Z7gd`Zg ndjldjaY]VkZidjhZi]ZhfacZi#dgVbZi]dY!l]^X]ldjaYVeeanidZkZgnDgVXaZCZiHZgk^XZh XdccZXi^dcidVcY[gdbi]dhZhnhiZbh#Cdll^i]i]ZDGConnectIdentifier!ndjXVceaVXZ i]dhZijc^c\eVgVbZiZghl]ZgZi]Znh]djaYWZ!^ci]ZICHC6B:VcYa^hiZcZg[^aZh# MATRIX_DR0 = (DESCRIPTION = SDU 32 SEND_ UF_SI E 20 2 00 REC _ UF_SI E 20 2 00 (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = matrix_dr0.domain)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = Matrix_DR0.domain) ) )
;dgi]ZcZlDgVXaZ9ViVWVhZ&&gjhZg!i]^hcZlegdeZgin^hVcdWk^djhdeZgVi^dc!Wjil]Vi VWdjii]ZXjggZci7gd`ZgjhZg^cDgVXaZ&%g4L]Vi]VeeZchl]Zci]ZYViVWVhZ^hje\gVYZY[gdb &%gid&&g4I]Zdg^\^cVaXdc[^\jgVi^dcl^aaXdci^cjZidldg`!Wjii]ZXdccZXihig^c\i]Vii]Z7gd`Zg eji^cidi]ZInitialConnectIdentifierl^aaWZb^\gViZYidi]ZcZlXdc[^\jgVi^dcVhi]Z DGConnectIdentifieregdeZgin#I]^hbZVchi]Vindjl^aahi^aaWZjh^c\i]ZdaYbZi]dYl]ZgZi]Z 7gd`ZgjhZhi]ZXdccZXihig^c\^chiZVYd[ndjgICHC6B:#L]^X]Wg^c\hjhWVX`idi]ZhjW_ZXid[ i]Vi7gd`ZgMEIhZgk^XZ#I]^hVahdbZVchi]Vindjl^aahi^aaWZjh^c\i]ZdaYhZgk^XZVhadc\Vhndj X]ddhZcdiidX]Vc\Zi]ZDGConnectIdentifier#HdYdcdiY^hVWaZi]ZMEIhZgk^XZ!VhYZhXg^WZY ZVga^Zg!jci^andj[^mi]ZXdccZXi^YZci^[^Zg# TIP When you already have a Broker configuration, always change the nn n property for all of your databases to a real TNSNAME after you upgrade from 10\ to 11\!
The Broker and the Listener DWk^djhan!Vhl^i]VcnDgVXaZCZiHZgk^XZhXdccZXi^dc!i]Z7gd`ZgjhZhi]ZICHC6B:idgZhdakZ i]ZeVi]idi]ZYViVWVhZVcYi]Zc^c^i^ViZhVXdccZXi^dcidi]Za^hiZcZgVii]ZiVg\ZihnhiZbjh^c\ i]ZhZgk^XZcVbZndjeji^cidndjgICHC6B:Zcign#6cYh^cXZi]ZildbV^ceaVXZhi]Vii]ZhZ XdccZXi^dchVgZ^c^i^ViZY!GZYdIgVchedgiVcYXdccZXi^c\id9
186
DgVXaZ9ViV<jVgY&&g=VcYWdd`
jhZ;Vhi"HiVgi;V^adkZg!VaaldjaYcdildg`XdggZXian#9jg^c\i]ZhZdeZgVi^dch!dcZd[i]ZYViVWVhZh h]jihYdlcVcYcZZYhidWZgZhiVgiZY#H^cXZi]ZYViVWVhZ^hYdlc!i]ZhZgk^XZheZX^[^ZYWnndjg ICHC6B:^hcdigZ\^hiZgZYhdVcDgVXaZCZiHZgk^XZhXdccZXi^dcXVccdiWZbVYZ#L]Zci]Z gZbdiZYViVWVhZ^hYdlcVcYndjignidXdccZXil^i]HFAEajhdg99a^hid[i]Za^hiZcZg#dgV[^aZdci]Zeg^bVgnhnhiZb/ SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = Matrix_DGMGRL.domain) (ORACLE_HOME = /scratch/OracleHomes/OraHome111) (SID_NAME = Matrix) ) )
NdjYdcdicZZYVICHC6B:Zcigned^ci^c\idi]^hhiVi^XZcignh^cXZi]Z7gd`Zg`cdlh]dlid XdchigjXiVXdccZXihig^c\[gdbi]Z^c[dgbVi^dcndj]VkZVagZVYnegdk^YZY#I]Z]dhii]ZYViVWVhZ ^hdcVcYl]Viedgii]Za^hiZcZg^hjh^c\XdbZh[gdbi]ZXdccZXi^dc^c[dgbVi^dcndjegdk^YZY l]ZcndjXgZViZYi]ZXdc[^\jgVi^dc^ci]Z[^ghieaVXZ#>iVahd`cdlhi]ZYViVWVhZjc^fjZcVbZ VcYYdbV^c[gdbi]ZYViVWVhZegdeZgi^Zh#>ci]^hbVccZg!i]Z7gd`Zg^hVWaZidXdchigjXiVkVa^Y XdccZXihig^c\i]Vil^aaVaadlVXdccZXi^dcidi]Z^chiVcXZZkZc^[^i^hYdlc# TIP Do not forget to define the n n RL n static entry in the listener.ora file of each database including the primary database, even if you use Grid Control. I]^h^hi]ZdcZi]^c\i]VindjcZZYidYdZkZc^[ndjjhZ!ndjbjhijhZ i]Z9ViV<jVgY7gd`Zg9#HdbZi^bZhndjl^aacZZYidjhZ9
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
187
Configuring Oracle Net for the Broker Cdli]VindjjcYZghiVcY]dli]Z7gd`ZgjhZhi]ZkVg^djheVgihd[DgVXaZCZiHZgk^XZh!aZi¼hgZXVe l]VilZcZZYidYdWZ[dgZlZXgZViZV7gd`ZgXdc[^\jgVi^dc# ;^ghi!VhlZYZhXg^WZY^c8]VeiZg'!lZcZZYidYZ[^cZICHC6B:hZcig^ZhdcZVX]hnhiZb^c djgXdc[^\jgVi^dci]Vi9ViV<jVgYl^aajhZ[dgGZYdIgVchedgiVcY\VegZhdaji^dc!VhheZX^[^ZY^c i]ZLOG_ARCHIVE_DEST_neVgVbZiZg#Hddjgeg^bVgnhnhiZbl^aa]VkZVICHC6B:ZcignXVaaZY BVig^mT9G%i]Vied^cihiddjghiVcYWnYViVWVhZ!VcYdjghiVcYWnhnhiZbl^aa]VkZVICHC6B: ZcignXVaaZYBVig^mi]Vied^cihiddjgeg^bVgnYViVWVhZ#LZcZZYidYdi]^hZkZc^[lZXgZViZY VhiVcYWnl^i]djiVcnd[i]ZeVgVbZiZghXdc[^\jgZY!Vh^ci]Zh]dgiGB6CZmVbeaZ^c8]VeiZg'# I]Z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i]ZXdccZXihig^c\djid[ndjg InitialConnectIdentifier#>igZbZbWZghVcYjhZhi]ZICHC6B:ndjegdk^YZYjcaZhh ndjVgZgjcc^c\Vcje\gVYZYVcYjcX]Vc\ZYXdc[^\jgVi^dc!VcYndjVgZcdlgZhedch^WaZ[dg Zchjg^c\i]Vii]Z7gd`ZgXVcXdccZXiidVaai]Z^chiVcXZh^ci]ZhiVcYWnG68#DcXZndjbdkZid i]ZcZl![VciVhi^X!VcYijcVWaZbZi]dYd[heZX^[n^c\i]ZDGConnectIdentifier!ndj]VkZid bV`ZhjgZi]VindjgICHC6B:[dgi]ZhiVcYWn]VhVaai]ZG68hnhiZbhXdc[^\jgZY#6cYndjbjhi bV`ZjhZd[i]ZIgVcheVgZci6eea^XVi^dc;V^adkZgI6;XdccZXii^bZ[V^adkZgXVeVW^a^inhdi]Vii]Z GZYdIgVchedgiHZgk^XZhbdkZhZVbaZhhan[gdbV[V^aZYhiVcYWncdYZidVhjgk^k^c\hiVcYWncdYZ#
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
189
;dgZmVbeaZ!Xdch^YZgi]VidjghiVcYWnBVig^mT9G%^hVild"cdYZG68YViVWVhZ#I]ZICHC6B: i]VilZjhZidXgZViZi]ZYViVWVhZ^cdjg7gd`ZgXdc[^\jgVi^dcbjhiadd`a^`Zi]^h/ MATRIX_DR0 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Matrix1_DR0.domain)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = Matrix2_DR0.domain)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = Matrix_DR0.domain) ) )
>ci]^hlVn!i]ZGZYdIgVchedgiHZgk^XZhl^aajhZi]ZICHC6B:BVig^mT9G%!VcY^[]dhi BVig^m&T9G%^hcdiVkV^aVWaZ!XdccZXii^bZ[V^adkZgl^aaVjidbVi^XVaaniV`Zi]ZigVchedgiidi]Z hZXdcYZcign#D[XdjghZndjXdjaYVahdjhZi]ZK^gijVa>EK>E[dgi]ZhiVcYWnXajhiZg# DcZaVhii]^c\VWdjindjgICHC6B:h^cVG68/>[ndjYdcdi]VkZVh^c\aZXajhiZg"l^YZ ichcVbZh#dgV[^aZ!ndjbjhibV`ZhjgZi]Vii]ZICHC6B:Zcign[dgi]ZhiVcYWn^hi]ZhVbZdc VaacdYZh^ci]Zeg^bVgnXajhiZg#NdjghiVcYWnYViVWVhZhbjhiVahd]VkZVh^b^aVgZcignVXgdhhi]Z hiVcYWnXajhiZged^ci^c\WVX`idi]Zeg^bVgnYViVWVhZG68]dhih[dghl^iX]dkZg# I]ZaVhiG68"heZX^[^X^iZb^hVXijVaanhdbZi]^c\ndjcdadc\Zg]VkZidldggnVWdji^cDgVXaZ 9ViVWVhZ&&g#>c&%gndjcZZYZYidbdY^[ni]ZG688ajhiZgGZVYnHZgk^XZh8GHidbV`ZhjgZ i]Vii]ZkVg^djhhiVcYWnYViVWVhZhlZgZValVnhhiVgiZYje^ci]ZMOUNThiViZ!VcYi]Zci]Z7gd`Zg ldjaYiV`ZXVgZd[deZc^c\i]ZYViVWVhZ^[cZXZhhVgn/ srvctl modify database -d srvctl modify database -d
Matrix> -o $oracle_home> -s mount Matrix_DR0> -o $oracle_home> -s mount
TIP When you set the CRS database options in Oracle Database 10\, you do not need to specify the role option for your standby databases. It was never implemented to do anything and is ignored by the Broker. >[i]ZYViVWVhZ^hVeg^bVgn!i]Z7gd`ZgldjaYValVnhWg^c\^iidi]ZOPENhiViZl]Zci]Z ^chiVcXZlVhhiVgiZY#I]^hldjaY]VeeZcZkZc^[ndjjhZYSTARTUP MOUNT#>[ndjh^beanlVciZY idbdjcii]Zeg^bVgnYViVWVhZ!ndjcZZYZYidY^hVWaZi]Z7gd`Zg[^ghi#>[i]ZYViVWVhZlZgZV hiVcYWn!i]Z7gd`ZgldjaYWg^c\i]Z^chiVcXZidi]ZhiViZi]VindjaVhiheZX^[^ZY!l]^X]lVhhidgZY ^ci]ZXdc[^\jgVi^dc[^aZ#9ViVWVhZhiViZl^aaWZY^hXjhhZY^ci]ZcZmihZXi^dc# L^i]DgVXaZ9ViVWVhZ&&g!hZii^c\i]ZSTARTbdYZdei^dc^c8GH^hcdadc\ZgcZXZhhVgndg ZcXdjgV\ZYVh[VgVhi]Z7gd`Zg^cXdcXZgcZY#I]Z7gd`Zgl^aacdlValVnh]dcdgi]ZhiVgije X]d^XZd[i]Z976!gZ\VgYaZhhd[i]ZYViVWVhZineZ#>[i]ZYViVWVhZ^hi]Zeg^bVgnVcYi]Z976 jhZhSTARTUP MOUNT!i]ZYViVWVhZl^aagZbV^c^ci]ZMOUNThiViZ!l]ZgZVh^c&%gi]ZYViVWVhZ ldjaYWZdeZcZYVcnlVn# TIP The Broker no longer opens the primary database when you use AR P . In 11\ it leaves the database at the state. You must change your scripts and the CRS startup mode options in 11\ if in 10\. you set them to
190
DgVXaZ9ViV<jVgY&&g=VcYWdd`
6ihl^iX]dkZgVcY[V^adkZg!i]Z7gd`Zgl^aaaZVkZi]ZYViVWVhZh^ci]ZXdggZXibdYZ[dgi]Z^g cZlgdaZ#L]ZcVhiVcYWnWZXdbZhi]Zeg^bVgn!^il^aaWZdeZcZY[dgjhZVcYi]Zeg^bVgni]Vi WZXdbZhVhiVcYWnl^aaWZeji^cidi]ZXdggZXihiViZ[dgi]VihiVcYWnMOUNT[dgVe]nh^XVaVcY OPEN[dgVad\^XVa#I]^hbZVchi]Vi^[ndj]VkZi]Z8GHhiVgijebdYZdei^dchhZiidMOUNT^c&&g, VcnhjWhZfjZcigZhiVgihd[i]ZcZleg^bVgnYViVWVhZl^aaaZVkZ^i^ci]ZMOUNThiViZVcY^il^aacdi WZdeZc[dgWjh^cZhhHdndjl^aalVciidgZbdkZi]ZMOUNThiVgibdYZ#
Connecting to the Broker ;^cVaan!ndjVgZcdlgZVYnidXdccZXiidi]Z7gd`ZgVcYhiVgibVcV\^c\9ViV<jVgY#=dlZkZg!ndj hi^aacZZYidjcYZghiVcYVXdjeaZd[i]^c\hVWdjiXdccZXi^c\idi]Z7gd`Zg#6hl^i]Vcn^ciZg[VXZid VYViVWVhZ!ndj]VkZidXdccZXi9
DgndjXVcjhZi]ZCONNECTXdbbVcY/ [Matrix] dgmgrl DGMGRL for Linux: Version 11.1.0.6.0 – Production Copyright (c) 2000, 2005, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. DGMGRL> CONNECT / Connected. DGMGRL>
NdjVgZcdlXdccZXiZYidi]ZYViVWVhZ!Wjii]^hYdZhcdibZVci]ViV7gd`ZgXdc[^\jgVi^dc^h VhhdX^ViZYl^i]i]ZYViVWVhZVii]^hed^ci#;dgi]VibViiZg!WZ^c\XdccZXiZYYdZhcdiZkZcbZVc i]Vindj]VkZZcVWaZYi]Z7gd`Zg#>[ndjY^Ycdi[daadli]ZhiZehidZcVWaZi]Z7gd`ZgXdggZXianVh YZhXg^WZYZVga^ZgVcYndjig^ZYVSHOW CONFIGURATIONXdbbVcY!ndjldjaY\Zii]Z[daadl^c\ ZggdgbZhhV\Z/ DGMGRL> SHOW CONFIGURATION; Error: ORA-16525: the Data Guard broker is not yet available ORA-06512: at "SYS.DBMS_DRS", line 157 ORA-06512: at line 1 DGMGRL>
7ji^[ndjeZg[dgbZYi]ZXdggZXihiZehVcYZcVWaZYi]Z7gd`ZgXdggZXian!ndjldjaY\Zii]Z [daadl^c\gZhjai[gdbndjgSHOW CONFIGURATIONXdbbVcY/ DGMGRL> SHOW CONFIGURATION; Error: ORA-16532: Data Guard broker configuration does not exist
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
191
Configuration details cannot be determined by DGMGRL DGMGRL>
L]^aZhi^aaVcZggdg!i]^h^hi]Z¹XdggZXiZggdg!ºh^cXZndj]VkZc¼iVXijVaanXgZViZYVXdc[^\jgVi^dc nZi#7jiaZi¼h\dWVX`idXdccZXi^c\idi]Z7gd`Zg[dgi]ZbdbZci# Ndjb^\]iVh`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^bVgnXdbZhjeVhVhiVcYWncdl!i]Z7gd`Zgl^aa XdccZXiVcY[^c^h]jei]ZXdc[^\jgVi^dc# LdghZ!^[ndj]VeeZcidWZgjcc^c\^cBVm^bjbEgdiZXi^dcbdYZl]^X]gZfj^gZhViaZVhidcZ HNC8hiVcYWn!ndjgcZleg^bVgnl^aacdiXdbZjeVcYndjghnhiZbl^aagZbV^cYdlcadc\Zgi]Vc ndjZmeZXi#LZ¼aagZk^h^ii]^h^hhjZ^c8]VeiZg-l]ZclZY^hXjhhi]ZbZX]Vc^Xhd[gdaZigVch^i^dc# =dlYdndjVkd^Yi]^hegdWaZb46alVnhheZX^[nVjhZgcVbZ$eVhhldgYi]Vi]VhHNH976eg^k^aZ\Zh l]ZcndjXdccZXiidi]Z7gd`Zg [Matrix] dgmgrl sys/oracle DGMGRL for Linux: Version 11.1.0.6.0 – Production Copyright (c) 2000, 2005, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. Connected. DGMGRL>
Dg [Matrix] dgmgrl DGMGRL for Linux: Version 11.1.0.6.0 – Production Copyright (c) 2000, 2005, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. DGMGRL> CONNECT sys/oracle Connected. DGMGRL>
6hl^i]i]Z¹$bZi]dY!ºi]ZhZildXdccZXi^dchl^aaViiVX]idi]ZXjggZciYViVWVhZVhYZ[^cZY Wni]ZORACLE_SID#CdgbVaan!i]ZYViVWVhZidl]^X]ndjXdccZXiXVcWZi]Zeg^bVgndgVcnd[ i]ZhiVcYWnYViVWVhZh#7ji^ci]^hXVhZndj]VkZcdihZijei]ZXdc[^\jgVi^dcnZihdndjcZZYid bV`ZhjgZndjXdccZXiidi]Zeg^bVgnYViVWVhZl]ZcndjXgZViZndjgXdc[^\jgVi^dc#
192
DgVXaZ9ViV<jVgY&&g=VcYWdd` TIP If you plan on using the Broker, the best practice when creating your standby database is to use as few Data Guard parameters as possible and let the Broker configure everything for you.
NdjXVcVahdXdccZXiidVgZbdiZYViVWVhZl^i]9
Dg [Matrix] dgmgrl DGMGRL for Linux: Version 11.1.0.6.0 – Production Copyright (c) 2000, 2005, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. DGMGRL> CONNECT sys/oracle@Matrix Connected. DGMGRL>
I]^hbZVchi]VindjXVcbVcV\ZVcn9ViV<jVgYXdc[^\jgVi^dc[gdbVcnhnhiZb^cndjg cZildg`l^i]djiVXijVaanWZ^c\dcdcZd[i]ZYViVWVhZhnhiZbh#Ndj_jhicZZYid[ja[^aaV[Zl gZfj^gZbZcih/ N NdjgDgVXaZ]dbZbjhiWZhZiidVc:ciZgeg^hZ:Y^i^dcdgXa^ZciDgVXaZ]dbZ# N I]ZDgVXaZ]dbZd[ndjgadXVahnhiZbbjhiWZjh^c\i]ZhVbZkZgh^dcjhZYWni]Z YViVWVhZ]dbZhd[i]ZXdc[^\jgVi^dc# N Ndjbjhi]VkZICHC6B:Zcig^Zhdci]ZadXVahnhiZbi]Vied^ciidi]ZkVg^djhYViVWVhZh ^cndjg7gd`ZgXdc[^\jgVi^dc# N Ndjbjhi]VkZi]Zeg^k^aZ\ZhidXdccZXidkZgi]ZedgihYZ[^cZY^ci]ZICHC6B:[^aZ¸i]Vi ^h!^[i]ZYViVWVhZhnhiZbhVgZWZ]^cYV[^gZlVaa!i]Zcndjbjhi]VkZi]ZedgideZcZYhd ndjXVcXdccZXi# NdjVgZcdlgZVYnidWZ\^cndjg9ViV<jVgY7gd`ZgXdc[^\jgVi^dc#IdgZXVe!ndj]VkZYdcZ i]Z[daadl^c\/ N HZijendjg7gd`ZgXdc[^\jgVi^dc[^aZeVgVbZiZgh N 8gZViZYVcncZXZhhVgnY^gZXidg^Zh N :cVWaZYi]Z7gd`ZgWnhZii^c\i]ZSTARTeVgVbZiZgidTRUEdcndjgeg^bVgnVcYVaahiVcYWn YViVWVhZh N BVYZi]ZVeegdeg^ViZICHC6B:Zcig^ZhdcVaad[i]ZhnhiZbh^ckdakZY^ci]Z Xdc[^\jgVi^dc N HZijei]ZhiVi^Xa^hiZcZgZcig^ZhdcVaad[i]ZhnhiZbh
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
193
N HdgiZYdjii]Z8GHhZii^c\h N JhZYVjhZgcVbZVcYeVhhldgYidXdccZXiid9
Managing Data Guard with the Broker 6hY^hXjhhZYZVga^Zg!9idi]Z7gd`ZgVcYi]Z9
Connection and help CONNECT!HELP!VcYEXIT
N
Creation and editing CREATE!ADD!ENABLE!EDIT!VcYCONVERT
N
Monitoring SHOW
N
Role transition SWITCHOVER!FAILOVER!VcYREINSTATE
>ci]^hhZXi^dc!lZl^aaY^hXjhh]dlidjhZi]ZXdbbVcYh^ci]Z[^ghiildVgZVh!l]^X]l^aa ^cXajYZi]ZXgZVi^dc!ZcVWa^c\!VcYZY^i^c\d[V7gd`ZgXdc[^\jgVi^dc#I]Zbdc^idg^c\"heZX^[^X XdbbVcYh[dgi]ZbdhieVgiVgZY^hXjhhZY^ci]ZcZmihZXi^dcVcYi]ZigVch^i^dcXdbbVcYhl^aa WZhVkZY[dg8]VeiZg-# 7Z[dgZlZ\ZihiVgiZY!ndjcZZYid`cdli]Vi^[ndjVgZV7gd`ZgjhZg[gdbi]ZDgVXaZ.iYVnh! ndj]VkZid[dg\ZiZkZgni]^c\ndj`cdlVWdjii]Z9I: Y^hVeeZVgZYXdbeaZiZan#L^i]i]VijcYZghiddY!aZi¼hXgZViZV7gd`ZgXdc[^\jgVi^dc#
Creating and Enabling a Broker Configuration 9iXVccdiXdeni]ZYViVWVhZ[^aZhidi]ZhiVcYWn hZgkZgVcYYdVaai]Zi]^c\hcZXZhhVgnidXgZViZi]ZhiVcYWnYViVWVhZ#
194
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Welcome to DGMGRL, type "help" for information. DGMGRL> CONNECT sys/oracle Connected. DGMGRL> CREATE CONFIGURATION MATRIX AS > PRIMARY DATABASE IS MATRIX > CONNECT IDENTIFIER IS matrix; Error: ORA-16642: DB_UNIQUE_NAME mismatch Failed. DGMGRL>
Add`^c\^cidi]Z9G8ad\gZbZbWZgi]Vi^i^h^ci]ZhVbZeaVXZVhi]ZYViVWVhZVaZgiad\! ndjl^aahZZi]Z[daadl^c\bZhhV\ZZY^iZYid[^i]ZgZ/ 0 2 0 DMON: Cannot add the primary database with db_unique_name matrix 0 2 0 My db_unique_name is Matrix_DR0. 0 2 671586149 DMON: ADD_DATABASE: (error=ORA-16642)
6hndjXVchZZ[gdbi]Z9G8ad\!i]Z7gd`ZggZfj^gZhi]Vii]ZDB_UNIQUE_NAMEd[i]ZYViVWVhZ idl]^X]lZVgZViiVX]ZYbViX]Zhi]Zeg^bVgnYViVWVhZcVbZlZheZX^[^ZY# DcZi]^c\i]ViY^Y]VeeZc[gdbi]^hb^hiV`ZcViiZbei^hi]Vii]ZXdc[^\jgVi^dc[^aZlVhXgZViZY dcdjghiVcYWnYViVWVhZ!XdbeaZiZl^i]i]Za^c`idi]Z96I6<J6G98DC;><[^aZ!Vai]dj\]^i^h XjggZcianZbein#HdaZi¼hignV\V^c#LZl^aabdkZidi]Zeg^bVgnhnhiZbVcYhZidjgORACLE_SIDid i]Zeg^bVgnH>9!BVig^m/ [Matrix] dgmgrl DGMGRL for Linux: Version 11.1.0.6.0 - Production Copyright (c) 2000, 2005, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. DGMGRL> CONNECT sys/oracle Connected. DGMGRL> CREATE CONFIGURATION MATRIX AS > PRIMARY DATABASE IS MATRIX > CONNECT IDENTIFIER IS matrix; Configuration "matrix" created with primary database "matrix" DGMGRL>
6ii]^hed^ci!lZ]VkZVXdc[^\jgVi^dcXgZViZYVcYhidgZY^ci]Zeg^bVgnYViVWVhZ Xdc[^\jgVi^dc[^aZh#7jicdi]^c\^h]VeeZc^c\nZiVhlZYdcdi]VkZVhiVcYWnYViVWVhZcdg^hi]Z Xdc[^\jgVi^dcZcVWaZY#6h^beaZSHOW CONFIGURATIONl^aah]dljhi]ZXjggZcihiViZd[djg Xdc[^\jgVi^dc/ DGMGRL> show configuration Configuration Name: matrix Enabled: NO Protection Mode: MaxPerformance Databases: matrix - Primary database Fast-Start Failover: DISABLED Current status for "matrix": DISABLED
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
195
I]ZcZmihiZe^hidVYYdjghiVcYWnYViVWVhZi]VilZXgZViZY^c8]VeiZg'jh^c\dcZd[i]Z EdlZgJhZgbZi]dYh#I]^h^hYdcZl^i]i]ZADD DATABASEXdbbVcY#I]ZVg\jbZcihVgZh^b^aVgid i]dhZd[i]ZCREATE CONFIGURATIONXdbbVcYVcYgZfj^gZVYViVWVhZcVbZ[dgi]ZhiVcYWnDB_ UNIQUE_NAMEd[i]ZhiVcYWn!VXdccZXi^YZci^[^Zgi]ZICHC6B:[dgi]ZhiVcYWn!VcY! dei^dcVaan!Vc^cY^XVi^dcd[l]Zi]Zgi]ZhiVcYWn^hVe]nh^XVadgVad\^XVahiVcYWnYViVWVhZ#I]^h^h l]ZgZi]ZlVnndjXgZViZYi]ZhiVcYWnhiVgihidbV`ZVY^[[ZgZcXZ#I]Z7gd`ZgXVcjhZi]ZYViVWVhZ cVbZVadcZidhZijei]ZegdeZgi^Zh[dgi]ZhiVcYWnYViVWVhZ!Wjidcan^[ndjVagZVYnXdc[^\jgZY VigVchedgieVgVbZiZgLOG_ARCHIVE_DEST_n^ci]ZegdeZgbVccZg#>[cdi!ndjl^aahZZi]Z [daadl^c\Zggdg/ DGMGRL> ADD DATABASE MATRIX_DR0; Error: ORA-16796: one or more properties could not be imported from the database Failed.
Hdl]Vi^hi]ZegdeZglVnidhZijei]ZigVchedgieVgVbZiZg4Ndjbjhi]VkZndjgGZYd IgVchedgieVgVbZiZghYZ[^cZYjh^c\i]ZDB_UNIQUE_NAMEbZi]dY!bZVc^c\i]ViZVX]GZYd >Viig^WjiZ#I]Z7gd`Zgl^aa IgVchedgieVgVbZiZgbjhiXdciV^ci]ZDB_UNIQUE_NAME= n hZVgX]Vaad[ndjgLOG_ARCHIVE_DEST_neVgVbZiZghadd`^c\[dgVYViVWVhZjc^fjZcVbZi]Vi bViX]Zhi]ZYViVWVhZcVbZndjZciZgZY[dgi]ZXdbbVcY#BZgZanjh^c\i]ZhVbZcVbZ^ci]Z hZgk^XZViig^WjiZ!SERVICE=name…!^hcdiZcdj\]#I]Z7gd`Zgl^aacdiWZVWaZid[^cYi]ZegdeZg XdccZXi^dc^c[dgbVi^dcVcYl^aa[V^aidVYYi]ZYViVWVhZ#>cdjgXVhZ!lZ]VkZcdiYZ[^cZYVcnd[ i]Z9ViV<jVgYeVgVbZiZgh^cdjgXjggZcihZije#HdlZbjhijhZi]Z[jaahZid[Vg\jbZcihidi]Z ADD DATABASEXdbbVcYidVaadli]Z7gd`ZgidXdccZXiidi]ZhiVcYWn/ DGMGRL> ADD DATABASE MATRIX_DR0 > AS CONNECT IDENTIFIER IS MATRIX_DR0 > MAINTAINED AS PHYSICAL; Database "matrix_dr0" added DGMGRL> SHOW CONFIGURATION; Configuration Name: matrix Enabled: NO Protection Mode: MaxPerformance Databases: matrix - Primary database matrix_dr0 - Physical standby database Fast-Start Failover: DISABLED Current status for "matrix": DISABLED DGMGRL>
LZcdl]VkZV7gd`ZgXdc[^\jgVi^dcgZVYnid\d#6aai]Vi^haZ[iidhiVgii]^c\hje^hidENABLE i]ZXdc[^\jgVi^dc#7jiWZ[dgZlZYdi]Vi!aZi¼hadd`Vil]ViVXijVaan]VeeZcZYWZ]^cYi]ZhZh^beaZ VcY[VhiXdbbVcYh# I]Z7gd`Zgl^aahZii]ZegdeZgi^Zhd[i]ZXdc[^\jgVi^dcidYZ[VjaikVajZhWVhZYdcl]Vi^i[^cYh l]ZcndjXgZViZi]ZXdc[^\jgVi^dc#>[ndj]VkZXgZViZYVhiVcYWnYViVWVhZWjicdihZiVcnd[i]Z 9ViV<jVgYeVgVbZiZgh!i]Z7gd`Zgl^aahZiZkZgnegdeZgin^ci]ZXdc[^\jgVi^dcidi]ZYZ[Vj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]ZgegdeZgi^Zh!i]Z7gd`Zg Z^i]Zg[djcYVcZmea^X^ikVajZdg^iadd`ZYjei]ZYZ[VjaikVajZ[dgi]ZeVgVbZiZg#6cYdi]ZghlZgZ hZiidi]Z7gd`Zg¼hdlcYZ[VjaihZii^c\h!hjX]VhApplyParallel#NdjXVchZZi]ZkVg^djhegdeZgi^Zh Wn^hhj^c\i]ZSHOW DATABASE VERBOSEXdbbVcY/ DGMGRL> show database verbose matrix; Database Name: matrix Role: PRIMARY Enabled: NO Intended State: OFFLINE Instance(s): Matrix Properties: DGConnectIdentifier = 'matrix' LogXptMode = 'ASYNC' DelayMins = '0' Binding = 'OPTIONAL' MaxFailure = '0' MaxConnections = '1' ReopenSecs = '300' NetTimeout = '30' RedoCompression = 'DISABLE' LogShipping = 'ON' PreferredApplyInstance = '' ApplyInstanceTimeout = '0' ApplyParallel = 'AUTO' StandbyFileManagement = 'MANUAL' ArchiveLagTarget = '0' LogArchiveMaxProcesses = '4' LogArchiveMinSucceedDest = '1' DbFileNameConvert = '' LogFileNameConvert = '' HostName = 'matrix.domain' SidName = 'Matrix' StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST' AlternateLocation = '' LogArchiveTrace = '0' LogArchiveFormat = '%t_%s_%r.dbf'
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
197
Current status for "matrix": DISABLED DGMGRL>
I]^hZmVbeaZ]VhWZZcZY^iZYidh]dldcani]dhZegdeZgi^Zhi]VindjldjaYWZVWaZidX]Vc\ZVi i]^hbdbZci#I]Zbdc^idg^c\VcY;Vhi"HiVgi;V^adkZgegdeZgi^Zh]VkZWZZcgZbdkZY#>[ndjadd`Vi i]ZhiVcYWnYViVWVhZBVig^mT9G%!ndjl^aahZZi]ZhVbZYZ[VjaihWji[dgi]ZhiVcYWnYViVWVhZ# >[!dci]Zdi]Zg]VcY!ndj]VYhZije9ViV<jVgYidh]^eVcYVeeangZYd!i]Zci]Z7gd`Zg ldja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VWdji+'b^aZhVeVgiVcYjh^c\i]ZSYNCGZYdIgVchedgibdYZ#NdjlVciidVYYV hZXdcYhiVcYWni]Vi^h&+%%`b&%%%b^aZhVlVn[dg\Zd\gVe]^XhZeVgVi^dc#>[ndj]VkZXgZViZY i]ZgZbdiZhiVcYWnVcYXdc[^\jgZYi]ZGZYdIgVchedgieVgVbZiZghidWZASYNC!i]ZcVaal^aaWZ lZaaVcYi]ZhiVcYWnl^aaXdci^cjZidgjc^cASYNCbdYZl]ZcndjZcVWaZ^i#7ji^[ndjXgZViZY i]ZgZbdiZhiVcYWnjh^c\i]Zh]dgibZi]dY!ZmeZXi^c\i]Z7gd`ZgidiV`ZXVgZd[i]^c\h[dgndj! i]Zci]^hhZXdcYhiVcYWnl^aaYZ[VjaiidSYNCigVchedgiYjZidi]ZZaZkViZYegdiZXi^dcbdYZ
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
199
d[i]ZXdc[^\jgVi^dc#H^cXZVaacZlYViVWVhZhVYYZYidi]ZXdc[^\jgVi^dc]VkZidWZbVcjVaan ZcVWaZY!ndjl^aacdi]VkZVegdWaZbVcYXVcX]Vc\Zi]ZegdeZgin[dgi]^hhiVcYWnidWZASYNC WZ[dgZndjZcVWaZ^i#7ji^[ndjWa^cYanZcVWaZi]ZcZlYViVWVhZ^ci]^hZmVbeaZ!ndjgegdYjXi^dc ldjaYhj[[ZgVbV_dg]^iVh^i^hVaad[VhjYYZclV^i^c\[dggZYdidWZh]^eeZYdkZgi]ZL6C# H^cXZGZYdIgVchedgi^hYncVb^X!ndjXVcfj^X`anXdggZXii]^hWnhZii^c\i]ZegdeZginYdlcid ASYNC[dgi]ZhZXdcYhiVcYWnVcYi]Zchl^iX]^c\ad\hdci]Zeg^bVgnYViVWVhZ#7ji^il^aaXVjhZ hdbZZmX^iZbZci[dgVl]^aZ TIP Always check the database properties for a newly added database before issuing the E A LE A A A E command to ensure that everything is set the way you want it to be. I]^h^hl]nlZhV^Yi]Vi^i^h^bedgiVciidjcYZghiVcYl]Vi^h\d^c\dcWZ]^cYi]ZhXZcZh WZ[dgZndjZcVWaZVYViVWVhZdgVcZlXdc[^\jgVi^dc#>[ndjcZZYidX]Vc\ZegdeZgi^Zh!ndjbjhi YdhdWZ[dgZndjZcVWaZi]ZYViVWVhZdgXdc[^\jgVi^dc#LZl^aaY^hXjhhZY^i^c\egdeZgi^Zh^ci]Z cZmihZXi^dc# H^cXZi]ZYZ[VjaihVgZVXXZeiVWaZ[dgdjgXjggZcihZije!lZXVcZcVWaZi]ZXdc[^\jgVi^dcVcY aZii]Z7gd`ZghiVgiZkZgni]^c\je/ DGMGRL> ENABLE CONFIGURATION; Enabled.
I]^hh^c\aZXdbbVcYl^aaeZg[dgbhZkZgVadeZgVi^dchdci]Zeg^bVgnVcYVaahiVcYWn YViVWVhZh#>il^aa^hhjZALTER SYSTEMXdbbVcYhdci]Zeg^bVgnidhZii]Z9ViV<jVgY eVgVbZiZghi]ViVgZgZfj^gZY[dgVYViVWVhZi]Vi^hgjcc^c\Vhi]Zeg^bVgn!VcYhiVgiGZYd IgVchedgiidi]ZhiVcYWnYViVWVhZh#I]Z7gd`Zgl^aaVahd^hhjZALTER SYSTEMXdbbVcYhdci]Z hiVcYWnYViVWVhZhidhZijei]ZeVgVbZiZghgZfj^gZY[dgVYViVWVhZi]Vi^hgjcc^c\^ci]ZhiVcYWn bdYZVcYl^aahiVgijei]ZVeeanhZgk^XZh#6h^iiV`ZhVW^id[i^bZ[dgVaad[i]^hiddXXjg!ndjl^aa bdhia^`ZanhZZVcDG6"&++&%^[ndj^hhjZVSHOWCONFIGURATIONXdbbVcYiddfj^X`anV[iZg i]ZZcVWaZXdbbVcYgZijgch/ DGMGRL> SHOW CONFIGURATION; Configuration Name: matrix Enabled: YES Protection Mode: MaxPerformance Databases: matrix - Primary database matrix_dr0 - Physical standby database Fast-Start Failover: DISABLED Current status for "matrix": Warning: ORA-16610: command "ENABLE DATABASE matrix_dr0" in progress
NdjXVclViX]i]Z7gd`ZgeZg[dgb^ihbV\^XWn^hhj^c\Vtail -fd[i]ZYViVWVhZVaZgiad\[^aZh# 6[iZglV^i^c\[dgV[Zlb^cjiZh!VhZXdcYSHOWCONFIGURATIONXdbbVcYl^aagZijgchjXXZhh/ DGMGRL> SHOW CONFIGURATION; Configuration Name: matrix Enabled: YES
200
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Protection Mode: MaxPerformance Databases: matrix - Primary database matrix_dr0 - Physical standby database Fast-Start Failover: DISABLED Current status for "matrix": SUCCESS DGMGRL>
6h^beaZlVnidX]ZX`i]ZXjggZcihiVijhd[GZYdIgVchedgiVcYi]ZVeeanhZgk^XZh^hidjhZ HFAEajh#8dccZXiidi]ZhiVcYWnYViVWVhZl^i]HFAEajhVcYZmVb^cZi]ZV$MANAGED_ STANDBYk^Zl/ SQL> SELECT CLIENT_PROCESS, PROCESS, THREAD#, SEQUENCE#, STATUS 2 FROM V$MANAGED_STANDBY; CLIENT_P PROCESS THREAD# SEQUENCE# STATUS -------- --------- ---------- ---------- -----------ARCH ARCH 1 31 CLOSING ARCH ARCH 0 0 CONNECTED ARCH ARCH 1 32 CLOSING ARCH ARCH 0 0 CONNECTED N/A MRP0 1 33 APPLYING_LOG LGWR RFS 1 33 IDLE UNKNOWN RFS 0 0 IDLE UNKNOWN RFS 0 0 IDLE UNKNOWN RFS 0 0 IDLE 9 rows selected. SQL>
;gdbi]^hdjieji!ndjXVckZg^[ni]Vii]ZgZYd^hWZ^c\h]^eeZYjh^c\Z^i]ZgHNC8dg6HNC8ndj XVccdiiZaal]^X]dcZ[gdbi]^hk^ZlWZXVjhZi]ZgZ^hVA[i]^hlZgZ Vad\^XVahiVcYWnYViVWVhZ!ndjldjaYjhZi]Zad\^XVahiVcYWnk^Zlh# 6ii]^hed^ci!idVYYbdgZhiVcYWnYViVWVhZh!ndjldjaYgZeZVii]ZhZijeiVh`hVcYZmZXjiZ Vcdi]ZgADD DATABASEXdbbVcY# 6h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ZeZgheZXi^kZVcYl^aaVXijedcVegdeZgin X]Vc\Zdcan^[^iXdch^YZghi]Vii]ZgdaZd[i]ZYViVWVhZndjVgZX]Vc\^c\bZZihi]ZgdaZgZfj^gZbZcih d[i]ZegdeZgin#I]Z7gd`ZgegdeZgi^ZhXVcWZ[jgi]ZgY^k^YZY^cid[^kZbV^cXViZ\dg^Zh/ N
Broker-specific properties I]ZhZV[[ZXii]ZlVni]Z7gd`ZgdeZgViZhVcY]dl;Vhi"HiVgi ;V^adkZg^hXdc[^\jgZY#
N
Database parameters I]ZhZVgZi]ZYViVWVhZeVgVbZiZghi]Vii]Z7gd`ZgdlchVcYVgZ Xdch^YZgZY9ViV<jVgYeVgVbZiZgh#
N
Attributes of the LOG_ARCHIVE_DEST_n parameter I]ZhZVgZndjghZii^c\h[dgGZYd IgVchedgi[dgZVX]YViVWVhZ#
N
SQL syntax I]^hegdeZginbdY^[^ZhVeVgi^XjaVg9ViV<jVgYHFAXdbbVcY#8jggZcian dcZegdeZgin^hZmea^X^ianYZ[^cZYidbdY^[nVHFAXdbbVcY#
N
Logical standby procedure arguments I]ZhZegdeZgi^ZhVgZVg\jbZcihidi]Zad\^XVa hiVcYWn97BHeVX`V\Zhi]ViVaadlndjidbdY^[ni]ZlVnHFA6eeandeZgViZh#
HdbZd[i]ZhZegdeZgi^Zhldc¼iZkZcWZk^h^WaZidndjl^i]i]ZSHOWXdbbVcY^[i]ZgdaZd[i]Z YViVWVhZndjVgZZmVb^c^c\YdZhcdibZZii]ZgdaZd[i]ZegdeZgin#I]Zad\^XVahiVcYWnegdeZgi^Zh VgZV\ddYZmVbeaZ^cl]^X]i]Z7gd`Zgl^aacdiY^heaVni]ZegdeZgi^Zh^[i]ZYViVWVhZ^hcdi Vad\^XVahiVcYWn#
Configuration-level Properties 6ii]ZXdc[^\jgVi^dcaZkZa!Vaai]ZegdeZgi^ZhVgZ7gd`Zg"heZX^[^Xl^i]VaaWjidcZgZaViZYid;Vhi"HiVgi ;V^adkZg!l]^X]l^aaWZY^hXjhhZY^c8]VeiZg-#:VX]d[i]ZhZegdeZgi^Zh^h\adWVaidi]ZZci^gZ Xdc[^\jgVi^dccdbViiZgl]ZgZi]Z7gd`Zg[jcXi^dchVgZiV`^c\eaVXZVcYVgZcdigdaZ"heZX^[^X¸i]Vi ^h!i]ZnVeeancdbViiZgl]^X]YViVWVhZ^hi]ZEG>B6GN# ;daadl^c\VgZi]ZXdc[^\jgVi^dc"aZkZaegdeZgi^Zh/ N
BystandersFollowRoleChange
N
FastStartFailoverAutoReinstate
N
FastStartFailoverLagLimit
N
FastStartFailoverPmyShutdown
N
FastStartFailoverThreshold
N
CommunicationTimeout
202
DgVXaZ9ViV<jVgY&&g=VcYWdd`
I]Z[^ghi[^kZegdeZgi^ZhVgZgZaViZYid;Vhi"HiVgi;V^adkZg!Wjii]Zh^mi]^heVgi^XjaVgan^bedgiVciVi i]^hed^ci#CommunicationTimeout^hi]ZVbdjcid[i^bZi]Vii]Z7gd`Zgl^aalV^i[dgVgZhedchZ [gdbVcZildg`XdccZXi^dcWZilZZcildYViVWVhZh^ci]ZXdc[^\jgVi^dcWZ[dgZ\^k^c\je# >cdaYZgkZgh^dch!i]^hegdeZginlVhcdiXdc[^\jgVWaZVcYXdjaYhdbZi^bZhgZhjai^c Xdbbjc^XVi^dc]Vc\hWZilZZc7gd`ZgYViVWVhZh#I]Z7gd`ZgVgX]^iZXijgZlVhX]Vc\ZYidegZkZci Vc^bedgiVci7gd`ZgegdXZhh[gdb\Zii^c\hijX`^cVcZildg`]Vc\Wni^b^c\djiV[iZgVcjbWZgd[ hZXdcYh#I]ZCommunicationTimeoutegdeZginlVhVYYZYidZchjgZi]Vii]ZgZlVhVYZ[Vjai [dgi]^hZkZcijVadXXjggZcXZVcYidVaadli]Z976idijcZi]ZlV^i#I]ZYZ[Vjai^h(b^cjiZh &-%hZXdcYhVcYXVcWZijcZY[gdb%hZXdcYhje#HZii^c\i]^hegdeZginid%oZgdl^aagZbdkZ Vcni^bZdjiVcYValVnhXVjhZi]Z7gd`ZgXdbbjc^XVi^dcidlV^i[dgVcVchlZg#LZgZXdbbZcY i]VindjcZkZghZii]^hegdeZginidoZgdVhndjldjaYXVjhZi]Z7gd`ZgidlV^i[dgZkZg#>[ndjWZ\^c idhZZadihd[DG6"&+,&(Zggdgh^ci]Z7gd`Zg9G8ad\!ndjb^\]icZZYid^cXgZVhZi]^hegdeZgin jh^c\i]ZEDIT CONFIGURATIONXdbbVcY^c9 EDIT CONFIGURATION SET PROPERTY CommunicationTimeout=200; Property "communicationtimeout" updated DGMGRL>
=dlZkZg![dgh^ijVi^dch^cl]^X]i]Z7gd`ZgiV`Zhadc\Zgi]Vc&-%hZXdcYhid\ZiVcVchlZg [gdbVgZbdiZYViVWVhZ!ndjh]djaYZmVb^cZi]ZcZildg`gVi]Zgi]VcbdY^[ni]^hi^bZdji#
Database-level Properties 9ViVWVhZ"aZkZaegdeZgi^ZhXdbeg^hZVaa[^kZineZhd[7gd`ZgegdeZgi^ZhVcYVgZYZ[^cZY^cY^k^YjVaan [dgZVX]YViVWVhZ^ci]ZXdc[^\jgVi^dc#I]^hbZVchi]ViZVX]YViVWVhZZcign^cndjgXdc[^\jgVi^dc ]VhVhZid[i]ZhZegdeZgi^Zhi]ViYZ[^cZhi]ZlVni]ZYViVWVhZ^hidWZXdc[^\jgZY#I]ZlVni]Vi VeVgi^XjaVgegdeZgin^hjhZY^cndjgXdc[^\jgVi^dc!i]dj\]!YZeZcYhdci]ZgdaZX]VgVXiZg^hi^Xhd[ i]ZegdeZgin#HdbZd[i]ZegdeZgi^ZhVgZYZ[^cZYdcan[dgVhiVcYWnYViVWVhZ!di]Zghdcan[dgV eg^bVgn!VcY^chdbZXVhZh[dgWdi]gdaZh#6ai]dj\]VegdeZginbVncdiVeeanidi]ZXjggZcigdaZ d[VYViVWVhZ!bdhiegdeZgi^ZhXVcWZZY^iZYgZ\VgYaZhhd[i]ZYViVWVhZ¼hXjggZcigdaZ#
Broker-specific Properties
;djg7gd`Zg"heZX^[^XegdeZgi^ZhVgZjhZY/
N
FastStartFailoverTarget
N
ObserverConnectIdentifier
N
ApplyInstanceTimeout
N
PreferredApplyInstance
I]Z[^ghiildVgZ[dg;Vhi"HiVgi;V^adkZgVcYl^aaWZZmeaV^cZY^cYZiV^a^c8]VeiZg-#I]ZaVhiild VgZheZX^[^Xidi]ZhiVcYWngdaZVcYVgZjhZYdcanl]Zci]ZiVg\ZiYViVWVhZWZXdbZhVhiVcYWn# I]ZhZildegdeZgi^ZhVgZjc^fjZWZXVjhZi]ZnWdi]]VkZInstance^ci]ZcVbZ!WjiWdi]VgZ YViVWVhZ"aZkZaegdeZgi^Zh#7di]YZ[^cZi]ZlVni]Z7gd`Zgh]djaY]VcYaZXZgiV^ceVgihd[i]ZVeean gZ\VgYaZhhd[i]Z^chiVcXZl]ZgZi]ZVeeanb^\]iWZgjcc^c\# I]ZApplyInstanceTimeoutegdeZginYZ[^cZh]dladc\i]Z7gd`Zgh]djaYlV^iWZ[dgZ bdk^c\i]ZVeeanegdXZhhidVcdi]Zg^chiVcXZ^cVhiVcYWnG68YViVWVhZ^[^iadhZhXdciVXil^i]i]Z XjggZciVeean^chiVcXZ#7nYZ[Vjai!i]^h^hhZiid%oZgd!l]^X]iZaahi]Z7gd`Zgid[V^adkZgi]ZVeean
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
203
egdXZhh^c\^bbZY^ViZan#>[ndjZmeZg^ZcXZ[gZfjZcicZildg`Wgdlcdjih!^ib^\]iWZldgi]l]^aZid ^cXgZVhZi]^hegdeZgin/ DGMGRL> EDIT DATABASE Matrix_DR0 SET PROPERTY ApplyInstanceTimeout=20; Property "applyinstancetimeout" updated DGMGRL>
I]ZPreferredApplyInstanceegdeZginVaadlhndjidiZaai]Z7gd`Zgl]ZgZndjldjaYa^`Z i]ZVeeanidgjcl]Zcndj]VkZVbjai^eaZ"cdYZG68hiVcYWn#7nYZ[Vjai!i]^hegdeZgin^hZbein! l]^X]iZaahi]Z7gd`Zg^iXVcejii]ZVeeanegdXZhh^c\dcVcnhiVcYWn^chiVcXZ^iX]ddhZh#>chdbZ XVhZh!^ibVnWZcZXZhhVgnidejii]ZVeeanhZgk^XZhdcVegZYZ[^cZYcdYZ#;dgZmVbeaZ!^[ndj ]VkZV[djg"cdYZG68hiVcYWnWjindjlVciidjhZi]gZZd[i]Z[djgcdYZh[dgiZhi^c\dgZkZc[dg Vcdi]ZgegdYjXi^dcYViVWVhZ!ndjb^\]ilVciidignVcY`ZZei]ZVeeanegdXZhh^c\dcdcZ eVgi^XjaVgcdYZ#NdjldjaYYdhdWnhZii^c\i]^hegdeZginidi]ZH>9l]^X]^hVahdi]Z^chiVcXZ aZkZaegdeZginSidNamed[i]Vi^chiVcXZ/ DGMGRL> EDIT DATABASE SET PROPERTY PreferredApplyInstance='Matrix_DR01'; Property "preferredapplyinstance" updated DGMGRL>
NdjcZZYidgZbZbWZgildi]^c\hVWdjii]^hegdeZgin/ N >[i]ZVeean^hVagZVYngjcc^c\dchdbZhnhiZb^ci]ZhiVcYWnG68!bdY^[n^c\i]^h egdeZginl^aacdibdkZi]ZVeeanhZgk^XZh# N I]ZVeeanl^aaWZbdkZYl]Zci]Z7gd`ZgYZX^YZh^icZZYhid[V^adkZgi]ZVeeanhZgk^XZh idVcdi]Zg^chiVcXZd[^ihX]ddh^c\l]Zc^iXVccdadc\ZgXdciVXii]ZXjggZciVeeancdYZ# I]Z7gd`Zgl^aacdiVjidbVi^XVaanbdkZi]ZVeeanhZgk^XZhWVX`idndjgegZ[ZggZY^chiVcXZ l]Zc^i^hgZVX]VWaZV\V^c# JcaZhhndj]VkZcdinZiZcVWaZYi]ZiVg\ZiYViVWVhZVcY]ZcXZi]ZVeeanhZgk^XZhVgZcdinZi gjcc^c\!^ibV`ZhcdhZchZidbdY^[ni]^hegdeZgin#>cWdi]XVhZhbZci^dcZY!ndjXVcjhZi]Z STATEX]Vc\ZeVgid[i]ZEDITXdbbVcYidbdkZi]ZVeeanhZgk^XZhidVheZX^[^X^chiVcXZ#LZ l^aaY^kZ^cidi]ZhiViZh^cVW^i!WjiVcZmVbeaZd[i]^hXdbbVcY[daadlh/ DGMGRL> EDIT DATABASE 'Matrix_DR0' SET STATE='APPLY-ON' WITH APPLY INSTANCE='Matrix_DR01'; Succeeded. DGMGRL> SHOW DATABASE 'Matrix_DR0' 'PreferredApplyInstance'; PreferredApplyInstance = 'Matrix_DR01'
I]^hldjaYhZii]ZPreferredApplyInstanceegdeZgin[dgndjVcYbdkZi]ZVeeanhZgk^XZhid i]ZYZh^gZY^chiVcXZ# TIP Unless you have a specific reason for setting the P A n n property, leave it blank and let the Broker choose the apply instance.
204
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Database Parameter Properties HZkZgVa7gd`ZgegdeZgi^ZhZfjViZY^gZXianidVYViVWVhZeVgVbZiZg dcZVX]d[i]ZYViVWVhZh^cndjgXdc[^\jgVi^dc#I]ZegdeZgi^ZhVcYi]ZeVgVbZiZghi]ZnZfjViZid VgZa^hiZY]ZgZ/ N
Arc
N
D F
N
Lo Arc
Ma
N
Lo Arc
M
N
Lo F
N
Lo S
N
S a
ARCHIVE_LAG_TARGET
La Tar
r DB_FILE_NAME_CONVERT
Nam Co
S cc
Nam Co pp F
LOG_ARCHIVE_MAX_PROCESSES
roc D
LOG_ARCHIVE_MIN_SUCCEED_DEST
r LOG_FILE_NAME_CONVERT
(Standby role only) LOG_ARCHIVE_DEST_STATE_n Ma a
m
(Standby role only) STANDBY_FILE_MANAGEMENT
L]ZcndjbdY^[ndcZd[i]ZhZegdeZgi^Zh!i]ZXdggZhedcY^c\eVgVbZiZgd[i]ViYViVWVhZ\Zih hZiidi]ZVeegdeg^ViZkVajZl]ZccZXZhhVgn#7jil]ViYdZhwhen necessarybZVc4HjeedhZndj lZgZcdijh^c\i]Z7gd`Zg0i]ZcVcnX]Vc\ZndjbV`Zidi]ZhZeVgVbZiZghjh^c\i]ZHFAEajh ALTER SYSTEM SETXdbbVcYldjaY\ZihZi^bbZY^ViZan^[i]ZeVgVbZiZg^hYncVb^X#I]Z 7gd`Zg!dci]Zdi]Zg]VcY!ldjaYbV`Zi]ZeVgVbZiZgX]Vc\Zdcan^[i]ZXjggZcigdaZd[i]ZiVg\Zi YViVWVhZbZZihi]Z7gd`Zg¼hgZfj^gZbZcih!VcY^[i]ZeVgVbZiZglZgZcdiYncVb^X^ildjaY VjidbVi^XVaanVYYi]ZSCOPE=SPFILE!VhndjldjaY]VkZidYdl^i]HFAEajh#Hd![dgZmVbeaZ! X]Vc\^c\i]ZLogArchiveFormategdeZginidheZX^[nVY^[[ZgZcicVbZ[dgi]ZYViVWVhZVgX]^kZ ad\[^aZhldjaYWZZmZXjiZYdci]ZYViVWVhZgZ\VgYaZhhd[i]ZgdaZ!Wjil^i]i]ZSCOPE=SPFILE fjVa^[^Zg/ DGMGRL> EDIT DATABASE MATRIX SET PROPERTY LogArchive Format='%t%s%r_new.dbf'
7ji^ci]ZVaZgiad\d[BVig^m!ndjldjaYhZZi]Z[daadl^c\/ ALTER SYSTEM SET log_archive_format='%t%s%r_new.dbf' SCOPE=SPFILE SID='Matrix';
6cYjci^andjgZhiVgiZYi]ZiVg\ZiYViVWVhZBVig^m!^ci]^hXVhZ!ndjldjaYhZZi]Z[daadl^c\ Zggdgl]ZcndjeZg[dgbVSHOW DATABASE VERBOSE MATRIX!h^cXZi]ZXjggZci^c"bZbdgn kVajZcdadc\ZgbViX]Zhi]ZSPFILEkVajZ/ Current status for "matrix": Warning: ORA-16792: configurable property value is inconsistent with database setting
Dci]Zdi]Zg]VcY!VegdeZginhjX]VhStandbyFileManagement^hXdch^YZgZYWni]Z 7gd`ZgidWZVhiVcYWn"dcanegdeZgin#>il^aaX]Vc\Zi]ZkVajZd[i]ZegdeZgin^ci]ZXdc[^\jgVi^dc [^aZhWjii]ZALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO MANUALXdbbVcYl^aa WZ^hhjZYdcanl]Zci]ZYViVWVhZ^hhiVgiZY^ci]ZhiVcYWngdaZ#>cHFAEajh!i]ZeVgVbZiZgldjaY WZhZi^bbZY^ViZanWjicdijhZYjci^ai]ZYViVWVhZWZXVbZVe]nh^XVahiVcYWn# I]ZhVbZYdZhcdiVeeanidi]ZegdeZginLogShipping!l]^X]ZcVWaZhdgYZ[ZghGZYd IgVchedgiidi]VihiVcYWnYViVWVhZ#I]^h^hdcZd[i]dhZreverse properties¸reverse^ci]ZhZchZ i]VindjhZi^idcVYViVWVhZWjii]ZgZhjai^c\HFAXdbbVcYidX]Vc\Zi]ZYViVWVhZeVgVbZiZg^h ZmZXjiZYdcl]ViZkZgYViVWVhZ^hi]Zeg^bVgnVii]Zi^bZ#6hhjbZ![dgZmVbeaZ!i]ViBVig^m^hdjg
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
205
eg^bVgnYViVWVhZVcYBVig^mT9G%^hdjghiVcYWnYViVWVhZ#8]Vc\^c\i]ZLogShippingegdeZgin d[BVig^ml^aacdiXVjhZVcnHFAidWZ^hhjZYVii]^hi^bZ#8]Vc\^c\i]ZLogShippingegdeZgin dcdjghiVcYWnBVig^mT9G%l^aahZii]ZegdeZgin[dgBVig^mT9G%^ci]ZXdc[^\jgVi^dc[^aZh!Wjii]Z HFAl^aaWZZmZXjiZYdci]ZBVig^mYViVWVhZ#=ZgZ¼hVcZmVbeaZ/ DGMGRL> SHOW DATABASE MATRIX LogShipping; LogShipping = 'ON' DGMGRL> EDIT DATABASE MATRIX SET PROPERTY LogShipping='OFF'; Property "logshipping" updated DGMGRL> SHOW DATABASE MATRIX LogShipping; LogShipping = 'OFF' DGMGRL> SHOW DATABASE MATRIX_DR0 LogShipping; LogShipping = 'ON' DGMGRL> EDIT DATABASE MATRIX_DR0 SET PROPERTY LogShipping='OFF'; Property "logshipping" updated DGMGRL> DGMGRL> SHOW DATABASE MATRIX_DR0 LogShipping; LogShipping = 'OFF'
I]^hldjaYhZijeBVig^mcdiidgZXZ^kZgZYdl]Zc^iWZXdbZhVhiVcYWnYViVWVhZVcYl^aa hidei]ZigVchedgid[gZYdidBVig^mT9G%^bbZY^ViZan#NdjXVckZg^[ni]^hWnZmVb^c^c\i]ZVaZgi ad\d[BVig^m#I]ZdcanZcignndjl^aahZZ^hi]Z[daadl^c\/ ALTER SYSTEM SET log_archive_dest_state_2='RESET' SCOPE=BOTH;
I]ZYZhi^cVi^dceVgVbZiZgcjbWZg'^hXjggZcianWZ^c\jhZYWn9ViV<jVgYidigVchedgigZYdid djghiVcYWnVcY^hcdlYZ[ZggZYjci^alZX]Vc\Zi]ZLogShippingegdeZginWVX`idON# TIP Never use SQL*Plus to modify any of the parameters for which the Broker has a corresponding property when you have enabled the Broker. If you do make these changes, you will see error messages and the Broker will put those parameters back to its view of the world at the next restart of the database. Always use DGMGRL and the E command to make these changes.
LOG_ARCHIVE_DEST_n Attribute Properties 6aad[i]ZLOG_ARCHIVE_DEST_nViig^WjiZ egdeZgi^ZhVgZ^cY^k^YjVaViig^WjiZhi]VibdY^[ni]ZlVn9ViV<jVgYh]^ehi]ZgZYdidZVX] hiVcYWn!l^i]ZVX]egdeZginWZ^c\dcZd[i]ZViig^WjiZhi]Vi^hhZi^cVLOG_ARCHIVE_DEST_n YViVWVhZeVgVbZiZg#CdiVaad[i]ZGZYdIgVchedgiViig^WjiZhVgZVkV^aVWaZi]gdj\]i]Z7gd`ZgVcY ndjXVccdihZiVcnViig^WjiZhi]ViVgZcdik^h^WaZY^gZXianl^i]HFAEajh!WZXVjhZi]Z7gd`Zgl^aa gZhZii]ZeVgVbZiZgid^ihk^Zld[i]ZldgaY#L]VindjhZZ^hl]Vindj\Zi#I]ZhZegdeZgi^ZhVcY i]ZViig^WjiZhi]ZngZaViZidVgZh]dlc]ZgZ/ MANDATORYdgOPTIONAL
N
ASYNCdgSYNC
N
Lo Xp Mo
N
Ma Co
c
N
Ma Fa
r MAX_FAILURE
o
MAX_CONNECTIONS
206
DgVXaZ9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ERVICE=MatrixVcYi]ZhVbZVALID_FOR!VcYhddc#I]^heVgVbZiZgldjaYcdiWZ jhZYjci^aBVig^mT9G%WZXdbZhi]Zeg^bVgnYViVWVhZ#Hd^[ndjadd`Vii]^had\^XVaan!BVig^m^h XjggZcianh]^ee^c\gZYdidBVig^mT9G%!VcYBVig^mT9G%l^aaWZ\^cidh]^egZYdidBVig^ml]ZcV gdaZhl^iX]dXXjgh# I]Z7gd`ZgViig^WjiZegdeZgi^Zh!dci]Zdi]Zg]VcY!VgZhZidci]ZYViVWVhZi]Vi^h\d^c\idgZXZ^kZ gZYdl]Zc^i^h^ci]ZhiVcYWngdaZ#HdidbV`ZhjgZi]VigZYd^hhZci[gdbBVig^midBVig^mT9G%!ndj ldjaYhZii]ZegdeZgi^ZhdcBVig^mT9G%VXXdgY^c\an#6cYidbV`ZhjgZi]Vii]ZhVbZGZYdIgVchedgi \dZh^cidZ[[ZXil]ZcBVig^mT9G%WZXdbZhi]Zeg^bVgn!ndjldjaYhZii]ZhZegdeZgi^ZhdcBVig^m# Hd![dgZmVbeaZ!^[lZlZgZidX]Vc\Zi]ZigVchedgibdYZLogXptModehdi]VilZh]^egZYd ^ci]ZSYNCbdYZidBVig^mT9G%!lZldjaYjeYViZi]ZegdeZgindcBVig^mT9G%Wjii]ZgZhjaid[ i]ZX]Vc\ZldjaYWZVcALTER SYSTEMXdbbVcYdcBVig^m/ DGMGRL> SHOW DATABASE MATRIX_DR0 LogXptMode; LogXptMode = 'ASYNC' DGMGRL> EDIT DATABASE MATRIX_DR0 SET PROPERTY LogXptMode='SYNC'; Property "logxptmode" updated DGMGRL> SHOW DATABASE MATRIX_DR0 LogXptMode; LogXptMode = 'SYNC' DGMGRL>
NdjldjaYi]ZchZZi]Z[daadl^c\ALTER SYSTEMXdbbVcYWZ^c\ZmZXjiZYdcBVig^m[gdbi]Z VaZgiad\cdiZi]Vii]Z7gd`ZghZihi]ZAFFIRMegdeZginVjidbVi^XVaanl]ZcndjbdkZidSYNC/ ALTER SYSTEM SET log_archive_dest_2='service="matrix_dr0"',' LGWR SYNC AFFIRM delay=0 OPTIONAL compression=DISABLE max_failure=0 max_connections=1 reopen=300 db_unique_name="matrix_dr0" net_timeout=30 valid_for=(online_logfile,primary_role)' SCOPE=BOTH; ALTER SYSTEM SET log_archive_dest_state_2='ENABLE' SCOPE=BOTH;
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
207
LZVgZcdlh]^ee^c\gZYd[gdbBVig^midBVig^mT9G%hncX]gdcdjhan#7ji^[lZhideeZY]ZgZ! lZldjaY]VkZXdc[^\jgVi^dcegdWaZbhl]ZclZYdVhl^iX]dkZg# GZbZbWZgi]VindjhZii]ZhZViig^WjiZhdcVYViVWVhZidYZ[^cZ]dlndjlVci9ViV<jVgYid h]^egZYdidi]ViYViVWVhZl]Zc^iWZXdbZhVhiVcYWn#Hd!^cdjgXVhZ!lZ]VkZcdibdY^[^ZY BVig^m!VcYh^cXZi]ZLogXptModeegdeZgin[dgBVig^m^hhi^aahZiidASYNC!i]Z7gd`ZgldjaYhZi BVig^midgZXZ^kZgZYdVhncX]gdcdjhanl]Zc^iWZXVbZVhiVcYWnYViVWVhZ#LZcZZYidX]Vc\Z i]ZLogXptModeegdeZgin[dgBVig^mVhlZaa/ DGMGRL> SHOW DATABASE MATRIX LogXptMode; LogXptMode = 'ASYNC' DGMGRL> EDIT DATABASE MATRIX SET PROPERTY LogXptMode='SYNC'; Property "logxptmode" updated DGMGRL> SHOW DATABASE MATRIX LogXptMode; LogXptMode = 'SYNC' DGMGRL>
>ci]^hXVhZ!cdi]^c\ldjaYVXijVaan]VeeZcdcBVig^mh^cXZi]^h^hYdcZ_jhiidhZijeBVig^mid gZXZ^kZgZYdhncX]gdcdjhanl]Zc^igZa^cfj^h]Zh^ihgdaZVheg^bVgnVcYWZXdbZhVhiVcYWnYViVWVhZ# 7ZVlVgZd[i]Z[VXii]ViZkZgni^bZndjbdY^[ndcZd[i]ZhZegdeZ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ZVeeanhnciVmdcV hiVcYWnYViVWVhZl^aaVjidbVi^XVaanXVjhZVcnYZaVnheZX^[^ZY[dgi]VihiVcYWnYViVWVhZidWZ ^\cdgZY#I]^h^hcdiedhh^WaZl^i]i]Z7gd`Zg# TIP If you specify a delay using the n property, then that standby cannot perform real-time apply. In a SQL*Plus–managed Data Guard configuration, starting the apply services using real-time apply will override the delay.
SQL Syntax Properties DcandcZegdeZginXjggZcian[Vaah^cidi]^hXViZ\dgn!Vai]dj\]X]Vc\Zh idi]ZYViVWVhZVcYViig^WjiZegdeZgi^ZhYdXVjhZHFAidWZZmZXjiZYhdbZl]ZgZ#I]^hegdeZgin^h N
App
ara
PARALLEL=n
7nVSQL property!lZbZVci]Vii]^hegdeZginYdZhcdibdY^[nVeVgVbZiZgdcVYViVWVhZ! cdgYdZh^iV[[ZXii]ZlVni]Z7gd`ZgZmZXjiZh#L]Vi^iYdZh^hX]Vc\Zi]ZlVni]Z7gd`ZghiVgihje
208
DgVXaZ9ViV<jVgY&&g=VcYWdd`
i]ZVeeanhZgk^XZh[dgVe]nh^XVahiVcYWn#>iV[[ZXihi]ZlVnbZY^VgZXdkZgndci]Ze]nh^XVa hiVcYWnYViVWVhZjhZheVgVaaZaegdXZhhZh#L^i]i]^hegdeZgin!ndjXVcVXXdbea^h]dcZd[ild i]^c\h/VaadlbZY^VgZXdkZgnidjhZeVgVaaZaegdXZhhZhhZiidAUTO!dgY^hVaadl^i[gdbjh^c\Vcn eVgVaaZaegdXZhhZhhZiidNO#NdjXVccdiheZX^[nVcjbWZgd[eVgVaaZaegdXZhhZhi]VindjldjaY a^`ZbZY^VgZXdkZgnidjhZ#I]ZYZ[Vjai^hAUTO!VcYlZgZXdbbZcYi]VindjaZVkZi]ZegdeZgin hZiVi^ihYZ[Vjai#
Logical Standby Properties I]ZaVhihZid[YViVWVhZ"aZkZaegdeZgi^ZhVgZhdaZan[dgad\^XVa hiVcYWnYViVWVhZh#I]ZhZegdeZgi^ZhXdggZhedcYY^gZXianidVg\jbZcihidi]ZHFA6eean egdXZYjgZh^cigdYjXZYVcYY^hXjhhZY^c8]VeiZg)/ r HZii]ZSKIP TABLES
N
L
AS
pC
N
L
AS
pErrorC
N
L
AS
pT
N
L
DS
pC
N
L
DS
pErrorC
N
L
DS
pT
N
L
Ma E
N
L
N
L
R cor App
D
N
L
R cor S
pD
HZiRECORD_SKIPPED_DDL
N
L
R cor S
pError HZiRECORD_SKIPPED_ERRORS
r
r HZiSKIP ERRORgjaZh r EZg[dgbVSKIP TRANSACTION
C
r JchZiSKIP TABLES
C
r JchZiSKIP ERRORgjaZh r JchZiVSKIP TRANSACTION
R cor r
Comm
Or
HZiMAX_EVENTS_RECORDED r BdY^[ni]ZPRESERVE_COMMIT_ORDER
HZiRECORD_APPLIED_DDL
I]ZhZegdeZgi^ZhVgZVkV^aVWaZdcandcVad\^XVahiVcYWnVcYYdcdih]dlje^ci]ZSHOW DATABASE VERBOSEXdbbVcY!VcY^[ndjignidbdY^[ni]ZbdcVe]nh^XVahiVcYWnndjl^aa\Zi VcZggdg# DGMGRL> EDIT DATABASE Matrix_DR0 SET PROPERTY LsbyPreserveCommitOrder='FALSE'; Error: ORA-16788: unable to set one or more database configuration property values Failed. DGMGRL>
=dlZkZg!^[ndjX]Vc\Zi]ZegdeZgindcVeg^bVgnYViVWVhZ!i]ZbdY^[^XVi^dcl^aahjXXZZY WZXVjhZi]Zeg^bVgnXdjaYWZXdbZVad\^XVahiVcYWnYViVWVhZ^[Vhl^iX]dkZgidVad\^XVahiVcYWn YViVWVhZdXXjgh/ DGMGRL> EDIT DATABASE Matrix SET PROPERTY LsbyPreserveCommitOrder='FALSE'; Property "lsbypreservecommitorder" updated DGMGRL> DGMGRL> SHOW DATABASE Matrix LsbyPreserveCommitOrder; LsbyPreserveCommitOrder = 'FALSE' DGMGRL>
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
209
6hl^i]i]ZYViVWVhZVcYViig^WjiZegdeZgi^Z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ldjaYlVciidhZieZg^chiVcXZ!Vh^i ^hZ^i]ZgdcZ^chiVcXZi]Vi^hXVjh^c\egdWaZbhdgVaa^chiVcXZhVgZ]Vk^c\i]ZhVbZegdWaZb!VcY Y^V\cdh^c\i]Z^hhjZdcdcZhnhiZbl^aaWZZcdj\]# I]^haZVkZhjhl^i]i]ZaVhiYViVWVhZeVgVbZiZgegdeZgin¸AlternateLocation#>[lZ VagZVYn]VkZStandbyArchiveLocationVhVYZ[VjaiYViVWVhZ"l^YZadXVi^dc[dgi]Z^cXdb^c\ eg^bVgngZYd!l]n^hVc^chiVcXZ"aZkZaegdeZginjhZYidgZY^gZXii]VigZYdhdbZl]ZgZZahZ4I]Z cVbZd[i]ZegdeZgin!Alternate!h]djaY\^kZVlVn^ihejgedhZ#I]^h^hcdiidWZXdc[jhZYl^i] i]ZDgVXaZ.i7gd`ZgegdeZginAlternate!l]^X]gZaViZYdcanidi]ZViig^WjiZd[i]ZhVbZcVbZ^c i]ZLOG_ARCHIVE_DEST_neVgVbZiZg#I]ZAlternateegdeZginlVhYZegZXViZYhiVgi^c\l^i] DgVXaZ9ViVWVhZ&%gGZaZVhZI]ZAlternateLocationegdeZgin¼hejgedhZ^hidegdk^YZ VhZXdcYadXVi^dc[dg9ViV<jVgYideaVXZi]Z^cXdb^c\gZYd^[i]ZadXVi^dcheZX^[^ZYWn StandbyArchiveLocationWZXdbZhjcVkV^aVWaZ[dghdbZgZVhdc# 7nYZ[Vjai!i]ZAlternateLocationegdeZgin^hWaVc`!l]^X]bZVchi]Vi^[gZYd^hVgg^k^c\Vi i]^h^chiVcXZ^cidi]ZhiVcYWngZYdad\[^aZhVcYi]ZVgX]^kZY^gZXidgnWZXdbZhjcVkV^aVWaZ!i]Z hiVcYWngZYdad\[^aZhl^aaVaa[^aajeh^cXZi]ZnXVccdiWZVgX]^kZYidY^h`VcYgZYdl^aacd adc\ZgWZh]^eeZYidi]^hhiVcYWn# Hdi]ZVchlZglVhidVgX]^kZi]ZgZYd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daYZgkZgh^dch!ndjh]djaYgZVYi]Z7gd`ZgbVcjVa[dg i]VigZaZVhZidbV`ZhjgZndjVgZjh^c\i]ZXdggZXihnciVm#I]ZjcYZgan^c\[jcXi^dc]VhegZiin bjX]gZbV^cZYi]ZhVbZ#L]ZcndjlVciidijgci]ZVeeanhZgk^XZhd[[!ndj_jhijhZi]ZXdggZXi hiViZXdbbVcY# I]ZhiViZbdYZad[VYViVWVhZ^ci]Z7gd`ZgXVcWZgZ\VgYZYVhVYViVWVhZ"aZkZaegdeZgin h^cXZi]ZhiViZ^hhZijh^c\i]ZEDIT DATABASEXdbbVcYa^`ZVegdeZginjeYViZ#I]ZY^[[ZgZcXZ [gdbi]Z\ZcZgVaYViVegdeZgi^Zh^hi]ViheZX^[^XhiViZhVgZjhZY[dgVeg^bVgnYViVWVhZVcYdi]Zg hiViZhVgZjhZY[dgVhiVcYWnYViVWVhZ# I]Zeg^bVgnYViVWVhZhiViZhXdch^hid[ijgc^c\dcdgd[[i]ZGZYdIgVchedgiHZgk^XZh[dgVaa hiVcYWnYViVWVhZh^cndjgXdc[^\jgVi^dc#I]^hhiViZXVcWZbdY^[^ZYdcanjh^c\i]ZcVbZd[i]Z YViVWVhZi]Vi^hXjggZcianVXi^c\^ci]Zeg^bVgngdaZ!l]^X]^cdjgXVhZ^hhi^aaBVig^m!hdVc ViiZbeiidX]Vc\Zi]^hhiViZdcdjghiVcYWnBVig^mT9G%ldjaY[V^a/ DGMGRL> EDIT DATABASE MATRIX_DR0 SET STATE=TRANSPORT-OFF; Error: ORA-16516: current state is invalid for the attempted operation Failed. DGMGRL> EDIT DATABASE MATRIX SET STATE=TRANSPORT-OFF; Succeeded. DGMGRL>
L]VindjhZZ^ci]ZVaZgiad\d[BVig^mVhVgZhjaid[i]ZhjXXZhh[jaX]Vc\ZldjaYWZVRESET d[ZkZgnVXi^kZhiVcYWnYViVWVhZ/ ALTER SYSTEM SET log_archive_dest_state_2='RESET' SCOPE=BOTH;
Ijgc^c\i]ZigVchedgiWVX`dc^hi]ZhVbZXdbbVcYjh^c\TRANSPORT-ON#GZbZbWZgi]Vi i]^hh]jihYdlcGZYdIgVchedgiidVaahiVcYWnYViVWVhZh#NdjldjaYjhZi]^hXdbbVcYdcan^[ndj cZZYZYid^hdaViZi]Zeg^bVgnYViVWVhZ[dghdbZgZVhdcVcYZciZg^cidVXdbeaZiZanjcegdiZXiZY hiViZ#>[ndjVgZadd`^c\_jhiidhideGZYdIgVchedgiiddcZhiVcYWnYViVWVhZ!ndjldjaYZY^ii]Z LogShippingegdeZgind[i]ViYViVWVhZ!VhY^hXjhhZYZVga^Zg#I]^hldjaYeZg[dgbi]ZgZhZidcan dci]ZGZYdIgVchedgi[dgi]VihiVcYWnYViVWVhZVcYaZVkZi]Zdi]ZghiVcYWnYViVWVhZhfj^iZ ]Vee^angZXZ^k^c\i]ZgZYd# IldhiViZh[dgVhiVcYWnYViVWVhZVgZjhZYidijgci]ZVeeanhZgk^XZhdcdgd[[#I]ZYZ[Vjai[dg Ve]nh^XVadgVad\^XVahiVcYWnYViVWVhZ^hdcl]Zci]ZYViVWVhZdgXdc[^\jgVi^dc^h[^ghiZcVWaZY# I]ZVeeanhiViZ^hbdY^[^ZY_jhiVhi]ZigVchedgihiViZWjiXVcWZZmZXjiZYdcandcVhiVcYWn YViVWVhZ# DGMGRL> EDIT DATABASE MATRIX SET STATE=APPLY-OFF; Error: ORA-16516: current state is invalid for the attempted operation Failed. DGMGRL> EDIT DATABASE MATRIX_DR0 SET STATE=APPLY-OFF; Succeeded. DGMGRL>
212
DgVXaZ9ViV<jVgY&&g=VcYWdd`
I]^hi^bZndjldjaYhZZcdi]^c\X]Vc\Z^ci]Zeg^bVgnYViVWVhZVaZgiad\!Wjii]Z[daadl^c\ dghdbZi]^c\a^`Z^ildjaYVeeZVg^ci]ZiVg\ZihiVcYWn¼hVaZgiad\/ ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL Mon Dec 01 23:32:28 2008 MRP0: Background Media Recovery cancelled with status 16037 ORA-16037: user requested cancel of managed recovery operation Managed Standby Recovery not using Real Time Apply Shutting down recovery slaves due to error 16037 Recovery interrupted
6\V^c!a^`Zi]ZigVchedgihiViZ!ndjldjaYjhZAPPLY-ONidgZhiVgii]ZVeeanhZgk^XZh# DcZhiViZY^hVeeZVgZYWZilZZc.i$&%gVcY&&g,VcYi]VilVhi]Ze]nh^XVahiVcYWnREAD-ONLY hiViZ#I]Z7gd`ZgX]Vc\ZYi]ZlVn^i^ciZgVXiZYl^i]i]ZjhZg¼hbZi]dYd[hiVgi^c\jeVYViVWVhZVcY cdlgZheZXihVSTARTUP MOUNTdgVSTARTUP!aZVk^c\i]ZYViVWVhZ^ci]ZZcYhiViZ!MOUNTED! OPEN READ ONLY!dgOPEN READ WRITE#HiVgi^c\l^i]DgVXaZ9ViVWVhZ&%gGZaZVhZ'! eZg[dgb^c\VSTARTUPdcVe]nh^XVahiVcYWnl^aaVjidbVi^XVaandeZci]ZhiVcYWn^cgZVY"dcan# L^i]i]ZcZlVW^a^inidgZVYVe]nh^XVahiVcYWnl]^aZi]ZVeean^hgjcc^c\!i]ZcZZY[dgV READ-ONLYhiViZlVhcdadc\ZgXdch^YZgZYcZXZhhVgn#I]^h^hXVaaZYreal-time query!VcY^i WZXVbZVeVgid[i]Z6Xi^kZ9ViV<jVgYdei^dcl^i]i]ZgZaZVhZd[DgVXaZ9ViVWVhZ&&g#H^cXZi]Z 7gd`Zgcdadc\Zg]VhVgZVY"dcanhiViZ!^i^hcZXZhhVgnidjhZ9 EDIT DATABASE MATRIX_DR0 SET STATE=APPLY-OFF; Succeeded. SQL> ALTER DATABASE OPEN READ ONLY; Database opened; DGMGRL> EDIT DATABASE MATRIX_DR0 SET STATE=APPLY-ON; Succeeded. DGMGRL>
LZVgZXdc[^YZcii]ViV[jijgZgZaZVhZd[i]Z9ViV<jVgY7gd`Zgl^aabV`Zi]^hegdXZhhbjX] bdgZhigZVba^cZYVcYWjaaZiegdd[#
Changing the Protection Mode 6egdiZXi^dcbdYZegdeZgin^hh^b^aVgidVXdc[^\jgVi^dc"aZkZaegdeZgin^ci]VindjZmZXjiZ^ijh^c\ i]ZEDIT CONFIGURATIONXdbbVcYVcY^iVeea^Zhidi]ZZci^gZXdc[^\jgVi^dc# 6hndjhVl^c8]VeiZg&l]Zci]ZegdiZXi^dcbdYZhlZgZY^hXjhhZY!ZVX]bdYZVeea^Zh XZgiV^cgjaZhidi]Z9ViV<jVgYXdc[^\jgVi^dc/eZg[dgbVcXZ!VkV^aVW^a^in!dgegdiZXi^dc#I]Z7gd`Zg egdk^YZhi]ZhVbZbZX]Vc^hbidZcVWaZVXZgiV^caZkZad[egdiZXi^dc!Wji^iVahd]ZaehegdiZXindj [gdbndjghZa[#;dgZmVbeaZ!idX]Vc\Zi]ZegdiZXi^dcbdYZd[V9ViV<jVgYXdc[^\jgVi^dcjh^c\ HFAEajhl]Zc^i^hcdiXdcigdaaZYWni]Z7gd`Zg!ndjldjaYXdccZXiidi]Zeg^bVgnYViVWVhZ VcYZmZXjiZi]ZVeegdeg^ViZHFAXdbbVcY/ ALTER DATABASE SET STANDBY TO MAXIMIZE PERFORMANCE; ALTER DATABASE SET STANDBY TO MAXIMIZE AVAILABILITY; ALTER DATABASE SET STANDBY TO MAXIMIZE PROTECTION;
H^cXZi]ZhZXdcYVcYi]^gYbdYZhgZfj^gZXZgiV^chiVcYWnhZii^c\h!^[ndj]VYcdiiV`Zci]Z gZfj^gZYhiZehidXdc[^\jgZndjghiVcYWnYViVWVhZXdggZXian!ndjb^\]i[^cYndjghZa[^cVcjcegdiZXiZY dgh]jiYdlchiViZ#
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
213
H^cXZDgVXaZ9ViVWVhZ&%\GZaZVhZ'!^i^hedhh^WaZidhZii]ZBVm^bjb6kV^aVW^a^inbdYZ l^i]djiVcnSYNChiVcYWnYViVWVhZh!VcYndjgXdc[^\jgVi^dcldjaYgjc^cVcjchncX]gdc^oZY hiViZ#;V^a^c\dkZgidVhiVcYWnldjaYgZhjai^cYViVadhhh^cXZBVm^bjb6kV^aVW^a^ingZfj^gZhVi aZVhidcZSYNChiVcYWnYViVWVhZidVaadlVoZgd"YViV"adhh[V^adkZg# H^cXZBVm^bjbEgdiZXi^dcbdYZXVcWZhZidcan^ci]ZMOUNThiViZ!ndjgeg^bVgnYViVWVhZ ldjaYcdiWZVaadlZYiddeZcl^i]djiVcnSYNChiVcYWnYZhi^cVi^dch#I]Z7gd`Zgl^aacdi VaadlVegdiZXi^dcbdYZidWZhZijcaZhhVaai]ZegZgZfj^h^iZhd[i]ZegdiZXi^dcbdYZ]VkZ WZZcbZi/ DGMGRL> SHOW CONFIGURATION; Configuration Name: matrix Enabled: YES Protection Mode: MaxPerformance Databases: matrix - Primary database matrix_dr0 - Physical standby database Fast-Start Failover: DISABLED Current status for "matrix": SUCCESS DGMGRL> SHOW DATABASE matrix_dr0 LogXptMode; LogXptMode = 'ASYNC' DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MaxAvailability; Error: ORA-16627: operation disallowed since no standby databases would remain to support the protection mode Failed. DGMGRL> EDIT DATABASE matrix_dr0 SET PROPERTY LogXptMode='SYNC'; Property "logxptmode" updated DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MaxAvailability; Succeeded. DGMGRL> SHOW CONFIGURATION; Configuration Name: matrix Enabled: YES Protection Mode: MaxAvailability Databases: matrix - Primary database matrix_dr0 - Physical standby database Fast-Start Failover: DISABLED Current status for "matrix": SUCCESS DGMGRL>
6hndjXVchZZ!i]Z[^ghiViiZbeiidX]Vc\Zi]ZegdiZXi^dcbdYZidBVm^bjb6kV^aVW^a^inbZi l^i]i]ZDG6"&++',Zggdg#I]Zh^beaZ[^mlVhidhZii]ZLogXptModeegdeZgin[dgBVig^mT9G%id SYNCVcYgZ"ZmZXjiZi]ZXdbbVcY#Ndjg9ViV<jVgYXdc[^\jgVi^dc^hcdlgjcc^c\^c BVm^bjb6kV^aVW^a^in!dgoZgd"YViV"adhh!bdYZ#9dcdi[dg\ZiidjeYViZi]ZAd\MeiBdYZ egdeZgin[dgBVig^mVhlZaa^cegZeVgVi^dc[dgVhl^iX]dkZg#
214
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Monitoring Data Guard Using the Broker LZ]VkZVagZVYn^cigdYjXZYi]ZSHOWXdbbVcY^c9 SHOW CONFIGURATION; Configuration Name: matrix Enabled: YES Protection Mode: MaxAvailability Databases: matrix - Primary database matrix_dr0 - Physical standby database Fast-Start Failover: DISABLED Current status for "matrix": Warning: ORA-16608: one or more databases have warnings DGMGRL>
Jc[dgijcViZan!i]ZZggdgbZhhV\ZYdZhcdiiZaandjl]^X]YViVWVhZ]Vhi]ZegdWaZb#HdlZ]VkZ idjhZi]ZSHOW DATABASEXdbbVcYid\ZibdgZ^c[dgbVi^dc/ DGMGRL> SHOW DATABASE Matrix_DR0; Database Name: matrix_dr0 Role: PHYSICAL STANDBY Enabled: YES Intended State: APPLY-ON Instance(s): Matrix_DR0 Current status for "matrix_dr0": SUCCESS DGMGRL>
>i¼hcdii]ZhiVcYWnYViVWVhZ#HdaZi¼hadd`Vii]Zeg^bVgnYViVWVhZ/ DGMGRL> SHOW DATABASE Matrix; Database Name: matrix Role: PRIMARY Enabled: YES Intended State: TRANSPORT-ON Instance(s): Matrix Current status for "matrix": Warning: ORA-16792: configurable property value is inconsistent with database setting DGMGRL>
8]VeiZg*/ >beaZbZci^c\DgVXaZ9ViV<jVgY7gd`Zg
215
I]^hhi^aaYdZhcdiiZaajhl]ViegdeZgindgeVgVbZiZg^hdjid[hncXWZilZZci]Z7gd`ZgVcYi]Z VXijVaYViVWVhZhZii^c\!dgl]ZgZ^i^h^cXdggZXi#7jilZXVcdWiV^cVcdi]ZgaZkZad[^c[dgbVi^dc [gdbi]Z7gd`Zgk^VdcZd[i]ZgZVY"dcanegdeZgi^Zh#I]ZhZegdeZgi^ZhVgZY^heaVnZYl]ZclZjhZ i]ZSHOW DATABASE VERBOSEXdbbVcYVcYXVcWZY^k^YZY^cidi]gZZbV^cVgZVh/YViVWVhZVcY igVchedgi!ad\^XVahiVcYWn!VcY\ZcZgVagZedgih#GZbZbWZgi]Vi!Vhl^i]i]ZjeYViZVWaZYViVWVhZ egdeZgi^Zh!i]ZgZVY"dcanad\^XVahiVcYWnegdeZgi^Zhl^aaVeeZVgdcan^[i]ZYViVWVhZ^hVXijVaanV ad\^XVahiVcYWndg^hi]Zeg^bVgnYViVWVhZ# ;daadl^c\VgZi]ZgZVY"dcanegdeZgi^Zh[dgYViVWVhZVcYigVchedgi/ N
I co
N
I co
N
Lo Xp S a
Lo Xp rop r
rop >cXdch^hiZciGZYdIgVchedgiegdeZgi^Zh
>cXdch^hiZciYViVWVhZegdeZgi^Zh
GZYdIgVchedgihiVijh
6cY]ZgZVgZi]Zad\^XVahiVcYWnegdeZgi^Zh/ N
L
N
L
N
L
S
pTa
N
L
S
pT
Fa
T
aram
I
o Ad\^XVahiVcYWn[V^aZYigVchVXi^dc^c[dgbVi^dc
r Ad\^XVahiVcYWneVgVbZiZgh
Ad\^XVahiVcYWnh`^eiVWaZ Ta
HFA6eeanh`^eigVchVXi^dciVWaZ
6cY]ZgZVgZi]Z\ZcZgVagZedgihegdeZgi^Zh/ N
R c
E
r
GZXZ^kZfjZjZZcig^Zh
N
S
E
r
HZcYfjZjZZcig^Zh
N
S a
R por A^hid[ZggdghdglVgc^c\h
N
La
Lo IV^ad[i]Z9G8ad\[^aZ
N
Top a
E
;^kZidelV^iZkZcih
NdjXVchZZi]ZhVbZZggdgbZhhV\Z^ci]ZStatusReportegdeZgin/ DGMGRL> SHOW DATABASE Matrix StatusReport; STATUS REPORT INSTANCE_NAME SEVERITY ERROR_TEXT Matrix WARNING ORA-16714: the value of property LogArchiveMaxProcesses is inconsistent with the database setting
Jh^c\i]ZZggdgbZhhV\ZlZ\di[gdbdjgeg^bVgnYViVWVhZ»BVig^m¼lZXVcadd`Vii]Z InconsistentPropertiesegdeZginiddWiV^cbdgZ^c[dgbVi^dcdci]ZZggVcieVgVbZiZg/ DGMGRL> SHOW DATABASE Matrix InconsistentProperties ; INCONSISTENT PROPERTIES INSTANCE_NAME PROPERTY_NAME MEMORY_VALUE SPFILE_VALUE Matrix LogArchiveMaxProcesses 4 6 DGMGRL>
BROKER_VALUE 4
216
DgVXaZ9ViV<jVgY&&g=VcYWdd`
I]^hh]dlhi]VihdbZdcZ]VhjhZYHFAEajhidX]Vc\ZVeVgVbZiZgi]Vii]Z7gd`ZgXdch^YZghdcZ d[^ihdlc#I]^heZghdcVahdig^ZYidWZhcZV`nVcYejii]ZX]Vc\Zdcan^ci]ZHE;>A:i]^c`^c\ i]ViVii]ZcZmigZhiVgid[i]Zeg^bVgnYViVWVhZ!h^m6G8=egdXZhhZhldjaYWZhiVgiZYVcYcddcZ ldjaYWZi]Zl^hZg#LZaa!i]ZXjaeg^ildjaYWZ^c[dgVhjgeg^hZ!h^cXZi]Z7gd`ZgldjaYgZijgci]Z eVgVbZiZgid[djgegdXZhhZh!WZXVjhZi]Vi^h^ihk^Zld[i]ZldgaY#I]ZegdeZglVnldjaY]VkZ WZZcidjhZi]Z9A:!dglZXVcgZijgcidHFAEajhVcY[^mi]Z eVgVbZiZg^ci]ZHE;>A:# DGMGRL> EDIT DATABASE Matrix SET PROPERTY LogArchiveMaxProcesses=6; Property "logarchivemaxprocesses" updated DGMGRL> SHOW DATABASE Matrix StatusReport; STATUS REPORT INSTANCE_NAME SEVERITY ERROR_TEXT
H^cXZlZ]VkZgZhdakZYi]ZegdeZginl^i]i]ZeVgVbZiZghZii^c\!i]ZhiVijhgZedgih]dlhcd egdWaZbh#I]ZgZhid[i]ZgZVY"dcanegdeZgi^Zhldg`egZiinbjX]i]ZhVbZ/ DGMGRL> SHOW DATABASE Matrix LogXptStatus; LOG TRANSPORT STATUS PRIMARY_INSTANCE_NAME STANDBY_DATABASE_NAME Matrix matrix_dr0
STATUS
I]ZdcZgZVY"dcanegdeZgini]V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cZYcdi dcan]dlidXdc[^\jgZVcYijcZndjg9ViV<jVgYZck^gdcbZci!ndj]VkZaZVgcZYi]ZkVg^djhlVnh ndjXVc^ciZgVXil^i]ndjgXdc[^\jgVi^dc#Jh^c\i]Z7gd`ZgVhndjg^ciZg[VXZid9ViV<jVgYl^aa h^bea^[nndjg_dWVcY^i^hVahdi]Z[djcYVi^dc[dgbVcV\^c\9ViV<jVgYl^i]
CHAPTER
6 Oracle Enterprise Manager Grid Control Integration 219
220
Oracle Data Guard 11\ Handbook
O
racle Enterprise Manager (OEM) Grid Control plays an integral part in an Oracle ecosystem. Advocates of management tools promote OEM Grid Control as a centralized monitoring and maintenance console for the enterprise. With additional plug-ins, OEM Grid Control is intended to become i]Z enterprise console and may even replace the network operations console, such as HP OpenView and IBM Tivoli.
You may be surprised to hear that OEM Grid Control can be leveraged to exploit the majority of Data Guard features. Whether you are interested in being alerted for a specific performance metrics or for changing the protection mode, OEM Grid Control can be a powerful ally for the DBA. OEM Grid Control provides an easy to use and friendly user interface for new and seasoned DBAs for performing many of the tasks associated with maintaining a Data Guard environment. With OEM Grid Control, the DBA can perform even what is perceived to be complex tasks, such as switchovers, failovers to a remote site, or reinstating a failed primary database. This chapter focuses on OEM Grid Control functionality relative to Data Guard. We will take advantage of all the major innovative features offered by OEM Grid Control to manage your Data Guard environment. In Chapter 2, you learned how to set up a physical standby database using OEM Grid Control. This chapter will continue where that chapter left off and maneuver around various screens within OEM Grid Control to help you effectively manage a disaster recovery and/or reporting database. We start by looking at verifying your existing configuration and then dive into reviewing performance metrics, modifying metrics, and viewing database alert log details. The rest of chapter will focus on the following: N
Enabling flashback logging
N
Reviewing performance
N
Changing protection modes
N
Editing the standby database properties
N
Performing a switchover
N
Performing a manual failover
N
Enabling Fast-Start Failover
N
Creating a logical standby
N
Managing an active standby
N
Managing a snapshot standby
Accessing the Data Guard Features The Data Guard home page is a portal entry point for managing and viewing the Data Guard protection mode, enabling and/or disabling Fast Connection Failover, viewing the summary of apply/transport lag, editing standby database properties, viewing Data Guard status, and viewing current redo log activity. You can also observe the primary and standby databases received and applied log sequence numbers. More important, the home page provides the estimated failover time to serve as a quick dashboard indicating your compliance to your corporate recovery point objective/recovery time objective (RPO/RTO).
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
221
NOTE 9dcdiWZXdc[jhZYWni]ZiZgbhDatabase ControlVcYOEMGrid Control.9ViVWVhZ8dcigda^hYViVWVhZ"heZX^[^XVcYgjchadXVaandci]Z YViVWVhZhZgkZg#:VX]YViVWVhZ]djhZhVhXVaZY"YdlckZgh^dcd[i]Z HNHB6CgZedh^idgn#9ViVWVhZ8dcigda^hVahdkZgh^dc"heZX^[^Xidi]Z YViVWVhZ!h^cXZ^igZh^YZhadXVaandci]ZYViVWVhZhZgkZgl]ZgZVhD:B chiVaa^c\D:B
Configuring Data Guard Broker with OEM Grid Control If you are not taking advantage of the GUI of OEM Grid Control with your current Data Guard configuration, you have neither unleashed the effectiveness nor realized how easy Data Guard configuration can be. With each release of OEM Grid Control, Oracle packs in more and more Data Guard support and functionality. As you saw in Chapter 2, you can create your standby database using the OEM Data Guard Wizard. But you can start managing your existing Data Guard environment simply by enabling the Data Guard Broker. Here’s how to take advantage of OEM Grid Control in your fully functional Data Guard environment: 1. Navigate to the Add Standby Database screen, shown in the following illustration, by clicking the 6YYHiVcYWn9ViVWVhZlink that OEM Grid Control displays when there is no Broker configuration.
222
Oracle Data Guard 11\ Handbook
2. On the Add Standby Database screen, select the BVcV\Z6c:m^hi^c\HiVcYWn9ViVWVhZ L^i]9ViV<jVgY7gd`Zg radio button. Note that prior to enabling the Data Guard Broker with OEM Grid Control, the primary database must be started using the SPFILE. 3. Click the Next button to open the Add Standby Database: Select :m^hi^c\HiVcYWn 9ViVWVhZ screen, where you can choose an existing standby database. You can select the standby database that currently provides disaster recovery or reporting services for your primary database, as shown here.
4. Select your standby database and click the Next button. 5. If login credentials have not yet been established, you are prompted to provide SYSDBA login credentials to connect to the physical standby database. Once you have provided SYSDBA login credentials, you can optionally modify the archive location at the standby host, as shown here.
6. If you are not using the flash recovery area, you can optionally modify the local archiving parameter. But if the primary database uses the flash recovery area, the standby archive location will contain USE_DB_RECOVERY_FILE_DEST and will be grayed out to use the same settings.
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
223
7. At the bottom of the page you will now be able to modify how the Broker connects to the primary and standby databases by changing the Enterprise Manager Connect Identifier fields for both databases back to the TNSNAMEs you originally used, as shown here.
8. Click the Next button and review the proposed changes:
9. If you are satisfied with the configuration, click the Finish button, and OEM Grid Control will start enabling the Data Guard Broker, as shown in the following illustration. At this point, you will not be able to cancel this operation after it starts.
You will be redirected to the Data Guard home page once the physical standby is configured for Broker control.
224
Oracle Data Guard 11\ Handbook
Verifying Configuration and Adding Standby Redo Logs We’re assuming that you have already created your standby database as you read Chapter 2 or have an existing standby environment that was just imported into Grid Control in the preceding section. If you haven’t created an environment, create a standby database now, as instructed in Chapter 2, and configure the Data Guard environment to be managed by OEM Grid Control. When you have a standby database managed by Grid Control, you can perform a health check of your Data Guard environment. To perform a health check of your Data Guard environment, click the Verify Configuration link in the Additional Information section of the Data Guard home page. You can click the Verify Configuration link at any time for both the primary and standby databases. Clicking this link will initiate the verification steps displayed in Figure 6-1. Notice that the verification operation validates database settings such as the protection mode, redo log configuration, standby redo log files, redo log switches, and Data Guard status, and it performs a basic health check. You can cancel the verification process at any time, but you should let the process complete and review the Results page to assess your current environment. Figure 6-2 shows the top portion
FIGURE 6-1.
EgdXZhh^c\9ViV<jVgYkZg^[^XVi^dc
FIGURE 6-2.
9ViV<jVgY]VhXdbeaZiZYkZg^[^XVi^dc#
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
225
of the Results output, indicating that the verification process completed successfully and that standby redo logs are recommended at the primary database. Following is the detailed output of the verification results: Initiali ing Connected to instance Matrix Starting alert log monitor... Updating Data Guard link on database homepage... Data Protection Settings: Protection mode : Maximum Performance Redo Transport Mode settings: Matrix: ASYNC Matrix_DR0: ASYNC Checking standby redo log files.....Done (Standby redo log files needed : 4) Checking Data Guard status Matrix : ORA-16789: standby redo logs not configured Matrix_DR0 : Normal Checking Inconsistent Properties Checking agent status Matrix ... OK Matrix_DR0 ... OK Switching log file 14.Done Checking applied log on Matrix_DR0...OK Processing completed.
Standby redo logs are essential for receiving incoming redo instead of archive logs. In addition to checking for availability of standby redo logs, the verification process also checks agent status. At the bottom portion of the results page, shown in Figure 6-3, you are informed that the standby redo logs are missing and need to be created at the standby database server. If you are executing the verification process on the physical standby database and have already created standby redo logs on the standby database, the verification process will switch redo logs on the primary database and confirm that the log was applied on the physical standby.
FIGURE 6-3.
HiVcYWngZYdad\[^aZgZXdbbZcYVi^dch
226
Oracle Data Guard 11\ Handbook Clicking the OK button will create the standby redo logs as Oracle Managed Files and return you to the Data Guard home page. You will also be prompted to create standby redo logs in other screens within OEM Grid Control, such as while enabling Fast-Start Failover or changing protection modes.
Viewing Metrics OEM Grid Control uses the term bZig^Xh to refer to the assessment of the health of your system. Metrics are units of measurement with associated i]gZh]daYh. When a threshold for a metric is reached, an alert is generated. Targets in OEM Grid Control come with a predefined set of metrics, and alerts are generated when a threshold is reached. A threshold is cleared when a monitored service changes such as database up/down conditions and when a specific condition occurs, such as an ORA-message in the alert log file. From the Related Links section of the Data Guard home page, you can click the All Metrics link to view all the OEM Grid Control metrics (including Data Guard metrics). From the All Metrics screen, you can expand the metrics summary specific to Data Guard, such as Fast-Start Failover, Fast-Start Failover Observer, performance, and status. The metrics that you will see depend on the current role of the database through which you have connected. For example, Figure 6-4 displays a small subset of the Metrics screen for our physical standby, Matrix_DR0. Here we see the Data Guard metrics for the apply and transport lags, the apply rate, and failover estimate. However, if we connect to our primary database, Matrix, and look at All Metrics, we’ll see a slightly different set of Data Guard metrics, as shown in Figure 6-5. Notice that the Failover Occurred and Observer Status threshold values are the same as those shown for the standby database, but here you also see the Data Guard Status and the primary database Redo Generation Rate metrics. You can click any of the metrics that have thresholds set. For instance, click the Data Guard Status metrics, and you can observe that both the primary and physical standby databases are online and operational, as shown in Figure 6-6.
FIGURE 6-4.
9ViV<jVgYhiVcYWnYViVWVhZbZig^Xh
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
FIGURE 6-5.
9ViV<jVgYeg^bVgnYViVWVhZbZig^Xh
FIGURE 6-6.
6aaBZig^Xh/9ViV<jVgYHiVijh
227
Modifying Metrics If you haven’t done so already, you need to set up the notification methods to receive e-mails or pages from OEM Grid Control for alerts and metric threshold notifications. To access the Notification Methods page, click the HZije link located at the upper-right corner of the page above the tabs. You will see a page with two panes. In the left pane, click the Notification Methods link to open the Notification Methods page, where you can specify the SMTP server, username, password, and sender’s e-mail address. You can also stipulate that repeat alert notifications be sent for the same metric or availability alert. Metrics can be modified by clicking the Metrics and Policy Settings link in the middle column of the Related Links section on the Database home page. However, you have to use the link from the Database home page where the database’s current role matches that of the metric. For example, one particular metric of interest in a Data Guard environment is the apply lag metric, which is measured in seconds; you will be able to set this metric only from the Standby Database home page. In the Metrics and Policy Settings page of our standby Matrix_DR0, the apply lag metric is not visible by default since the apply lag is not configured by default. To change the apply lag, simply select the All Metrics option from the View drop-down list. The screen will refresh, and all the modifiable metrics will be displayed, as shown in Figure 6-7. Set the appropriate values in the Warning Threshold and Critical Threshold columns. Optionally, you can also change the collection schedule. You can continue to make changes to other metrics and then click OK to commit the changes. You will see a confirmation page indicating the successful update.
228
Oracle Data Guard 11\ Handbook
FIGURE 6-7.
BZig^XhVcYEda^XnHZii^c\h[dgVaabZig^Xh
Other critical metrics that you may want to modify relative to your Data Guard configuration include the following: N
Redo generation rate (KB/second) on the primary database
N
Estimated failover time (seconds) on the standby database
N
Redo apply rate (KB/second) on the standby database
N
Transport lag (seconds) on the standby database
N
Archive area used (%) on both the primary and standby databases
N
Archive hung alert log error on both the primary and standby databases
N
Archive hung alert log error status on both the primary and standby databases
Viewing the Alert Log File You can view the database alert log file for both the primary and standby databases through Grid Control. You can gain access to the database alert log file in several ways, but the most sensible route is clicking the Edit link in the Properties field to open the Edit Primary Database Properties page. Or you can click the Status link in either the primary or the standby database. Within the Edit Primary/Standby Database Properties page in the Diagnostics section, you can click the link associated with your database, as shown in Figure 6-8.
FIGURE 6-8.
:Y^ii]Zeg^bVgnYViVWVhZegdeZgi^Zh
Chapter 6:
FIGURE 6-9.
Oracle Enterprise Manager Grid Control Integration
229
6aZgiad\hZVgX]gVc\Z
In this example, we will examine the alert log entries for the Matrix database. The alert log search screen will extract the last 100K characters of the database alert log file. You can define a custom search by entering begin and end dates and time criteria at the top of the page in the Search Criteria area, as shown in Figure 6-9. You are strongly encouraged to hit the Refresh button since the alert log file is constantly updated. Reviewing the database alert log provides your initial entry point to diagnosing Data Guard–related problems. By viewing the alert log file entries using a web browser, you no longer need physical OS access to the database servers to examine the alert log files. Figure 6-10 shows the bottom of the page, where you can peruse redo log alert entries.
FIGURE 6-10.
GZk^ZlVaZgiad\Zcig^Zh
230
Oracle Data Guard 11\ Handbook
Enabling Flashback Database The Flashback Database feature introduced in Oracle Database 10\ Release 1 provided expedient recovery from logical database corruptions and user errors. With Flashback Database logging, you can flashback a database to the point in time prior to the user error or when the logical corruption occurred. More importantly, the Flashback Database logging capabilities eliminate the need to perform a restore and point-in-time recovery. Oracle flashback logging will enable you to bypass datafile restores. Another great benefit of Flashback Database logging is that you do not have to delay application of redo data on the standby database server. This allows for the standby database to be closely synchronized with the primary database. Most important, enabling Flashback Database logging may eliminate the need to rebuild the primary database after a failover. After a failover to the standby database server, the primary database can be flashed back to a point-in-time prior to the failover event (unless media recovery is required) and converted to a standby database to be synchronized with the new primary database server. If you did not set up the flash recovery area with Database Configuration Assistant (DBCA) while creating your primary database, you can set it up now with OEM Grid Control. Flashback Database logging is required to support Fast-Start Failover, covered in its own section a bit later in the chapter. To setup the flash recovery area, you must navigate to the Recover Setting page on the Availability tab of the Database home page. The Flash Recovery settings are located in the bottom half of the screen and will look similar to that shown in Figure 6-11. Click the Apply button after you have finished your settings. If you want to make changes only to the SPFILE, click the check box at the bottom of Figure 6-11 that specifies that the changes should be applied only to the SPFILE. On the right side of the Recover Setting page is a pie chart depicting the current usage statistics for the flash recovery area, as shown in Figure 6-12.
FIGURE 6-11.
:cVWaZ[aVh]gZXdkZgn
Chapter 6:
FIGURE 6-12.
FIGURE 6-13.
Oracle Enterprise Manager Grid Control Integration
231
;aVh]gZXdkZgnVgZVjhV\Z
8dc[^gbVi^dcidgZhiVgiYViVWVhZ
If this chart shows that your flash recovery area is already reaching capacity, you need to allocate more space before enabling Flashback Database, as the flashback logs will increase considerably depending on your retention period. To enable Flashback Database on your primary, you must restart the database, as depicted in Figure 6-13. Click the Yes button to bounce the database. You will be asked for SYSDBA credentials to shut down and restart the database. If the standby database does not have a flash recovery area enabled, you can repeat these steps on the standby database; however, if the standby database is only mounted and not open read-only, a restart will not be necessary.
Reviewing Performance Reviewing Data Guard performance starts at the Data Guard home page in the Standby Progress Summary chart. The Standby Progress Summary chart reveals the transport and apply lag in seconds, minutes, or even hours depending on the amount of delay. The transport lag is measured as the delta from the primary database last update and the standby last received redo, while apply lag is measured as a delta between the primary last update and last applied redo on the standby site. A transport lag impacts your ability to satisfy your RPO. If you have to failover your database at this moment, redo data that did not arrive at the standby database server will be lost. Figure 6-14 shows a transport lag of approximately 0 and an apply lag of more than 3 minutes. This transport lag means that all redo generated by the primary database is available at the standby database so in a Maximum Availability configuration you would be able to satisfy an RPO of zero data loss.
232
Oracle Data Guard 11\ Handbook
FIGURE 6-14.
HiVcYWnEgd\gZhhHjbbVgnX]Vgi
The apply lag indicates how far behind your standby database server is compared to the primary when it comes to applying redo data. The apply lag is the indicator of your RTO—how long it takes for you to failover to your standby database server. It also tells you whether your apply process can keep up with the redo generation rate from the primary database server. If the delta between the redo generation rate and apply rate became significant, you may be better off performing an incremental backup from the primary and restoring the incremental backup on the standby database server. In our case, the RTO would be impacted by the time it takes to apply those last 3.2 minutes of redo. Additional performance statistics can be captured in the Performance Overview link in the Performance section of the Data Guard home page. The Performance Overview page displays performance-related information in graphical line chart format. The graphical charts in each of the quadrants represent current redo generation rate, transport lag, apply lag, and apply rate. You can simulate a workload by clicking the Start button under Test Application, which is a built-in application that will generate a workload on the primary database. You can use this page to switch log files at the primary database. You can set the collection interval, which causes the charts to be refreshed, by choosing an option from the View Data drop-down list. Figure 6-15 displays the top of a pretty elaborate Performance Overview page that reports redo generation rate, lag times, and apply rate.
FIGURE 6-15.
Eg^bVgnEZg[dgbVcXZDkZgk^ZleV\Z
Chapter 6:
FIGURE 6-16.
Oracle Enterprise Manager Grid Control Integration
233
HiVcYWnEZg[dgbVcXZDkZgk^ZleV\Z
The redo generation rate chart reveals the redo generation rate measured in kilobytes per second (KB/sec) on the primary. Figure 6-16 displays the performance information from the bottom of the page. These metrics are for the standby databases. The transport lag time denotes the potential amount of data loss. In Figure 6-16, you can see that our logical standby, Matrix_DR1, does not have a transport lag but our physical standby database, Matrix_DR0, did have a transport lag that has been resolved. The apply rate obviously provides information about data applied on the standby database environment. Clicking each of the charts will route you to another page that reports historical information for the past 24 hours. Again, you can choose an option from the View Data drop-down list to view the data for the past 24 hours, 7 days, 31 days, or a customized date interval. The redo generation rate is available only through OEM Grid Control. The transport lag and apply lag values are also available from the V$DATAGUARD_STATS view on a standby database. You can also derive performance information by reviewing the log file details from the Data Guard home page. In the Performance section at the bottom of the Data Guard home page, click the Log File Details link to view the following: N
Status of redo that was generated on the primary database but not received on the standby database server
N
Redo that was received but not applied on the standby database server
In our example, Figure 6-17 shows that two archive logs were received on the standby database server but not applied. It also shows six archive logs that have not yet been received by our logical standby due to some error. The error in this case is that the logical standby was only mounted, not open and applying redo. The log files details page also provides information about redo log transport and apply information for diagnostic purposes. Under normal circumstances, you should not see entries on this page. An example of a good situation is shown in Figure 6-18.
234
Oracle Data Guard 11\ Handbook
FIGURE 6-17.
7VYad\[^aZYZiV^ah
FIGURE 6-18.
As you can see, the physical standby, Matrix_DR0, has received everything and is up to date applying the redo. The logical standby, Matrix_DR1, has received all primary redo and is currently catching up in sequence 34, whereas the primary is currently sending redo from sequence 35 (shown at the top of the page). This page may become particularly helpful if for some reason the redo transport services go offline and you need to view which archive logs have not made it to the standby database server.
Changing Protection Modes With just a few clicks in OEM Grid Control, you can easily change the protection mode of the Data Guard configuration. By default, the initial configuration is set up in Maximum Performance mode. You can easily toggle among Maximum Protection, Maximum Availability, and Maximum Performance modes. For detailed information about each of the protection modes, refer to Chapters 1 and 2.
Chapter 6:
FIGURE 6-19.
Oracle Enterprise Manager Grid Control Integration
235
8]Vc\ZEgdiZXi^dcBdYZ/HZaZXiBdYZeV\Z
From the Data Guard home page, click the URL next to the Protection Mode in the Overview section of the page. The protection mode of the Data Guard configuration will be displayed. Click the Protection Mode link to open the Change Protection Mode: Select Mode page, as shown in Figure 6-19. You can select from the available protection modes. In this example, let’s raise the protection mode from Maximum Performance to Maximum Availability. Click the Maximum Availability option and click Continue. If you are prompted for SYSDBA credentials, enter the username and password with SYSDBA privileges and click Login. As shown in Figure 6-20, choose which database will have its protection mode changed. Since we are changing from Maximum Performance to Maximum Availability, we are notified that the redo transport will be changed to SYNC as part of the process. You must be careful when choosing protection modes. If your transport mode is changed to SYNC, transactions must wait for redo generated from the primary database to be written on the standby redo logs before you will be allowed to continue. If you are comfortable with the proposed changes, you can simply click Continue to proceed. If you did not have the standby redo log files defined on all the required databases, you would also be required to choose where they would be created. Since these were already defined, choose the SYNC standby database and click Continue. In the Edit Protection Mode Processing page, confirm the selection. Click Yes and observe the progress screen shown in Figure 6-21. Before clicking the final Yes, make sure you want to do this, because once the process starts, it cannot be cancelled. Once changes are processed, you will be redirected to the Data Guard home page where the new protection mode will be reflected.
FIGURE 6-20.
8]Vc\ZEgdiZXi^dcBdYZ/X]ddhZi]ZigVchedgibdYZ
236
Oracle Data Guard 11\ Handbook
FIGURE 6-21.
EgdXZhh^c\/8]Vc\ZEgdiZXi^dcBdYZhXgZZc
Editing Standby Database Properties From time to time, you will need to turn on or off Redo Apply on a standby database. You can turn on or off the apply services by navigating to the Edit Standby Database Properties screen. To disable archived redo data from being applied, click the Apply Off radio button and click Apply. The screen will refresh and you will receive a success banner at the top of the page. Similarly, you can re-enable Redo Apply services by clicking the Apply On radio button and clicking Apply. If you want to activate Real-Time Query,1 you can also check the Enable Real-time Query box and click Apply. Remember that unless you are running Oracle Database 11\, redo data will not be applied while the database is open in read-only mode. Figure 6-22 shows the General tab’s Standby Database properties that can be modified. In this example, the Data Guard environment was modified to be open for read-only purposes to service ad hoc read-only reports for the customers. In the Standby Role Properties tab in Figure 6-23, you can set attributes such as the transport mode (but you will not be allowed to impact the protection mode), the net timeout (in seconds), the apply delay (in minutes), or the standby archive location. In addition, you can expand the
FIGURE 6-22. 1
:Y^iHiVcYWn9ViVWVhZEgdeZgi^Zh
To activate Real-Time Query, you must be licensed for the Active Data Guard Option.
Chapter 6:
FIGURE 6-23.
Oracle Enterprise Manager Grid Control Integration
237
:Y^iHiVcYWn9ViVWVhZHiVcYWnGdaZEgdeZgi^ZhiVW
Advanced Properties link to set properties such as enabling/disabling log shipping and changing the filename conversion parameters. Bear in mind that changing these last two does require a restart of the standby database. You can delay application of redo data on the standby database to provide additional protection from user error or corruption on the primary database. This can protect you against incidents such as an accidental table drop on the primary database. You can prevent the table drop from hitting the disaster recovery site. Instead of setting the apply delay time, you should consider enabling Flashback Database with sufficient amount of space in the flash recovery area. In the Common Properties tab shown in Figure 6-24, you can specify the connect identifier for the standby database (how the primary should connect to this standby database), the number
FIGURE 6-24.
:Y^iHiVcYWn9ViVWVhZ8dbbdcEgdeZgi^ZhiVW
238
Oracle Data Guard 11\ Handbook of archive processes to be used for the LogArchiveMaxProcesses Broker property, and the level of tracing to be set for the LogArchiveTrace property. These properties are not rolespecific and will take effect immediately after you click Apply.
Performing a Switchover Simply stated, a hl^iX]dkZg is the process in which the primary database and a standby database perform a role reversal without resetting the online redo logs of the primary database. A switchover is typically done within a planned maintenance time window. In a switchover scenario, the primary database becomes the standby database, and the standby database becomes the new primary database. During the switchover process, the primary database role is changed and the database is shut down and restarted. When this process is complete at the primary, it is finished at the standby you chose and the standby is opened without a restart.2 In a switchover, no data loss occurs. With OEM Grid Control, performing a switchover has never been easier. Switchovers are initiated only on the primary database, and database connections can be configured to switch over automatically.3 The switchover process can be initiated by selecting the standby database that you want to become the primary database and clicking Switchover on the Data Guard home page, as shown next.
Behind the scenes, the switchover operation ensures that the primary and standby databases are error free, and then it asks you to confirm the switchover. You may have to provide the OS credentials for the physical database server; then do the following: 1. Click Continue. You should see the Confirmation Switchover page as shown in the next illustration.
2 3
In 10\! the standby would be restarted if it had been opened read-only since it was last started. See Chapter 10 for client failover details.
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
239
2. At the bottom of the page, you can also decide whether you want the Grid Control Monitoring Settings and Jobs transferred to the new primary database, as shown in the next illustration.
3. If the standby database has archive logs that still need to be applied, you will see a warning message indicating that the unapplied log files will be applied before starting the switchover. You can also see the active sessions by clicking the Browse Primary Database Sessions link. Once you are ready to process, click Yes to finalize the initiation process. CAUTION NdjXVccdihidei]Zhl^iX]dkZgegdXZhhdcXZ^ihiVgih# 4. Immediately after you click Yes, you will see the Processing: Switchover screen, where the processing operation will perform the steps to switch roles between the primary and standby databases and the Data Guard Broker will restart the original primary database and complete tasks to switch the database roles, as shown in the illustration.
5. While waiting for the switchover process, click the View Alert Log link to review the progress details in another browser window. After the switchover process is complete,
240
Oracle Data Guard 11\ Handbook you are routed to the Data Guard home page that shows the new primary database, as depicted in the next illustration.
As you can see, Matrix_DR0 is now the primary database and Matrix is the new physical standby. Switchover role transitions are risk-free and require an insignificant amount of outage to the production database server.
Performing a Manual Failover You should consider failing over to your standby database when you experience a complete outage on your primary database. As discussed in Chapters 1 and 2, depending on your protection mode, you may or may not lose data. You should perform a failover only if the primary database is completely down and a switchover is not possible. Even though reinstating a failed primary database using Flashback Database is a relatively simple operation, you should still exercise caution and generally failover only in an emergency. Data loss and failover is discussed in detail in Chapter 8. Similar to switchover, a database failover can be achieved by navigating through several screens: 1. From the Data Guard home page, you’ll see that the current primary database, Matrix_DR0 (remember, we just performed a switchover so Matrix_DR0 was our primary database), is no longer available, as shown here in the illustration. 2. To failover, select the standby database at the bottom of the Data Guard home page; this will be your new primary database. In our example, we will failover to our original primary database, Matrix, as also shown in this illustration.
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
241
3. Click Failover to open the Confirmation page, where you are asked to confirm the failover, as shown in the following illustration.
You are warned on this page to make sure the primary is really down, because a failover here with it still running would leave you with two open primary databases. Here you are also asked to select from the type of failover option, Complete or Immediate. CAUTION 7ZVlVgZi]ViZkZci]dj\]i]ZiZmihVnhi]Vi>bbZY^ViZ^hi]Z[VhiZhi ineZd[[V^adkZg!^i^hVahdi]Z[V^adkZgl^i]i]ZW^\\ZhiYViVadhhVcY h]djaYWZjhZYdcan^[ndj]VkZV\Ve^ci]ZgZYdi]VindjXVccdi gZhdakZ# At the bottom of the page, as shown in the next illustration, you are asked if you want to move the Grid Control monitoring and job setup to the new primary database. These will be transferred by default, but you can customize them at this point.
4. In a complete failover scenario, all available redo data is applied on the standby database. Oracle recommends performing a complete failover, and it happens to be the default failover option. When the complete failover scenario is not an option, you have a gap you cannot resolve, and you can perform an immediate failover instead. In an immediate failover situation, no additional redo data is applied on the standby database, resulting in data loss once you initiate the failover. If you had a zero transport lag and
242
Oracle Data Guard 11\ Handbook zero apply lag, all your data was applied; however, if you had an apply lag for some reason, data that was not applied would result in data loss when the failover operation is initiated. If you have a transport lag or apply lag, data loss is imminent when the failover operation is initiated. Select the appropriate failover option and click Yes. CAUTION NdjXVccdihidei]Z[V^adkZgegdXZhhdcXZ^ihiVgih# 5. A database failover will be initiated and you will not be able to cancel the database failover. You will be routed to the Processing screen, where you will see the status of the failover process, as shown in the following illustration. Similar to the switchover progress screen, you can click the View Alert Log link to drill down to the alert log file and review the details in another browser window. However, remember that this is a failover and the alert log of the original primary (Matrix_DR0 in our case) may not be available.
6. When the failover processing gets to the stage where it is transferring the jobs, the failover is complete. You can manually navigate back to the Data Guard home page using your bookmark or you can just wait, and once the processing is complete, you will be returned to the Data Guard home page. 7. If you were running in Maximum Protection or Maximum Availability mode before the failover, you will notice that you have been downgraded to Maximum Performance mode after the failover. To get your new production database back to its original protection level, you must mount the old primary database and reinstate it as the standby database if possible. Exercise caution and make sure that you do not open the old primary database; otherwise, you will have two primary databases up and running. In the Data Guard home page, you will see the Data Guard Status link stating that the Database Must Be Reinstated, as shown in the next illustration.
8. Click the Data Guard Status link to open the Edit Standby Database Properties page. If you had Flashback Database enabled and have all the required flashback logs, you can reinstate the old primary database. If you have mounted the old primary database, you will have to follow these steps only once. However, if the old primary database is not
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
243
mounted, you will have to execute this procedure twice, because the first time around, Grid Control will mount only the failed primary database. TIP :cVWa^c\;aVh]WVX`9ViVWVhZdcWdi]i]Zeg^bVgnVcYhiVcYWn YViVWVhZh^hhigdc\angZXdbbZcYZY#;aVh]WVX`9ViVWVhZVaadlh[dg i]Z[dgbZgeg^bVgnYViVWVhZidWZgZ^chiViZYV[iZgV[V^adkZgdeZgVi^dc l^i]djiWZ^c\gZhidgZYl^i]hj[[^X^Zci[aVh]WVX`ad\VkV^aVW^a^in# 9. In the Edit Standby Database Properties page, click the Reinstate button near to the Status Role, as shown in the illustration.
10. On the Confirmation page, click Yes to initiate the reinstating of the failed primary database and continue to the Processing page, as shown in the illustration.
11. Once the processing activities complete, the Data Guard home page appears. You may notice an ORA-16778 redo transport error for the Data Guard Status. This error will eventually clear, but if you want to clear it manually, you can click the ORA-16778 error link to open the Edit Properties page. 12. The errors on the Related Status section are expected errors. Click Reset to reset the log services. When you reinstate a failed primary database, it will be brought back into your configuration as the type of standby that matches the standby type you failed over to in the first place. If OEM Grid Control is not able to reinstate the failed primary, you will have to clean up the failed database manually and create a new standby by clicking Add Standby.
Fast-Start Failover Fast-Start Failover allows the Data Guard Broker to failover automatically to a standby database when a failure occurs at the primary database. No manual intervention is required, and Fast-Start Failover effectively increases database availability since it decreases the amount of time for manual failover operations. Like most other Data Guard functionalities, Fast-Start Failover can also be configured and maintained within OEM Grid Control. We will discuss the Fast-Start Failover architecture and how you enable it in Chapter 8.
244
Oracle Data Guard 11\ Handbook
Creating a Logical Standby You learned in Chapter 2 how to create a logical standby database manually, and you learned pretty much everything else about a logical standby in Chapter 4. In this section, we will demonstrate how easy it is to create a logical standby database with OEM Grid Control. 1. To initiate the process to create a logical standby database, click Add Standby Database on the Data Guard home page. (As we mentioned before, for a new database that does not have any standby databases, the Data Guard home page will have just one option to add a standby database.) You will see the Add Standby Database screen, shown in preceding examples in this chapter and in Chapter 2. 2. On the Add Standby Database screen, select Create A New Logical Standby Database, as shown in the following illustration, and then click Continue.
3. The Add Standby Database: Backup Type page is the same page you arrived at when you created your physical standby database, but it now has a lot more information. At the bottom of the screen, look at the SQL Apply Unsupported Tables section. Make sure that your database does not have any unsupported data types.4 In the next illustration, you can see the tables that contain unsupported data or storage types.
4
For a comprehensive list of all the unsupported data types, refer to the Data Concepts and Administration Manual, Appendix C, to determine whether your primary database can sufficiently support a logical standby database: http://download.oracle.com/docs/cd/B28359_01/server.111/b28294/data_support.htm#CHDGFADJ
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
245
4. Instead of viewing only the tables, you may want to view the columns and data types that Oracle detected as not being supported. To view the unsupported columns and data types, click the Show drop-down list and choose Table Columns and Data Types. Then click Go, as shown in the illustration.
5. After you perform a thorough analysis of the unsupported tables and columns, choose to continue to create a logical standby database, click the Backup Type radio button, and click Next to be directed to the Add Standby Database: Backup Options page. The rest of the steps are identical to those for creating a physical standby database, which is thoroughly covered in Chapter 2. Instead of repeating the same figures here, we simply ask that you review Chapter 2. The only other difference between this procedure and the former is that, after the logical standby is created, the role will be listed as Logical Standby in the Standby Databases section, as shown in Figure 6-25.
Skipping Table Entries in Logical Standby Database In the logical standby database world, you can skip certain, or all, types of SQL operations against a specific table or schema from being applied by SQL Apply. You can also specify additional processing on the logical standby database by using stored procedures. In earlier releases of Oracle Database, you pretty much had to stop SQL Apply before making any changes to these skip rules. In Oracle Database 11\! most changes no longer require that you stop SQL Apply. Grid Control will take care of stopping the apply if necessary so you don’t have to worry about it.
FIGURE 6-25.
HiVcYWn9ViVWVhZhad\^XVahiVcYWngdaZ
246
Oracle Data Guard 11\ Handbook
FIGURE 6-26.
:Y^iHiVcYWn9ViVWVhZEgdeZgi^Zh[dgi]Zad\^XVahiVcYWn
To configure skip operations, you have to set up the appropriate SQL Apply properties in the Standby Role Properties page. To get to the Standby Role Properties page, select your logical standby database and click the Edit button shown in Figure 6-25 to be routed to the Edit Standby Database Properties screen. Click the Standby Role Properties tab to see the properties shown in Figure 6-26. Click Show Advanced Properties to expand the SQL Apply Properties, as shown in Figure 6-27. You can specify the amount of system resources that SQL Apply can consume in the SQL Apply Properties portion of the screen. By adjusting the MAX SGA in number of megabytes (MB), you can allocate the amount of megabytes for SQL Apply to cache in the system global area (SGA). If you specify a value of 0, SQL Apply will allocate one quarter of the value of the
FIGURE 6-27.
HFA6eeanEgdeZgi^Zh[dgi]Zad\^XVahiVcYWn
Chapter 6:
FIGURE 6-28.
Oracle Enterprise Manager Grid Control Integration
247
6YYH`^eIVWaZ:cign[dgi]Zad\^XVahiVcYWn
SHARED_POOL_SIZE initialization parameter. You can also specify the number of parallel servers
specifically reserved for SQL Apply. In the Max Events Recorded field, you can set the number of events that will be stored in the DBA_LOGSTDBY_EVENTS table. At the bottom of the page, you can add tables for SQL Apply to ignore, or skip, by clicking Add and entering more tables. TIP I]ZHFA6eeanEgdeZgi^Zhedgi^dcd[i]ZeV\Z^hk^h^WaZdcandci]Z ad\^XVahiVcYWnYViVWVhZ#>[ndjk^Zli]ZHiVcYWnGdaZEgdeZgi^ZheV\Z dci]Zeg^bVgnYViVWVhZhZgkZg!i]ZHFA6eeanEgdeZgi^Zhedgi^dcd[ i]ZeV\Zl^aacdiWZVkV^aVWaZ# After you click the Add button, you’ll see the Add Skip Table Entry page, as shown in Figure 6-28. In this particular example, SQL Apply will be instructed to skip all DML operations on the SCOTT.EMP table. Click OK to go back to the Standby Role Properties page. Click Add once more. This time, change the SQL Statement field to SCHEMA_DDL for the SCOTT.EMP table. To add more tables to skip, click Add and enter more tables. You can see from Figure 6-29 that the EMP table is set up to have all DML and DDL skipped. Lastly, once you’ve identified and entered all the tables you want SQL Apply services to skip, click Apply to save your changes. You’ll see an Information bar telling you that the changes have been applied, as shown in Figure 6-30.
FIGURE 6-29.
H`^eIVWaZh:cig^ZhV[iZgiVWaZhVgZVYYZYidi]Zad\^XVahiVcYWn
248
Oracle Data Guard 11\ Handbook
FIGURE 6-30.
NdjgX]Vc\ZhlZgZhjXXZhh[ja#
Later, if you want SQL Apply to start applying DML and DDL changes to the EMP table, you can return to this screen and click Remove, as shown in Figure 6-31. Once you have removed all the skip rules for the table you want SQL Apply to maintain, click the Apply button at the lower-right corner of the page. You’ll see a TIP at the bottom of the page telling you that the entry has been removed from the table, as shown in Figure 6-32. This will process your request and remove the skip rules for EMP from the logical standby database. But you are not done yet. The moment someone makes a change to the EMP table on a row that either does not exist in the logical standby or has different data, the SQL Apply processes will stop immediately and you will see an error on the Data Guard home page, as shown in the lower-right corner in Figure 6-33. Click the error message link to see more information about the problem in the Edit Properties page, as shown in Figure 6-34. You are offered a “Skip” button, but unless you are certain that you understand what happened and you are 100-percent sure that you can skip this error, do not push the Skip button. In general, you should not skip DML transactions for it can corrupt data on the logical standby database. In this case, what you really need to do is reinstantiate the EMP table using the DBMS_ LOGSTDBY.INSTANTIATE_TABLE procedure. This procedure requires a Database link that points to the primary database with a user that has the privileges to read and lock the table in the primary database, as well as the SELECT_CATALOG_ROLE on the primary database. In this example, we use the SYSTEM account for our database link. SQL> CREATE DATABASE LINK MATRIX CONNECT TO SYSTEM IDENTIFIED BY oracle USING 'MATRIX'; Database link created. SQL> EXECUTE DBMS_LOGSTDBY.INSTANTIATE_TABLE(SCHEMA_NAME => 'SCOTT', TABLE_NAME => 'EMP', DBLINK => 'MATRIX'); PL/SQL procedure successfully completed. SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE; Database altered. SQL>
FIGURE 6-31.
GZbdk^c\Vh`^eeZYiVWaZ
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
FIGURE 6-32.
H`^egjaZhgZbdkZY[dg:BE
FIGURE 6-33.
HFA6eeanZggdg
FIGURE 6-34.
HFA6eeanZggdg^c[dgbVi^dc
249
250
Oracle Data Guard 11\ Handbook Then you need to restart SQL Apply manually after the procedure is complete, as Grid Control will still show the error state. After SQL Apply has restarted and applied the errant DML to our EMP table, the Data Guard home page will once again show that everything is normal, and you can relax.
Managing Active Standby In Chapter 9, you’ll learn how to enable an active standby database using SQLPlus and the Data Guard Broker CLI. OEM Grid Control 10\ Release 5 starts to support the active standby functionality that is available beginning in Oracle Database 11\. You can enable active standby with a couple of clicks.
Managing Snapshot Standby You will also learn how to create a snapshot standby database in Chapter 9. OEM Grid Control 10\ Release 5 also supports the snapshot standby feature offered in Oracle Database 11\ with a simple click of the Convert button on the Data Guard home page and with a Yes click on the confirmation page. The convert button will convert the standby database, depending on the role at the current time, to a snapshot standby if it is a physical standby and to a physical standby if it is a snapshot standby.
Removing a Standby Database from Broker Control You can easily remove a standby database or Data Guard Broker configuration from OEM Grid Control. Removing a standby from OEM Grid Control does not remove the database from the file system or ASM, just from the Broker’s control. Removing a standby database profile in Grid Control merely removes that database from the Data Guard Broker configuration file. By default, during the Data Guard Broker decoupling phase, the standby destination is removed from the primary database so that logs are no longer shipped to the standby database. You can specify whether or not you want the Broker to leave the redo transport parameters in place after it is no longer controlling the standby database by selecting the Preserve The Destination… check box shown in Figure 6-35. You can remove a standby database from the Data Guard Broker by selecting the standby database you want to remove and clicking Remove from the Data Guard home page. OEM Grid
FIGURE 6-35.
8dc[^gb^c\VhiVcYWnYViVWVhZgZbdkVa
Chapter 6:
FIGURE 6-36.
Oracle Enterprise Manager Grid Control Integration
251
GZbdkZ9ViV<jVgY8dc[^\jgVi^dca^c`
Control forwards you to a confirmation page to make sure that you really want to remove the standby database, as shown in Figure 6-35. Then click Yes to remove the standby database from Data Guard Broker control. Once the standby database is profile is removed, you are returned to the Data Guard home page. To remove an entire Broker configuration, navigate to the Data Guard home page and scroll down to the bottom of the screen. In the Additional Administration section, look for the Remove Data Guard Configuration link, as shown in Figure 6-36. Click the link, and you will be routed to a confirmation page, shown in Figure 6-37, which explains that the database will still stay intact. You also have an option to click the check box to preserve all standby destinations so that redo data will continue to ship to the standby site. Then click Yes to remove the Data Guard Configuration. When complete, you are returned to the Data Guard home page. NOTE NdjXVcValVnhVYYi]Z9ViV<jVgY7gd`ZgXdc[^\jgVi^dcWVX`Wn Xa^X`^c\6YYHiVcYWn9ViVWVhZ[gdbi]Z9ViV<jVgY]dbZeV\Z#Ndj XVcgZ"VYYi]ZhiVcYWnYViVWVhZWnhZaZXi^c\i]ZBVcV\Z6c:m^hi^c\ HiVcYWn9ViVWVhZL^i]9ViV<jVgY7gd`Zgdei^dc#
FIGURE 6-37.
8dc[^gb^c\i]VindjlVciidegZhZgkZVaahiVcYWnYZhi^cVi^dch
252
Oracle Data Guard 11\ Handbook
Keeping an Eye on Availability Now that you have examined what you can do with Grid Control and your Data Guard setup, it’s time to get to know one final new feature of Grid Control 10.2.0.5. All the actions and screens shown throughout this chapter, as well as the other chapters in which Grid Control is discussed, are available in prior versions of Grid Control 10\. Starting with Grid Control 10.2.0.5, you can navigate to a new, consolidated High Availability Console under the Availability tab on any of your databases, as shown in the next illustration.
The console offers one place to monitor most things concerning high availability (HA) and disaster recovery (DR). When we first access the console, it will pertain to the database to which we want to connect, displaying the basic layout, as shown the next illustration, which is for our primary database.
The console shows an Availability Summary, Availability Events, a Backup/Recovery Summary, current Flash Recovery Area statistics if one is configured, and a Data Guard Summary if this database is part of a Data Guard configuration. If it is not, you will see the Add Standby Database link in the Data Guard Summary area. By default, the console screen has a manual refresh that you can configure with the pull-down menu in the upper-right corner. Click the Advanced View link at the top of the screen, and the console will be expanded with some new charts and other information, as shown in the next illustration.
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
253
At the right side are three charts that have been added to the console: Availability History, a history of the Used Flash Recovery Area space, and, since this is a primary database, a historical chart of the Redo Generation Rate. The Redo Generation Rate chart changes to the Standby Apply Lag history if the database you are showing is a physical or a logical standby database. At the upper-right, you can use the pull-down menu to select any one of the databases that are part of the Data Guard configuration. The next illustration shows the console for our physical standby database, Matrix_DR0.
254
Oracle Data Guard 11\ Handbook The only difference here is the chart showing the apply lag historical statistics for the last few hours. You can also view advanced information for a logical standby, as shown in the next illustration.
Compare these two screens, and you’ll see two major differences between the statistics for the physical standby and the logical standby, the apply lag, and the flash recovery area space usage. It is pretty normal for the apply lag to be greater on a logical standby than a physical standby, as SQL Apply does have more work to do. But you can tune both apply services to keep this number as close to 0 as possible. A big spike in the apply lag for either type of standby database would signify either that you had a burst of redo generation that exceeded your standby’s ability to apply at the same speed (compare the spikes to the history of the redo generation rate in the primary console) or something needs your attention on the standby database and should perhaps be tuned. The other interesting information shown in these two screens is the flash recovery area usage. The logical standby database is 80 percent full with unreclaimable space while the physical standby is only 4.5 percent used. This is due (in our case) to the fact that we have the RMAN Archive Log Deletion Policy set on the physical standby to delete the archive logs when space is needed in the flash recovery area as soon as they have been applied to all standbys, which includes itself. The logical standby database is a read-write database and as such generates its own archive logs as well as those that are coming from the primary database. As mentioned in Chapter 2, you can place the incoming archive log files from the primary and the archive log files generated by the logical standby into the flash recovery area. Data Guard can be configured to automatically delete incoming archive log files that are no longer needed for the recovery or for Flashback Database if enabled. So we would expect the space usage to be greater for a logical standby than for a physical standby. However, the reason that the difference is so high is due to the fact the RMAN deletion policy does not work on the logical standby, as it does on a physical standby, and the generated archive log files are not marked as reclaimable. This is because,
Chapter 6:
Oracle Enterprise Manager Grid Control Integration
255
unlike a physical standby which can be restored and recovered from the archive logs of the primary database, the log files would be necessary to recover the database if you had to restore your logical standby. So you will want to keep an eye on the flash recovery area for your logical standbys and implement a backup strategy for the logical standby and its archive logs. A last word on the High Availability Console: You can customize the console by clicking the Customize link at the top of the page and choosing what you would like displayed, as shown in this illustration.
Conclusion OEM Grid Control allows a DBA to maintain and monitor what may seem like a complex Data Guard environment with ease from a single GUI. OEM Grid Control can be the jewel of the company, and, at the same time, the single hindrance for DBAs when things do not work as expected. DBAs can effectively set up and manage a Data Guard environment without typing any commands in SQL*Plus. It would be foolish not to take advantage of the robust feature enabled in OEM Grid Control. At the same time, we strongly advocate that you should also learn the command-line syntax of both the Broker DGMGRL CLI and SQL*Plus and the in-depth architecture so that you can effectively troubleshoot Data Guard behind the scenes. As you manage the Data Guard environment with OEM Grid Control, you will quickly discover that heaps of the under-the-cover SQL commands are exposed in the alert log file.
CHAPTER
7 Monitoring Data Guard Implementations 257
258
Oracle Data Guard 11g Handbook roactive database monitoring is vital to the task of keeping a production database up and running. Monitoring a database for potential outage conditions is the best way to maintain the highest uptime of your production environment. Monitoring solutions such as HP OpenView, IBM Tivoli, and Oracle Grid Control classify database alerts in two or three severity categories: critical, warning, and minor. Basically, a critical condition would indicate that a database outage has occurred or is about to happen. A warning condition would indicate that the database or the application component of the database would become an outage if the condition were not handled by a DBA. A minor condition is an informative message to the DBA. Typically a production database will be monitored for at least the following:
P
N
Tablespace free space
N
Database alert log for ORA errors
N
Archive log destination for free space thresholds
N
Database/listener availability
N
Blocking locks
When it comes to Data Guard, DBAs must monitor for conditions that may potentially risk satisfying the company’s recovery point objective (RPO) and recovery time objective (RTO) requirements. Proactive monitoring of Data Guard implementations can save DBAs hours or even days of headaches in keeping the physical standby database in sync with the primary database. Monitoring a Data Guard environment involves monitoring both the primary and all associated standby databases. In addition to monitoring the databases for pertinent errors or conditions, the DBA must check the existing configuration for compliance to industry standard practices; this can also alleviate potential issues. This chapter focuses on providing extensive monitoring solutions delivered in shell script format that can be readily implemented in a Data Guard environment. In addition to the monitoring scripts, a comprehensive checklist is also supplied to assist in diagnosing common configuration issues. You can leverage this checklist to review your Data Guard configuration to ensure that setup complies with the industry standard best practices.
Monitoring the Data Guard Environment When it comes to monitoring a Data Guard environment, DBAs must closely monitor selective components of the database topology, such as the file system or Automatic Storage Management (ASM) diskgroup for archive log destination or the alert log file for ORA error messages. The goal of monitoring a Data Guard environment is to detect and proactively eradicate server, network, database, application, Storage Area Network (SAN), file system, operating system, and application problems before they become full-scale outages. None of us wants these errors to jeopardize our ability to failover to our disaster recovery site. Your company may be deploying physical standby and/or logical standby databases. Depending on the type of standby database being implemented, your monitoring objectives will vary. Even though physical and logical standby databases share common elements to be monitored, such as the alert log file, archive log destination, and archive log history, monitoring a logical standby database is significantly different from doing so on a physical standby database.
Chapter 7:
Monitoring Data Guard Implementations
259
PS and LS We have labeled the paragraph headings with PS (physical standby) and/or LS (logical standby) to let you know the standby database type for which the section applies. A section may be specific to a physical standby database or to a logical standby database, or to both.
In this chapter, we will share our expertise in how to monitor both the logical and physical standby databases effectively.
Mining the Alert Log File (PS+LS) Let’s start with monitoring the alert log file. Whether you are deploying a logical standby database or a physical standby database, Data Guard monitoring begins by scrutinizing the alert log file, which is your first line of defense against identifying and resolving Data Guard issues. An alert log monitoring script should focus on mining for Data Guard–related ORA error messages, since most of the errors associated with Data Guard are visible in the database alert log. As of Oracle Database 10g Release 2, many of the usual Data Guard messages have been removed from the alert log. This will not affect our code examples in this book but if you have your own scripts that look for errors that are no longer there, you can set LOG_ARCHIVE_TRACE=1 on the primary and the standby databases and most of them will be reinstated. For specific details of Data Guard error(s), you may need to examine the trace files to find the root cause. In this chapter, we provide an alert log monitoring script called alert_log_monitor.ksh. NOTE NdjXVcgZk^ZlbV_dgXdbedcZcihd[i]ZXdYZ^ci]^hhZXi^dcdg YdlcadVYi]ZZci^gZhdjgXZXdYZ[gdbi]^hWdd`¼hlZWh^iZ!lll #YViV\jVgYWdd`#Xdb!dg[gdbDgVXaZEgZhh¼hYdlcadVYlZWh^iZ/lll #dgVXaZegZhhWdd`h#Xdb# The alert log monitoring script is designed to read the oratab file in either the /var/opt/oracle directory in the Sun Solaris operating system or in the /etc directory in all other flavors of UNIX. The script checks to see if the auto-startup flag in /etc/oratab is set to Y. If the flag is set to Y, the alert log monitoring script will perform a diff command on the alert log and compare it to the previous diff command output file. If additional ORA errors are encountered, the script will send an alert to the DBA. When an ORA error is encountered, DBAs will be notified of the issue so that they can examine the root cause of the ORA error. The alert log monitoring shell script has an $IGNORELIST variable that can be used to strip out certain ORA messages before deciphering the alert condition and generating an alert. You can strategically input one or more ORA error codes in the $IGNORELIST concatenated with pipes. At times, you’ll probably not want to be notified of the errors generated by the application queries. Or you may experience sporadic ORA-00600 messages in the alert log file. For example, you may have already logged a technical assistance request (iTAR) with Oracle Support and have identified a corrective action plan, but you do not want to receive alerts for ORA-00600 error messages until the issue is resolved with Oracle Support.
260
Oracle Data Guard 11g Handbook The alert log monitor script will suppress the ORA error number messages specified in the $IGNORELIST variable. All the scripts offered in this chapter source (or execute) a file called .ORACLE_BASE in the Oracle user’s $HOME directory. The .ORACLE_BASE file defines basic UNIX environment variables such as ORACLE_BASE, PATH, and SH: export export export export
BASE_DIR=/apps/oracle ORACLE_BASE=/apps/oracle PATH=/usr/local/bin:/usr/bin:/usr/sbin:$PATH SH=$ORACLE_BASE/general/sh
After you source the .ORACLE_BASE file, you can set additional parameters relevant for the alert log monitoring script such as the oratab file location. Here is the content of the alert_log_ monitor.ksh script for your perusal: # /usr/bin/ksh # ----------------------------------------------------------------------# INITIAL SETUP # ----------------------------------------------------------------------. $HOME/.ORACLE_BASE [ -f /etc/oratab ] export ORATAB=/etc/oratab || export ORATAB=/var/opt/oracle/oratab echo "oratab is: $ORATAB" cat $ORATAB|grep -v do
# |grep :Y |cut -d: -f1 |sort |sed 's/ //g' |while read DB
export ORACLE_SID=$DB export ORAENV_ASK=NO . oraenv export DECIMAL_VERSION=$(sqlplus -V |sed -e 's/[a- ]//g' -e 's/[A-Z]//g' -e 's/ //g' |sed 's/[*:=-]//g' |grep -v $) export NUMERIC_VERSION=$(echo $DECIMAL_VERSION |sed -e 's/ .//g') echo "The database version is: $DECIMAL_VERSION - $NUMERIC_VERSION" echo "Checking Alert Log for: $DB" export TMPDIR=/tmp IGNORELIST="03113|19809|19804|01013|07445" RUNDATE= date "+%d/%m/%y at %H:%M:%S" LOGFILE=$ SH /$ DB _chkalerts.log DIFFFILE=$ TMPDIR /$ DB _chkalert.diff ALERT2FILE=$ TMPDIR /$ DB _chkalert2 export IGNORELIST RUNDATE LOGFILE DIFFFILE ALERT2FILE [ -f $DIFFFILE ] rm $DIFFFILE echo "Execution starts on $ HOSTNAME (
on $RUNDATE"
Chapter 7:
Monitoring Data Guard Implementations
261
# # # # # #
----------------------------------------------------------------------SETUP Oracle Environment and alias for every database in the $ORATAB file --------------------------------------------------------------------------------------------------------------------------------------------ALERTLOG_10g=$ BDUMPDIR /alert_$ DB .log ALERTLOG_11g=$ORACLE_BASE/diag/rdbms/$(echo $ORACLE_SID|tr A-Z a)/$ORACLE_SID/trace/alert_$ORACLE_SID.log # ----------------------------------------------------------------------if [ "$NUMERIC_VERSION" -lt 11 ]; then BDUMPDIR=$ ORACLE_BASE /admin/$ DB /bdump [ -d $BDUMPDIR ] echo "BDUMP Dir: $BDUMP does not exist " echo "bdump: $BDUMPDIR" ALERTLOG=$ BDUMPDIR /alert_$ DB .log else ALERTLOG=$ORACLE_BASE/diag/rdbms/$(echo $ORACLE_SID|tr A-Z a)/$ORACLE_SID/trace/alert_$ORACLE_SID.log fi [ -f $ALERTLOG ] echo "Alert Log is:
echo "ALert Log File $ALERTLOG does not exist $ALERTLOG"
if [ -r $ ALERTLOG ] ; then echo "$RUNDATE Could not read alert log $ ALERTLOG break fi
"
for SID $ DB "
touch $ SH /chkalert1_$ DB cp $ SH /chkalert1_$ DB $ ALERT2FILE grep -n ORA- $ ALERTLOG | egrep -v "$ IGNORELIST " > $ SH /chkalert1_$ DB set wc -l $ SH /chkalert1_$ DB COUNT1=$1 set wc -l $ ALERT2FILE COUNT2=$1 if [ $COUNT1 -lt $COUNT2 ] ; then > $ ALERT2FILE COUNT2=0 fi if [ $COUNT1 -gt $COUNT2 ] ; then diff $ SH /chkalert1_$ DB $ ALERT2FILE |grep "<" > $ DIFFFILE FN= echo $0 | sed s/ .*[/]// export HOSTNAME=$(hostname) echo "Sending Alert - Diff file is: $DIFFFILE" echo "$SH/alert_notification.ksh $FN hostname $DB "" "Alert log errors for
262
Oracle Data Guard 11g Handbook $ DB " $ DIFFFILE " $SH/alert_notification.ksh $FN $ DIFFFILE
hostname
$DB "" "Alert log errors for $ DB "
fi ) >> $ LOGFILE
2> 1
done
The alert log monitoring script checks the Oracle database version by means of the sqlplus V syntax. We chose this method because you cannot query the database for the version as the database may not be online. As of Oracle Database 11g, the database version becomes pertinent for alert log monitoring since the alert log file is located in the trace directory of the DIAG_DEST location. TIP 976hXVcXgZViZhnbWda^Xa^c`h[gdbi]ZDG68A:T76H:$ VYb^c$DG68A:TH>9[dgi]ZWYjbeY^gZXidgni]Vied^cihid i]ZigVXZY^gZXidgnd[i]ZcZlDgVXaZ9ViVWVhZ&&gY^V\cdhi^X gZedh^idgn#=ZgZ¼hVh^beaZZmVbeaZd[XgZVi^c\VhnbWda^Xa^c`[gdb i]ZdaYZgadXVi^dcDG68A:T76H:$VYb^c$DG68A:TH>9Y^gZXidgn idi]ZigVXZY^gZXidgn/ $ pwd /apps/oracle/admin/RACQA ln -s /apps/oracle/diag/rdbms/racqa/RACQA1/trace bdump
When the alert log monitor script detects new ORA error code(s) in the alert log, the alert_ notification.ksh script is invoked. This script reads another script that is a control file called alert_notification.ctl, and based on the name of the invoking script, the recipients of the alert condition are determined. You can specify any number of recipients in this file based on the script name. Here’s an example of an alert_notification.ctl control file: SCRIPT_NAME ======================= oraping.ksh ping_server.ksh dgmon.ksh dgmon_arch.ksh archmon.ksh
KEYWORD ======= DB OSE OSE OSE OSE
SEVERITY ======== CRITICAL CRITICAL WARNING WARNING MINOR
dg_archivelog_monitor.ksh DB
MINOR
tbsp_free.ksh_PG tbspmon.ksh
DB DB
MINOR MINOR
tbspmon.ksh_PG
DB
MINOR
NOTIFICATION_LIST ========================= [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected]
Chapter 7:
Monitoring Data Guard Implementations
diskfree.ksh
OSE
MINOR
[email protected] [email protected]
[ *:
OTH
MINOR
OTH
MINOR
[email protected] [email protected] [email protected]
#*:
263
]
If a script that matches the invoking script is not found, the alert notification is sent out to a catch-all recipient. The catch-all recipient is configured as the last line of the control script alert_notification.ctl file that is not commented out. The alert notification control file also labels the severity of the alert with the possible severity categories: MINOR, WARNING, and CRITICAL. Obviously, additional categories can be defined, but WARNING and CRITICAL severities happen to be the same categories that are recognized by leading industry management consoles such as HP OpenView and IBM Tivoli. For larger companies that depend on network operation centers (NOCs) or surveillance teams, the alert notification shell script also has API hooks to HP OpenView and IBM Tivoli. You can send alert notifications directly to the monitoring consoles with the severity levels specified. The alert_notification.ksh script escalates severities if DBAs do not clear the alert within a specified number of alert intervals. By default, the alert notification script will raise up to five alerts. The goal of the alert notification script is not to flood your e-mail inbox with database alerts but to send you proactive information so that you can deal with potential outages. In this example, if the specific alert is not corrected or cleared by the fourth alert, the alert will be escalated to the next higher severity. For certain situations, the script has been modified to change the recipient list as well. The alert log monitoring script detects the differences in the ORA error messages since the last time it was executed and writes the alert to a file in the /tmp directory. The alert log monitoring script invokes the alert notification script and passes all the necessary parameters to send the alert with all the information required. Here’s a sample alert generated by the alert log monitoring script: < < < < < [ < < < < < < [ < < < < < < < <
201: returning error ORA-16191 204:ORA-16191: Primary log shipping client 216: returning error ORA-16191 219:ORA-16191: Primary log shipping client 223:ORA-16055: FAL request re ected ] 520:ORA-01034: ORACLE not available 524:ORA-16055: FAL request re ected 551: returning error ORA-16191 554:ORA-16191: Primary log shipping client 566: returning error ORA-16191 569:ORA-16191: Primary log shipping client ] 641: returning error ORA-16191 644:ORA-16191: Primary log shipping client 897:ORA-03135: connection lost contact 1160:ORA-16055: FAL request re ected 1242:ORA-12541: TNS:no listener 4459:ORA-12537: TNS:connection closed 4491:ORA-01034: ORACLE not available 4500:ORA-03135: connection lost contact
not logged on standby not logged on standby
not logged on standby not logged on standby
not logged on standby
264
Oracle Data Guard 11g Handbook
Logical Standby Alert Log File Entries In the logical standby database alert log file, you will see entries that start with the words “LOGSTDBY status:” followed by the Oracle error message. You may choose to search selectively for the words “LOGSTDBY status:” to scan directly for logical standby–related error messages. Here are several examples of the logical standby errors in the alert log file: LOGSTDBY status: ORA-16081: insufficient number of processes for APPLY Wed Feb 11 23:27:13 2009 Errors in file /apps/oracle/admin/MATRIXRT/bdump/matrixrt_lsp0_3966.trc: ORA-16081: insufficient number of processes for APPLY LOGSTDBY status: ORA-16222: automatic Logical Standby retry of last action LOGSTDBY status: ORA-16111: log mining and apply setting up
You can perceive from the alert notification that the alert is probably due to the primary database not identifying the archive log on the standby site. The issue in this e-mail output seems to be that either the database was shut down or the listener was not available. Once you receive the alert from e-mail, pager, or cell phone, you can examine the alert log to view additional information relative to the issue(s) causing the alert. By viewing the alert log, you can see detailed messages that are not captured by the alert log monitor script, such as the Remote File Server (RFS) messages: RFS[17]: Possible network disconnect with primary database Thu Aug 28 06:44:40 2008 Aborting archivelog file creation: +FRA/matrix-DR0/archivelog/2008_08_28/thread_1_seq_11067.3622.663921821 If this a network disconnect, then this archivelog will be fetched again by GAP resolution mechanism. Thu Aug 28 06:44:40 2008
Gathering Statistical Information from Archive Log History (PS+LS) In general, archive logs should switch about every 30 minutes, but no less than every 15 minutes. You should examine the V$LOG_HISTORY view to review the frequency of archive log switches. If the archive log switches occur at an astronomical rate, you may need to consider increasing the size of the online redo logs. Keep in mind that if you increase the size of the online redo logs, the size of the standby redo logs needs to be increased as well. You must also remember that Oracle recommends N + 1 standby redo logs on the standby database. The following formula can be used to compute the number of standby redo logs for a RAC environment: Total Number of Standby Redo Logs = ( No. of ORL per RAC instance +1 ) * No. of Instances
Chapter 7:
Monitoring Data Guard Implementations
265
For example, for a 3-node RAC that has 3 ORLs per instance: Total Number of Standby Redo Logs: (3+1)*3 =12 Standby Redo Logs.
You can review the alert log historical information, such as number of archive logs generated, in these increments: N
Past one hour
N
Past one day
You should also capture related information such as the number of archive logs generated per day and the size of online redo logs. Based on how many archive logs are generated on an hourly basis, database architects can design a proper wide area network (WAN) infrastructure and determine bandwidth requirements to satisfy RTO and RPO requirements. Archive log generation during peak database usage will dictate the bandwidth needed for the WAN. The following query can be used on the primary database to identify peak archive times for a specified day: SELECT TO_CHAR(TRUNC(FIRST_TIME),'Mon DD') "DG Date", TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'00',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'01',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'02',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'03',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'04',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'05',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'06',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'07',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'08',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'09',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'10',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'11',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'12',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'13',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'14',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'15',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'16',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'17',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'18',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'19',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'20',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'21',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'22',1,0)),'9999') TO_CHAR(SUM(DECODE(TO_CHAR(FIRST_TIME,'HH24'),'23',1,0)),'9999') FROM V$LOG_HISTORY GROUP BY TRUNC(FIRST_TIME) ORDER BY TRUNC(FIRST_TIME) DESC /
"12AM", "01AM", "02AM", "03AM", "04AM", "05AM", "06AM", "07AM", "08AM", "09AM", "10AM", "11AM", "12PM", "1PM", "2PM", "3PM", "4PM", "5PM", "6PM", "7PM", "8PM", "9PM", "10PM", "11PM"
The output of this query will span beyond the width of your UNIX terminal. You may want to maximize your UNIX terminal to view the output in a friendly format. For display purposes,
266
Oracle Data Guard 11g Handbook we will execute the SQL statement and truncate the output after 11 A.M. to display the number of archive logs generated from 12 A.M. to 12 P.M.: DG Date 12AM ------ ----Jul 17 0 Jul 16 0 Jul 15 0 Jul 14 0 Jul 13 0 Jul 12 0 Jul 11 0 Jul 10 2 0 0 Jul 08 0 Jul 07 0 Jul 06 0 Jul 05 0 Jul 04 0 Jul 03 0 Jul 02 1 Jul 01 0 Jun 30 0
01AM ----0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
02AM 03AM 04AM 05AM 06AM 07AM 08AM 09AM 10AM 11AM ----- ----- ----- ----- ----- ----- ----- ----- ----- ----0 0 10 25 39 0 0 0 0 0 0 0 6 0 55 6 0 1 0 0 0 0 7 0 43 5 20 8 11 0 0 0 7 7 39 25 30 52 0 0 0 0 6 1 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 6 0 45 20 0 2 1 0 0 0 7 0 0 32 1 16 24 0 0 30 33 32 32 31 1 2 13 1 0 6 0 32 29 7 2 3 0 0 0 6 0 0 42 0 0 0 0 0 0 7 1 0 1 0 1 0 6 0 0 12 0 0 0 0 4 6 0 0 0 12 0 0 0 32 13 7 0 0 0 14 3 31 33 0 0 8 0 0 0 12 0 0 46 0 0 24 0 0 0 13 1 0 0 0 0 6 39 8 0 12 0 0 57 12 12 18 7 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
When you run the script, the output will display every hour of the day and the number of archive logs generated per hour. Let’s review some interesting statistics from this output. On July 9, 30-plus archive logs were generated from 3 A.M. to 7 A.M. Additionally, you will notice that on June 30 and July 16, 55-plus archive logs were generated at 6 A.M. You can use these numbers to determine your bandwidth requirements to satisfy your RPO and RTO. NOTE I]ZAR VE LA AR E eVgVbZiZg[dgXZhVad\hl^iX]V[iZgV heZX^[^ZYi]gZh]daYhZi^chZXdcYh#I]^h^c^i^Va^oVi^dceVgVbZiZgl^aa ^c[ajZcXZi]^hgZedgih^cXZ^i^c[ajZcXZhgZYdad\hl^iX]ZhZkZcYjg^c\ VE LA AR E adldgcdVXi^k^indci]ZYViVWVhZ#7nYZ[Vjai!AR ^hhZiid%!^cY^XVi^c\i]Vii]Zeg^bVgnYViVWVhZYdZhcdieVgi^X^eViZ^c Vi^bZ"WVhZYgZYdhl^iX]#I]ZgZXdbbZcYZYhZii^c\[dgi]^heVgVbZiZg ^h&-%%!l]^X]^hZfj^kVaZciid(%b^cjiZh!^cY^XVi^c\i]Vii]Zeg^bVgn bjhihl^iX]dca^cZgZYdad\[^aZhZkZgn(%b^cjiZhViVb^c^bjb#7Z VlVgZi]ViVadlkVajZXVcXVjhZeZg[dgbVcXZYZ\gVYVi^dch#
Detecting Archive Log Gaps (PS+LS) For one reason or another, you may encounter gaps in archive log sequences on the standby database. Gap sequences typically occur as a result of a network outage. Archive gaps occur when an archive log is generated on the primary database but not received at the standby site. The primary database pings the standby database every minute to detect archive log gaps. Archive log gaps should be monitored to make sure that a gap does not exceed a large number of archive logs or for an extended period of time. Most archive log gaps are resolved by the ping ARCH process or by
Chapter 7:
Monitoring Data Guard Implementations
267
the Fetch Archive Log (FAL) process; typically, DBA intervention is not required. In the event of an extended outage or multiple gap sequences, manual intervention may be required to copy or restore the archive logs from the primary database to the standby database. Archive log gaps can be monitored by examining the low and high sequence numbers in the V$ARCHIVE_GAP view, as shown here: SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
By reviewing the THREAD# column, you can detect missing sequences at the Real Application Clusters (RAC) instance level. If you find that Data Guard cannot resolve a gap automatically, it is probably because a required archive log file no longer resides on disk at the primary. The following script, dg_gap_detect.ksh, not only monitors the archive log gap on the standby database, but the gaps are correlated to the archive log names on the primary database that need to be copied or restored to the standby site: # File Name: dg_gap_detect.ksh export DR_DB=DEV_STDBY export GAPFILE=$ DR_DB _gap.log [ -f $GAPFILE ]
rm $GAPFILE
echo "Gaps in DR DB: $DR_DB" echo "set head off ver off pages 0 feed off lines 122 SELECT * FROM V $ARCHIVE_GAP;" |sqlplus -s "sys/$ SYSPASSWD @$ DR_DB $GAPFILE
as sysdba" >
# Print the contents of the GAPFILE cat $GAPFILE cat $GAPFILE |while read THREAD LOW HIGH do echo "Reporting Archivelogs that need to be manually shipped" echo "set head off ver off pages 0 feed off lines 222 select name from v $archived_log where thread#=$ THREAD and dest_id=1 and sequence# between $ LOW and $ HIGH ;" |sqlplus -s / as sysdba done
The following example shows that a gap exists on THREAD #1, and archive log sequences 87 and 88 need to be copied or restored from the primary to the standby database server: $ ./dg_gap_detect.ksh Gaps in DR DB: DEV_STDBY 1 87 88 Reporting Archivelogs that need to be manually shipped /u04/oradata/DEV/recovery_area/arch_1_87_656445787.log /u04/oradata/DEV/recovery_area/arch_1_88_656445787.log
268
Oracle Data Guard 11g Handbook Now you can manually scp or sftp the archive logs to the physical standby database server if they exist on the primary server (or restore them from a backup) and register the archive logs. For detailed steps on how to troubleshoot archive log gaps, refer to Chapter 13.
Identifying Delays in Redo Transport (PS) Delays in redo transport can be monitored by comparing the highest sequence numbers of both primary and physical standby databases. If the maximum sequence number deviates by a specified number of archive logs, you can send an alert indicating that the standby Data Guard is falling behind. To view the highest sequence numbers, you can query the V$ARCHIVED_LOG view: SELECT MAX(SEQUENCE#), THREAD# FROM V$ARCHIVED_LOG GROUP BY THREAD#;
We have provided a script called dg_archivelog_monitor.ksh to detect delays in redo transport (even for a RAC environment) and alert DBAs in conditions where redo transport exceeds a specified threshold. The dg_archivelog_monitor.ksh script accepts three parameters (in the order specified): 1. The primary database name 2. The Transparent Network Substrate (TNS) alias to the physical standby database 3. The archive log threshold specified in numeric format Here’s an example of usage for this script: dg_archivelog_monitor.ksh MATRIX MATRIX_DR0 25
This particular example specifies that you want to be alerted if the number of archive logs on the standby site falls behind by 25 or more archive logs. Here’s a sample e-mail produced from the dg_alertlog_monitor.ksh script: Sub ect: :OTH:MINOR:rac05:MATRIX:MATRIX_DR0:Primary: and DG: Archive Logs are not in sync on 012109:1500 - Alert#: 2 Primary MATRIX and Data Guard MATRIX_DR0 ArchiveLogs are not in sync There is a gap in Archive Log Sequence of: 27 for Thread#1 and 10 for Thread#2 thread1 37918 thread1 37945 thread2 30689 thread2 30699 # -----------------------------------------------# # - Here's a look at the status on the DR Site: # -----------------------------------------------# NAME CREATOR T# S# APPL FIRST_CHANGE# NEXT_CHANGE# ----------------------------------------------------------------------------- ------- --- ------- ---- ------------- ------------
Chapter 7:
Monitoring Data Guard Implementations
269
+FRA/matrix_dr0/archivelog/2009_01_20/thread_1_seq_37881.5092.676 652477 ARCH 1 37881 YES 3.273329E+12 3.273329E+12 +FRA/matrix_dr0/archivelog/2009_01_20/thread_1_seq_37882.4980.676 652965 ARCH 1 37882 YES 3.273329E+12 3.273329E+12 +FRA/matrix_dr0/archivelog/2009_01_20/thread_1_seq_37883.4558.676 653449 ARCH 1 37883 YES 3.273329E+12 3.273329E+12 [ ]
In this particular example, an alert notification was sent since the deviance of 27 archive logs for the sequence numbers exceeded the specified threshold of 25 archive logs. Notice that for Thread #1, the current sequence number is 37945, while the current sequence number on the physical standby is 37918. The dg_archivelog_monitor.ksh script monitors each thread of the RAC environment on the physical standby database to compare the maximum sequence number (of each thread) of the primary thread with the corresponding standby thread. When you detect a redo transport delay, execute the following query on the primary database to identify archive logs that have not made it to the standby destination: SELECT L.THREAD#, L.SEQUENCE# FROM (SELECT THREAD#, SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=1) L WHERE L.SEQUENCE# NOT IN (SELECT SEQUENCE# FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND THREAD# = L.THREAD#);
Monitoring Archive Log Destinations (PS+LS) If the archive log destination happens to be in an ASM diskgroup, DBAs have to monitor the ASM diskgroup for available space. You can compute the percentage of free information by dividing the value of the FREE_MB column with the value in the TOTAL_MB column of the V$ASM_DISKGROUP view. The shell script, dgmon_arch.ksh, computes the percentage of free space and sends a notification to the DBAs based on a given threshold. This script accepts three parameters: the alert notification threshold, the database name, and the diskgroup to which the archive logs are written. If the ASM diskgroup used space threshold exceeds the notification threshold, or if an ORA-00257 error is encountered, the DBAs will be notified according to the escalation procedures. # /bin/ksh # Filename: dgmon_arch.ksh export PAGE_THRESHOLD=$1 export DB=$2 export ARCH_DG=$3 # # [ ] Deleted Portion to reduce page count #
270
Oracle Data Guard 11g Handbook function exam_dg_threshold export PAGE_THRESHOLD=$1 sqlplus -s $CONNECT_STRING 2> 1 <<__ENDSQL whenever sqlerror exit sql.sqlcode; set set set set
pages lines verif trims
60 90 off on
col pct_free for 999.9 hea '%_FREE' define ORA_SID='$DB' define PAGE_THRESHOLD=$PAGE_THRESHOLD define LOG_DIR='$LOGDIR' spool $LOGFILE select name DG_NAME, total_mb/1024 GB, round(free_mb/total_mb,2)*100 pct_free from v $asm_diskgroup where round(free_mb/total_mb,2)*100 < PAGE_THRESHOLD and name=upper('$ARCH_DG'); spool off set pages 14 set lines 80 set verif on __ENDSQL grep "DG_NAME" $LOGFILE export RC1=$? grep ORA-00257 $LOGFILE export RC2=$? if [[ "$RC1" -eq 0 || "$RC2" -eq 0 ]]; then (( EMAIL_COUNTER = $ COUNTER + 1 )) # --------------------------------------------------------------# Set ALERT_COUNTER to be passed into alert_notification.ksh # --------------------------------------------------------------export ALERT_COUNTER=$EMAIL_COUNTER print "Sending dgmon Archive Destination alert ... $ALERT_COUNTER for $DB" $SH/alert_notification.ksh $ FN hostname $DB "" "ARCH: Alert#: $EMAIL_COUNTER for Archive Destination Disk Group Free < $PAGE_THRESHOLD percent " $LOGFILE # Increment the counter by one and append it to the LOGFILE filename (( COUNTER = $ COUNTER + 1 ))
Chapter 7:
Monitoring Data Guard Implementations
271
echo $COUNTER mv $ LOGFILE $ LOGFILE .$ COUNTER fi
#+++++++++++++++++++++++++++++++++++++++++++++++++++++ # MAIN LOGIC #+++++++++++++++++++++++++++++++++++++++++++++++++++++ #-------------------------------------------# Count the number of error files (LOGFILE) # in the /tmp directory #-------------------------------------------if [ -f $ LOGFILE .* ]; then export COUNTER=$(ls $ LOGFILE .* |wc -l) else COUNTER=0 fi #show_debug_parameters; #-----------------------------------------------------# If # of error files on disk is greater than # $MAX_NUMBER_ALERTS, then skip to the next database #-----------------------------------------------------if [ "$ COUNTER " -ge "$MAX_NUMBER_ALERTS" ]; then echo "Exceeded Max number of Alerts: $MAX_NUMBER_ALERTS" else exam_dg_threshold $PAGE_THRESHOLD; fi
This shell script addresses monitoring of the archive destination if the archive destination happens to be written to an ASM diskgroup. Feel free to download its counterpart, called archmon.ksh, to monitor the archive log destination if your archive logs are written to the file system from Oracle Press’s script repository or the Data Guard book web site.
Examining Apply Rate and Active Rate (PS) The recovery performance can easily be monitored in real time by querying the V$RECOVERY_ PROGRESS view as shown here: SELECT TO_CHAR(START_TIME, 'DD-MON-RR HH24:MI:SS') start_time, ITEM, SOFAR FROM V$RECOVERY_PROGRESS WHERE ITEM IN ('Active Apply Rate', 'Average Apply Rate', 'Redo Applied') /
272
Oracle Data Guard 11g Handbook The output of this query can be used to determine how fast the standby database is able to keep up with the primary database. One thing to consider while diagnosing the performance numbers is that the average apply rate includes the think time for waiting for the redo to arrive. The active apply rate is the calculation of redo applied over time based on a moving average during the last 3 minutes. Here’s a sample output of V$RECOVERY_PROGRESS: START_TIME -----------------------30-JUN-08 23:20:14 30-JUN-08 23:20:14 30-JUN-08 23:20:14
ITEM SOFAR -------------------------------- ---------Active Apply Rate 26953 Average Apply Rate 742 Redo Applied 843227
The Redo Applied value is measured in megabytes while the Active Apply Rate and Average Apply Rate are calculated in KB/sec. For this example, if you divide the output of 26953/1024 to determine the MB/sec, you derive an active apply rate of 26.12 MB/sec.
Reviewing Transport and Apply Lag (PS+LS) The V$DATAGUARD_STATS view provides information on how far behind the redo transport and redo apply processes are. Here’s an example of how to determine the delay in redo transport and apply processes on the physical standby: COL NAME FOR A13 COL VALUE FOR A20 COL UNIT FOR A30 SET LINES 122 SELECT NAME, VALUE, UNIT, TIME_COMPUTED FROM V$DATAGUARD_STATS WHERE NAME IN ('transport lag', 'apply lag'); NAME -------------apply lag transport lag
VALUE ------------+00 00:33:41 +00 00:01:18
UNIT -----------------------------day(2) to second(0) interval day(2) to second(0) interval
TIME_COMPUTED -------------------11-JUL-2008 11:20:13 11-JUL-2008 11:20:13
The transport lag value of 00:01:18 indicates that shipment of redo from the primary to the physical standby is behind by 1 minute, 18 seconds. In the event of a catastrophe on the primary, you stand to lose 1 minute, 18 seconds’ worth of data if you lose the primary site or have to wait 1 minute, 18 seconds if you want to perform a switchover. Notice the apply lag value of 33:41 indicating that the apply lag is more than 33 minutes behind. The apply lag value reflects the 30-minute DELAY attribute in the ARCHIVE_LOG_DEST_n parameter.
Do You Know Where Your Standby Database Is? Monitoring where your standby database is in relation to the redo generated on your primary database is paramount to knowing whether you are meeting your RPO at any given moment.
Chapter 7:
Monitoring Data Guard Implementations
273
Determining the Current Time on the Standby Database (PS) Another method for measuring how far behind your physical standby database is from your primary database is to convert the current SCN to timestamp with the SCN_TO_TIMESTAMP function. The current timestamp of the physical standby can be compared to the timestamp of the primary database to find the lag. You cannot convert the CURRENT_SCN to a timestamp on the physical standby. Attempting to convert the CURRENT_SCN on the physical standby will produce an ORA-00904 error: SELECT SCN_TO_TIMESTAMP(CURRENT_SCN) FROM V$DATABASE; * ERROR at line 1: ORA-00904: "SCN_TO_TIMESTAMP": invalid identifier
The CURRENT_SCN column of the V$DATABASE view of a physical standby database must be converted to a timestamp value on the primary database. Once the timestamp values of CURRENT_ SCN of both the primary and physical standby databases are available, the delay information of the physical standby relative to the primary database can be computed accurately. Note that the CURRENT_SCN column of an Active Data Guard standby database is actually the query SCN, the most current SCN that queries can access. The shell script dg_time_lag.ksh connects to the physical standby database, selects the CURRENT_SCN value from V$DATABASE, and stores the output in a log file. The content of the dg_time_lag.ksh script is shown here: export CONF=$PWD/dg.conf [ -f "$CONF" ] echo "Configuration file: $CONF is missing."; echo "Exiting."; exit 1; . $CONF export SYSPASSWD=$(cat .syspasswd) export DR_LOG=db_db.log export LOG=db.log [ -f $DR_LOG ] rm $DR_LOG [ -f $LOG ] rm $LOG echo "Printing Standby Current SCN and Primary Current SCN" echo "set echo off ver off feed off head off pages 0; select current_scn from v $database;" | sqlplus -s "sys/$ SYSPASSWD @$ STANDBY_HOST :$ STANDBY_PORT /$ STANDBY_DB sysdba" | tee $DR_LOG echo "set echo off ver off feed off head off pages 0; select current_scn from v $database;" | sqlplus -s "sys/$ SYSPASSWD @$ PRIMARY_HOST :$ PRIMARY_PORT /$ PRIMARY_DB sysdba" | tee $LOG echo ""
as
as
274
Oracle Data Guard 11g Handbook export DR_SCN=$(cat $DR_LOG |sed -e 's/ //g') export SCN=$(cat $LOG |sed -e 's/ //g') # Convert SCN to timestamp on the Primary DB echo "Printing Standby Current SCN To Timestamp and Primary Current SCN To Timestamp" echo "set echo off ver off feed off head off pages 0; select scn_to_timestamp(current_scn) from v $database;" | sqlplus -s "sys/$ SYSPASSWD @$ PRIMARY_HOST :$ PRIMARY_PORT /$ PRIMARY_DB sysdba" echo "set echo off ver off feed off head off pages 0; select scn_to_timestamp($ DR_SCN ) from dual;" | sqlplus -s "sys/$ SYSPASSWD @$ PRIMARY_HOST :$ PRIMARY_PORT /$ PRIMARY_DB sysdba" echo "set echo off ver off feed off col Primary for a32 col DR for a32 col wks for 999 col days for 9999 select scn_to_timestamp($ SCN ) Primary ,scn_to_timestamp($ DR_SCN ) DR ,trunc(to_number(substr((scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN )),1,instr(scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN ),' ')))/7) Wks ,trunc(to_number(substr((scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN )),1,instr(scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN ),' ')))) Days ,substr((scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN )),instr((scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN )),' ')+1,2) Hrs ,substr((scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN )),instr((scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN )),' ')+4,2) Mins ,substr((scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN )),instr((scn_to_timestamp($ SCN )scn_to_timestamp($ DR_SCN )),' ')+7,2) Secs from dual;" | sqlplus -s "sys/$ SYSPASSWD @$ PRIMARY_HOST :$ PRIMARY_PORT /$ PRIMARY_DB sysdba"
as
as
as
Let’s execute the dg_time_lag.ksh script on a Data Guard environment where the archive log gap has gone unresolved for an extended period of time. Executing dg_time_lag.ksh results in the following output: 822999 1000327 Printing Standby Current SCN To Timestamp and Primary Current SCN To Timestamp Standby Current SCN: 822999 Time Stamp: 15-JUL-08 08.28.34.000000000 PM Primary Current SCN: 1000327 Time Stamp: 08-JUL-08 12.47.49.000000000 AM
Chapter 7:
Monitoring Data Guard Implementations
275
[SC: Suggested Output]PRIMARY DR WKS DAYS HR MI SE ------------------------------- ------------------------------- ---- ---- -- -- -15-JUL-08 08.28.34.000000000 PM 08-JUL-08 12.47.49.000000000 AM 1 7 19 40 45
The output confirms that the physical standby is significantly behind the primary database. In terms of SCN comparisons, the output indicates that the physical database is behind by about 1 week, 7 days, 19 hours, 41 minutes.
Reporting the Status of Managed Recovery Process (PS) The V$MANAGED_STANDBY view reports the progress of the standby database in managed recovery mode. This view provides information regarding current activities for Redo Apply and Redo Transport Services. A separate set of views can be used to monitor SQL Apply. Processes that you repeatedly notice in the V$MANAGED_STANDBY view relative to the managed recovery process (MRP) include Media Recovery Process (MRP0), archiver process (ARCH), log writer (LGWR), Remote File Server (RFS), and LogWriter Network Service (LNS). You can execute the following SQL query to view the progress of each of the processes: SET LINES 132 SET PAGESIZE 9999 COL CLIENT_PID FORMAT A12 1 SELECT PID, PROCESS, STATUS, CLIENT_PROCESS, 2 CLIENT_PID, THREAD#, SEQUENCE# SEQ#, 3 BLOCK#, BLOCKS 4* FROM V$MANAGED_STANDBY SQL> /
Here’s a sample output of the V$MANAGED_STANDBY view where the MPR0 (the detached managed recovery process) is applying archive logs: PID
PROCESS
STATUS
CLIENT_P
----5489 5491 5493 5495 5660 23054 23064 23336
--------ARCH ARCH ARCH ARCH RFS MRP0 RFS RFS
------------ -------CONNECTED ARCH CONNECTED ARCH CONNECTED ARCH CONNECTED ARCH IDLE UNKNOWN APPLYING_LOG N/A IDLE UNKNOWN IDLE UNKNOWN
CLIENT PID -----5489 5491 5493 5495 20691 N/A 20687 20693
THREAD#
SEQ#
BLOCK#
BLOCKS
------0 0 0 0 0 1 0 0
---0 0 0 0 0 89 0 0
-----0 0 0 0 0 18423 0 0
-----0 0 0 0 0 24430 0 0
In this case, Redo Apply is in the process of applying the archive logs from a recent gap. The RFS process receives redo data from the primary database and writes it to the standby redo logs. The output of the query reveals that the Redo Apply process is currently applying archive log sequence 89 for thread 1. The last block that Redo Apply applied was block number 18423. A total of 24,430 512-byte blocks need to be applied. Lastly, the other processes, ARCH and RFS,
276
Oracle Data Guard 11g Handbook are idle, and you can see that no current connection exists with the primary for the current redo stream.
Data Guard Menu Utility The Data Guard monitoring scripts, DG Menu, are an interactive toolkit designed to help DBAs and architects assess the Data Guard configuration quickly and seamlessly. The purpose of DG Menu is to provide detailed reports so that the Data Guard implementation can be bulletproof. You can leverage the DG Menu to check your existing configuration for requirement compliance or to troubleshoot a configuration with issues. TIP NdjXVcYdlcadVYi]Z9ViV<jVgYbdc^idg^c\hXg^eih9<BZcj [gdbDgVXaZEgZhh¼hlZWh^iZdg[gdbi]^hWdd`¼hlZWh^iZVi lll#YViV\jVgYWdd`#Xdb#I]ZhXg^eihVgZegdk^YZY^cVh^c\aZ VgX]^kZY[^aZ^cVJC>MI6G[dgbVi#NdjXVcYdlcadVYi]ZY\#iVg[^aZ VcYZmigVXi^ijh^c\i]Z XdbbVcY#6hadc\Vhndj ]VkZVXXZhhidV`dgcdgWdjgcZh]ZaaVcYHFAEajh!ndjXVcZmZXjiZ 9<BZcj#6aai]Zbdc^idg^c\hXg^eihVgZZVh^anVXXZhh^WaZ[gdbi]Z ^c^i^VabZcjhXgZZc# The DG Menu utility uses a configuration file called dg.conf that defines the topology of the Data Guard environment. This configuration file can be modified to suit your needs. Here’s a sample dg.conf file: PRIMARY_HOST=rac3a PRIMARY_DB=DEV PRIMARY_PORT=1523 STANDBY_HOST=rac4a STANDBY_DB=DEVDR STANDBY_PORT=1523 # FLASH_DG=/u04/oradata/$ORACLE_SID/recovery_area DATA_DG=/u02/oradata DATA_DG2=/u03/oradata PRIMARY_DOMAIN=dbaexpert.com PRIMARY_VIP=rac3a-vip DR_VIP=rac4a-vip # Valid entries for FS=FS for file system or ASM for automated storage management FS=FS FS=FS [SC: suggest to spell FILE_SYSTEM for clarity]
In the dg.conf file, you define the primary database server (PRIMARY_HOST), the primary database (PRIMARY_DB), and the database listener port (PRIMARY_PORT). Furthermore, you define the standby database server (STANDBY_HOST), the standby database (STANDBY_DB), and the standby database listener port (STANDBY_PORT).
Chapter 7:
Monitoring Data Guard Implementations
277
Optionally, you can define the SYS password in the .syspasswd file. If the .syspasswd file does not exist, you will be prompted to enter the SYS password. Since this is a client application, you should provide the SYS password even to diagnose the primary database configuration. For security considerations, the .syspasswd file is an optional file that is provided at your discretion. It is a simple matter of convenience to include an entry for the .syspasswd file. To run DG Menu, only an Oracle client with SQL*Plus is required. Even the instant client with SQL*Plus is adequate to launch DG Menu. DG Menu does not use a TNSNAMES.ORA file. NOTE >[ndjlVciidZmZXjiZ9<BZcj[gdbi]ZB^Xgdhd[iL^cYdlh Zck^gdcbZci!ndjXVcYdlcadVYVcY^chiVaa8NClll#Xn\l^c #dg\dgJC>MHZgk^XZh[dgL^cYdlh[gdbB^Xgdhd[i¼hlZWh^iZ#
Reviewing the Current Data Guard Environment The DG Menu toolkit includes shell scripts that execute SQL or that run behind the scenes to diagnose a Data Guard configuration. Each of the shell scripts executes SQL*Plus to gather pertinent information from the database. More than half the scripts have been converted to PL/SQL for friendly output purposes. The shell scripts leverage the SYS account to log in to the primary and standby databases. The optional password file, .syspasswd, can be updated to automate the login to the primary and standby databases. NOTE I]Zhjeea^ZY9<BZcjYdZhcdi^hhjZVcn9ViV9Z[^c^i^dcAVc\jV\Z 99Adci]ZYViVWVhZ#Dcan ELE hiViZbZcihVgZ^hhjZY V\V^chigZaZkVciV$VcY A k^ZlhidZmigVXi9ViV<jVgY·gZaViZY ^c[dgbVi^dc# The SYSDBA role is required simply because the SQL*Plus connection must be established to the physical standby database, which is in mounted mode. The DG Menu checks the following components and more: N
The existence of a password file is checked in both the primary and standby databases.
N
SYSDBA role is granted to the SYS system account.
N
Forced logging is enforced on the primary database.
N
Unrecoverable activities on the primary database are closely scrutinized.
N
The primary database runs in archive log mode.
N
The existence of standby redo logs is checked on both the primary and standby databases.
N
The existence of TNSNAMES.ORA file entries is checked for both the primary and standby databases.
N
Standby file management is set to AUTO.
278
Oracle Data Guard 11g Handbook You can invoke the DG Menu by typing ./dg in the directory where you have extracted the dg.tar archive. Each of the menu items executes a submenu command via SQL*Plus or another shell script. Here’s an example of the DG Menu UI: # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
------------------------------------------------------------------------- # # Data Guard Check List - DBA.local
0. Review database information and status 1. Check for password file 2. Check for forced logging and unrecoverable activities ------------------------------------------------------------------------3. Check for archive log mode 4. Check for standby redo logs 5. Check current SCN on primary and standby databases 6. Check archive log destinations ------------------------------------------------------------------------7. Check Data Guard Status View for errors and fatal messages 8. Check Managed Recovery Process Status 9. Check for missing archive logs 10. Check archive log gaps on the standby database 11. Check average apply rate / active apply rate 12. Check transport / apply lag 13. How far behind is my Data Guard in terms of time? ------------------------------------------------------------------------20. Launch the Logical Standby Data Guard Submenu ------------------------------------------------------------------------21. Generate init.ora entries for primary database 22. Generate init.ora entries for standby database 23. Generate tnsnames.ora entries for primary and standby databases 24. Generate SQL syntax to create standby redo logs ------------------------------------------------------------------------30. Generate syntax to duplicate standby database from active database x. Exit -------------------------------------------------------------------------
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
NOTE >ci]ZgZbV^cYZgd[i]^hX]VeiZg!lZl^aaY^hXjhh^cY^k^YjVaX]ZX`a^hi bZcj^iZbhd[i]Z9<BZcjhiVgi^c\l^i]X]ZX`^c\i]ZeVhhldgY[^aZ# Cdi^XZi]Videi^dc'%l^aa^ckd`ZVad\^XVahiVcYWn9<hjWbZcj#I]Z ad\^XVahiVcYWn9<hjWbZcjXVchVkZndj]djghd[igdjWaZh]ddi^c\" gZaViZYZ[[dgih#
Checking the Password File (PS+LS) If DG Menu is launched from the database server, it checks for the existence of the password file in the $ORACLE_HOME/dbs directory. If DG Menu is launched from the client, it will not check for the password file. DG Menu compares the local hostname to the PRIMARY_HOST and the
Chapter 7:
Monitoring Data Guard Implementations
279
STANDBY_HOST defined in the dg.conf file. If the local hostname matches either the PRIMARY_HOST or the STANDBY_HOST, the orapw$ORACLE_SID file will be expected in the $ORACLE_HOME/dbs
directory as specified here: ls -l $ ORACLE_HOME /dbs/orapw$ ORACLE_SID rc=$? if [ "$rc" -ne 0 ]; then echo "Password file for your database: $ORACLE_SID does not exist " echo "Please create a password file using the orapwd utility" [ ]
Not only does Data Guard require a password file, but it also expects SYS to be granted the SYSDBA role. The V$PWFILE_USERS data dictionary view provides detailed information on database accounts that have been granted the SYSDBA and/or SYSOPER roles: SELECT * FROM V$PWFILE_USERS;
Checking for Nologging Activities (PS+LS) As discussed in Chapter 3, the impact of allowing nologging operations on your primary database can be immense when you have to failover to your standby database. Although forced logging should be mandated at the database level, your performance requirements may dictate that you use forced logging at the tablespace level instead. If the database forced logging is enabled, all nologging activities will be logged. Users who issue NOLOGGING transactions may think that they have completed successful NOLOGGING transactions, but behind the scenes, Oracle logs the transaction. Forced logging at the database level trumps all other levels of NOLOGGING settings or transactions. We strongly recommend that you set up forced logging at the database level. If you do not do so, you can set the forced logging option at the tablespace level by using the FORCE LOGGING clause. By default, all tablespaces are created with the logging option enabled but with forced logging disabled. All newly created tablespaces should always be created with the forced logging feature if database logging is not forced. NOLOGGING activities are speculated to increase performance throughput, so users often prefer to trade the benefits of performance for risk of corruption on the standby database. DBAs should be cognitive of tablespaces that allow NOLOGGING activities. Just as important, DBAs should check for NOLOGGING activities at the datafile level. The script shown here checks for tablespaces in NOLOGGING mode and datafiles with NOLOGGING activity such as SQL*Loader or index rebuilds with the NOLOGGING option enabled: set serveroutput on size 1000000 set feed off ver off pages 0 lines 2000 trims on DECLARE cursor c1 is select file#, name, unrecoverable_change#, to_char(unrecoverable_time, 'DD-MON-RR HH24:MI:SS') unrecoverable_time from v$datafile where unrecoverable_time is not null; cursor c2 is
280
Oracle Data Guard 11g Handbook select tablespace_name, logging ,status from dba_tablespaces where logging='NOLOGGING' and contents > 'TEMPORARY'; BEGIN dbms_output.put_line('Checking for datafiles with unrecoverable activities'); FOR r1 in c1 loop dbms_output.put_line('FOUND ... File Name: ' r1.name ' - ' 'Unrecoverable Time: ' r1.unrecoverable_time); END LOOP; dbms_output.put_line('Checking for tablespace(s) that are not being logged'); FOR r2 in c2 LOOP dbms_output.put_line('FOUND ... Tablespace Name: ' r2.tablespace_name ' ' 'Logging: ' r2.logging); END LOOP; END; /
Here’s a sample output with several datafiles with NOLOGGING activities: Checking for forced logging at the database level # ------------------------------------------------------------------------- # # Executing dg_check_unrecoverable.sql on DB: DEV # ------------------------------------------------------------------------- # Checking for datafiles with unrecoverable activities FOUND ... File Name: /u04/oradata/Matrix_DR0/docs_i_01.dbf - Unrecoverable Time: 04-JUL-08 14:25:45 FOUND ... File Name: /u02/oradata/Matrix_DR0/kb_d_01.dbf - Unrecoverable Time: 04-JUL-08 14:27:39 FOUND ... File Name: /u04/oradata/Matrix_DR0/sox_i_01.dbf - Unrecoverable Time: 04-JUL-08 14:27:39 Checking for tablespace(s) that are not being logged FOUND ... Tablespace Name: USERS - Logging: NOLOGGING
When checking for unrecoverable activities that can invalidate your standby database, you need to note the date of the unrecoverable activity. If the date of the unrecoverable activity occurred after the database restore of your standby database, you must recopy the datafile(s) in question or perform an incremental backup on the primary database based on the SCN and apply the incremental backup on the physical standby database. For detailed instructions on how to perform an SCN-based incremental backup to apply on the standby database, refer to Chapter 13. If you do not specify forced logging at the database level, you should carefully consider the risk implications. If for some reason you choose to disable forced logging at the database level, we strongly recommend forced logging at the tablespace level for all the tablespaces that are not designated for the NOLOGGING activities, or you risk data corruption on the standby database. For example, your company may drop and/or re-create materialized views on the OLTP database on a nightly basis. In addition to the materialized view reinstantiation, you also need to re-create all the indexes associated with the materialized view. At the same time, you discovered that by
Chapter 7:
Monitoring Data Guard Implementations
281
adding the NOLOGGING option for creating the materialized views and indexes, you can save three to four hours of processing time. In such situations, you may consider specifying one or two tablespaces for the NOLOGGING activities and set forced logging for the remaining tablespaces in the database. To set the tablespace at FORCE LOGGING mode, you can use the FORCE LOGGING clause shown here: 1* CREATE TABLESPACE DATA_FORCE 2 DATAFILE '+DATA' SIZE 1M LOGGING FORCE LOGGING; Tablespace created.
For demonstration purposes, we will create a tablespace with the NOLOGGING option for the tablespace designated for unrecoverable activities: 1* 2
CREATE TABLESPACE DATA_NOLOG DATAFILE '+DG_DBA_DD501' SIZE 1M NOLOGGING;
Tablespace created.
You can see from the following SQL output that the FORCE_LOGGING column of the DBA_TABLESPACES view indicates that forced logging is enabled for the DATA_FORCE tablespace we just created. On the other hand, you can also see that the DATA_NOLOG tablespace is set to NOLOGGING, which means that data in this tablespace will not be available after you open the database in the standby database. SQL> SELECT TABLESPACE_NAME, LOGGING, FORCE_LOGGING FROM DBA_TABLESPACES; TABLESPACE_NAME LOGGING FOR ------------------------------ --------- --SYSTEM LOGGING NO UNDOTBS1 LOGGING NO SYSAUX LOGGING NO TEMP NOLOGGING NO USERS LOGGING NO TOOLS LOGGING NO EGG_WHITE_D LOGGING NO DATA_FORCE LOGGING YES DATA_NOLOG NOLOGGING NO
In addition to monitoring for NOLOGGING at the database and tablespace levels, you should also monitor for NOLOGGING settings at the object level—objects that need to be monitored are tables and indexes. Tables should always be kept in logging mode. Indexes should also be kept in logging mode even though they can be rebuilt on the standby database after the database is opened. You can issue the following query to determine all the tables that are currently in NOLOGGING mode: 1 2 3
SELECT OWNER '.' TABLE_NAME, LOGGING FROM DBA_TABLES WHERE LOGGING ='NO' AND OWNER NOT IN ('SYS', 'SYSTEM', 'EXFSYS', 'WMSYS', 'MDSYS', 'OLAPSYS', 'DBSNMP') 4* ORDER BY OWNER, TABLE_NAME SQL> /
282
Oracle Data Guard 11g Handbook TABLE_NAME LOG ----------------------------------------------------------------- --RODBA.EDBA_NOROWS NO
To disable NOLOGGING at the table level, you can issue this command: ALTER TABLE RODBA.EDBA_NOROWS LOGGING;
As mentioned earlier, you should also scrutinize the indexes for NOLOGGING settings. You can use the following query to determine what indexes are configured for nologging activities: SQL> SELECT OWNER '.' INDEX_NAME INDEX_NAME, LOGGING 2 FROM DBA_INDEXES 3 WHERE LOGGING ='NO' 4 AND OWNER NOT IN ('SYS', 'SYSTEM', 'EXFSYS', 5 'WMSYS', 'MDSYS', 'OLAPSYS', 'DBSNMP') 6 / INDEX_NAME LOG ----------------------------------------------------------------- --TSMSYS.SRSIDX NO
Although indexes can be rebuilt, and you may be tempted to disable logging at the index level, you do not want to be in a situation where you are rebuilding the standby database after a switchover/failover condition. Indexes on large tables can take several to many hours to rebuild. Although we mentioned how you can check for NOLOGGING activities at the tablespace, datafile, and even object levels, the best recommendation that we can make to you is to enable forced logging at the database level. Enforcing database-level logging keeps everything simple.
Looking at Archivelog Mode and Destinations (PS+LS) A required prerequisite to implement a physical or logical Data Guard standby is that the database must be running in archive log mode. The DG Menu checks for archive log mode and archive log destinations for errors. During the probe of archive log destinations, relevant information such as archive log destination, archive log status, and error messages are revealed. Starting with Oracle Database 11g, Oracle provides the redo compression feature for Data Guard. If your company happens to use the new technology, you can confirm that compression of archive logs is enabled during transmission when Data Guard is resolving a gap. The following script checks the two views, V$ARCHIVE_DEST_STATUS and V$ARCHIVE_DEST, and provides pertinent information related to archive destinations: SET SET COL COL SET
SERVEROUTPUT ON SIZE 1000000 LINES 132 ERROR FORMAT A32 DESTINATION FORMAT A35 VER OFF HEAD OFF FEED OFF PAGES 0
DECLARE pad10 CHAR(10) := ' '; CURSOR c1 is select s.db_unique_name, s.database_mode,
Chapter 7:
Monitoring Data Guard Implementations
283
s.dest_id id, s.status stats, s.recovery_mode, s.protection_mode, s.standby_logfile_count, s.standby_logfile_active, s.archived_thread#, s.archived_seq#, s.applied_thread#, s.applied_seq#, d.status, d.destination, d.archiver, d.transmit_mode, d.affirm, d.async_blocks, d.net_timeout, d.delay_mins, d.reopen_secs, d.register, d.binding, d.compression, d.error err from v$archive_dest_status s, v$archive_dest d where d.dest_id=s.dest_id and s.db_unique_name > 'NONE' and d.destination is not null; BEGIN dbms_output.put_line('-----------------------------------------------------'); FOR r1 IN c1 LOOP dbms_output.put_line('Dest ID: ' r1.id pad10 'Status: ' r1.stats); dbms_output.put_line('DB Name: ' r1.db_unique_name pad10 'DB Mode: ' r1.database_mode); dbms_output.put_line('Recovery Mode: ' r1.recovery_mode); dbms_output.put_line('Protection Mode: ' r1.protection_mode); dbms_output.put_line('SRL Count: ' r1.standby_logfile_count pad10 'SRL Active: ' r1.standby_logfile_active); dbms_output.put_line('Archived Thread#: ' r1.archived_ thread# pad10 'Archived Seq#: ' r1.archived_seq#); dbms_output.put_line('Applied Thread#: ' r1.applied_ thread# pad10 'Applied Seq#: ' r1.applied_seq#); dbms_output.put_line('Destination: ' r1.destination); dbms_output.put_line('Archiver: ' r1.archiver); dbms_output.put_line('Transmit Mode: ' r1.transmit_mode); dbms_output.put_line('Affirm: ' r1.affirm); dbms_output.put_line('Asynchronous Blocks: ' r1.async_blocks); dbms_output.put_line('Net Timeout: ' r1.net_timeout); dbms_output.put_line('Delay (Mins): ' r1.delay_mins); dbms_output.put_line('Reopen (Secs): ' r1.reopen_secs); dbms_output.put_line('Register: ' r1.register); dbms_output.put_line('Binding: ' r1.binding); dbms_output.put_line('Compression: ' r1.compression); dbms_output.put_line('Error: ' r1.err); dbms_output.put_line('----------------------------------------------------'); END LOOP; END; /
284
Oracle Data Guard 11g Handbook The script is intentionally written in PL/SQL to provide easier readability. In addition to the COMPRESSION column, you should pay particular attention to the ERROR column from the V$ARCHIVE_DEST view.
Checking Standby File Management (PS) Standby file management should be enabled as part of Data Guard best practices. Standby file management enables automatic file creation or deletion on the physical standby when files are added or dropped on the primary database. The files are created based on the value set in the DB_ FILE_NAME_CONVERT initialization parameter. Use the following query to verify that the physical standby has standby file management enabled: COL NAME FOR A33 COL VALUE FOR A10 SELECT NAME, VALUE FROM V$PARAMETER WHERE NAME='standby_file_management';
A value set to AUTO indicates that standby file management is enabled, as shown here: NAME VALUE --------------------------------- ---------standby_file_management AUTO
If this parameter is not set, or it accidentally becomes unset, and a datafile is added to the primary database, it is possible that you will encounter an “ORA-1274: cannot add datafile ‘%s’ – file could not be created” error. The datafile will not be generated on the standby file system, but an entry will be added to your standby control file that refers to this datafile as an UNNAMEDxxx file. To remedy this, you will have to add the missing datafile manually.1 Here’s an example: SQL> SQL> 2 3 4
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=MANUAL; ALTER DATABASE CREATE DATAFILE '…/dbs/UNNAMED00007' AS '…/realfilename/';
Revealing Errors in the Data Guard Status View (PS) The V$DATAGUARD_STATUS view identifies events that write error messages to the alert log file and/or generate trace files associated with the error. This view reveals information about all the severities including informational messages, but only for the last 256 Data Guard–related messages written to the alert log file. The MESSAGE column may provide more information than you need. DBAs can restrict the output of messages to the important ones by qualifying the CALLOUT column with a value of YES. A YES value indicates that a DBA intervention may be required.
1
See MetaLink Note 388659.1: ORA-1274 Encountered on Physical Standby After Adding Datafile to Primary, and MetaLink Note 304488.1: Using standby_file_management with Raw Devices.
Chapter 7:
Monitoring Data Guard Implementations
285
Here’s a code example of querying the V$DATAGUARD_STATUS view and restricting the output that requires a DBA response: SET LINES 132 COL MESSAGE FOR A80 COL TIMESTAMP FOR A20 SELECT ERROR_CODE, SEVERITY, MESSAGE, TO_CHAR(TIMESTAMP, 'DD-MON-RR HH24:MI:SS') TIMESTAMP FROM V$DATAGUARD_STATUS WHERE CALLOUT='YES' AND TIMESTAMP > SYSDATE-1;
Valid values for the SEVERITY column are Informational, Warning, Error, Fatal, and Control. You also want to restrict the output depending on how far back you would like to see by qualifying the TIMESTAMP column.
Logical Standby Data Guard Menu The remainder of the chapter is dedicated to logical standby monitoring. We hope to provide you a comprehensive toolkit to monitor a logical standby configuration. We are releasing a full screen’s worth of logical standby monitoring scripts. From the tar extract, you can easily determine what is related to the logical standby monitoring versus the physical standby monitoring scripts. All the scripts that start with dg_ prefix are associated with the physical standby database. Note that quite a few of the scripts that were intended for the physical standby are applicable to the logical standby database as well. All the shell scripts and SQL scripts that pertain to the logical standby monitoring start with the logical_ prefix. From the main DG menu screen, menu option 20 invokes the logical standby DG submenu. By invoking task option 20, you will invoke the dg_logical_menu.ksh shell script. You can optionally invoke this shell script independently to access the logical standby menu options directly. The logical standby screen provides specific options to monitor and assist you in troubleshooting the logical standby database. For demonstration purposes, we will directly execute the logical standby DG submenu. Here’s the UI of the logical standby DG submenu: ./dg_logical_menu.ksh # ------------------------------------------------------------------------# # Logical Standby Data Guard Check List - DBA.local # # 1. Check Logical Progress - View Overall Progress Of SQL Apply # 2. Check Logical Events - History on Logical Standby Apply Activity # 3. Check Logical Events - Detailed View # 4. Check Logical Stats - Logical Standby Stats # 5. Check Logical Parameters - Logical Standby Parameters # 6. Look At What The Logical Standby Processes Are Doing # Coordinator, Reader, Builder, Preparer, Analyzer, Applier ... # 7. Look At The Status Codes For The Logical Standby Processes # 8. Look At Events The Applier Process Is Stuck On # -------------------------------------------------------------------------
# # # # # # # # # # # # #
286
Oracle Data Guard 11g Handbook # # # # # # # # # # # # # # # # # #
10. 11.
Check the LCR - Look At Bytes Paged Out Generate Syntax To Skip Transactions Based On MAX(EVENT_TIME) FROM DBA_LOGSTDBY_EVENTS DO NOT SKIP DML STATEMENTS 12. Diagnostic Script Per Metalink Note ID: 241512.1 Look for output in logical_diag_[ORACLE_SID_MONDD_HHMM.out] format ------------------------------------------------------------------------20. Review What Is NOT Supported In Your Logical Standby Database
# # # # # # # # # ------------------------------------------------------------------------- # 30. Start Logical Standby Database # 40. Stop Logical Standby Database - PLEASE BE CAREFUL # THIS WILL STOP THE LOGICAL STANDBY APPLY PROCESS # ------------------------------------------------------------------------- # # x. Exit # ------------------------------------------------------------------------- # Enter Task Number:
Each of the menu options can be invoked by typing the corresponding numeric value and pressing ENTER. At the end of execution of each script, you will be presented with a message to press any key to continue. Simply pressing any key will re-invoke the DG submenu.
Checking the Progress Our first menu option in the logical standby DG submenu exposes all the relative information about how far the logical standby database has progressed. Here’s sample output from the first menu option: 1 # ----------------------------------------------------------------------- # # Executing logical_progress.sql on DB: MATRIXRT # ----------------------------------------------------------------------- # Session altered. APPLIED_SCN LATEST_SCN MINING_SCN RESTART_SCN ----------- ---------- ---------- ----------6590562696 6590562726 6590562700 6590562699 APPLIED_TIME RESTART_TIME LATEST_TIME ------------------ ------------------ -----------------06-apr-09 01:00:48 06-apr-09 01:00:49 06-apr-09 01:00:52 Your Apply Lag ---------------------------------------------------------------+000000000 00:00:04.000000000 Your Standby Redo Lag ---------------------------------------------------------------+000000000 00:00:01.000000000
Chapter 7:
Monitoring Data Guard Implementations
287
You can see from the output that the SQL Apply is only 4 seconds behind the newest SCN recorded in the standby redo logs. The output shown here provides information regarding SCN and time in seconds. The most important aspect of monitoring the logical standby is to compare the APPLIED_TIME relative to the LATEST_TIME. In addition, we compare the LATEST_TIME with the system time to review how fast the standby redo logs are being updated. NOTE LZgZXdbbZcYi]ViWdi]i]Zeg^bVgnVcYi]ZhiVcYWnYViVWVhZ hZgkZgh¼i^bZ^hhncX]gdc^oZYl^i]i]Vid[i]ZCIEhZgkZg# As a final output, we save you from calculating the delta between the LATEST_TIME and the APPLIED_TIME with the NUMTODSINTERVAL function. You can see from the following queries how the output is being determined: ALTER SESSION SET NLS_DATE_FORMAT='dd-mon-rr hh24:mi:ss'; SELECT APPLIED_SCN, LATEST_SCN, MINING_SCN, RESTART_SCN FROM V$LOGSTDBY_PROGRESS; SELECT APPLIED_TIME, RESTART_TIME, LATEST_TIME FROM V$LOGSTDBY_PROGRESS / SELECT NUMTODSINTERVAL(LATEST_TIME - APPLIED_TIME,'day') FROM V$LOGSTDBY_PROGRESS; SELECT NUMTODSINTERVAL(SYSDATE - LATEST_TIME,'day') FROM V$LOGSTDBY_PROGRESS;
"Your Apply Lag"
"Your Standby Redo Lag"
The view V$LOGSTDBY_PROGRESS provides the single insight into how well the logical standby is keeping up with the primary database. As someone who has to support a logical standby database in a reporting environment, you may have a stringent requirement that the reporting database server (logical standby database) be at least in sync with the primary database by a margin of 15 minutes or so. In some cases, the expectation can be that the reporting database must be in sync with the primary database in almost real time. Even though we can implement the logical standby with the Maximum Protection or Maximum Availability option, SQL Apply still must be able to keep up with the latest SCN written to the standby redo logs. You should monitor your reporting database server on a regular basis to see if your reporting requirements are satisfied. During peak hours, you should monitor the reporting database server to see if SQL Apply can keep in sync. Following is a simple shell script called logical_check_every_5min.ksh that wakes up every 5 minutes and appends entries to two log files: logical_progress.log and logical_metalink.log. You can review two log files and determine whether you are able to satisfy your corporate reporting needs. If you cannot accommodate the SQL Apply rate that you are expecting, you may need to set and tune relevant initialization parameters and logical standby attributes. Review Chapter 4 for additional details on logical standby performance tuning. You should kick off the logical_check_every_5min.ksh script in the background with the nohup option as shown here: nohup logical_check_every_5min.ksh > /tmp/ logical_check_every_5min.log 2> 1
288
Oracle Data Guard 11g Handbook Here’s the complete shell script for you to review: cat logical_check_every_5min.ksh echo "CURRENT_TIME APPLIED APPLIED_TIME RESTART RESTART_TIME LATEST LATEST_TIME" >>logical_progress.log echo " SCN SCN SCN ">>logical_progress.log echo "------------------ ----------- ------------------ --------------------------- ---------- ------------------" >>logical_progress.log while true do echo " col applied_time for a18 col restart_time for a18 col latest_time for a18 col current_time for a18 set echo off ver off head off feed off lines 255 pages 0 trims on SELECT to_char(sysdate, 'dd-mon-rr hh24:mi:ss') current_time, APPLIED_SCN, to_ char(APPLIED_TIME, 'dd-mon-rr hh24:mi:ss') APPLIED_TIME, RESTART_SCN, to_char(RESTART_TIME, 'dd-mon-rr hh24:mi:ss') RESTART_TIME, LATEST_SCN, to_char(LATEST_TIME, 'dd-mon-rr hh24:mi:ss') LATEST_TIME FROM V $LOGSTDBY_PROGRESS; " sqlplus -s / as sysdba > logical_progress_temp.log cat logical_progress_temp.log >> logical_progress.log sleep 300; done
Shown next is a sample output of the logical_progress.log file. The shell script will append an entry into this file every 5 minutes. You can compare the LATEST_TIME and the APPLIED_TIME columns to determine whether SQL Apply is keeping up. Likewise, you can compare the CURRENT_TIME and LATEST_TIME columns to see if any latencies are of concern. CURRENT_TIME LATEST
APPLIED LATEST_TIME SCN
SCN ------------------ -------------------- -----------------05-apr-09 08:32:31 6590373143 6590373160 05-apr-09 08:32:27 05-apr-09 08:37:31 6590373844 6590373852 05-apr-09 08:37:31 05-apr-09 08:42:31 6590374530 6590374558 05-apr-09 08:42:31 05-apr-09 08:47:32 6590375156 6590375205 05-apr-09 08:47:31
APPLIED_TIME
RESTART
RESTART_TIME
SCN ------------------
---------- ------------------
05-apr-09 08:32:18
6590373144 05-apr-09 08:32:18
05-apr-09 08:37:25
6590373845 05-apr-09 08:37:25
05-apr-09 08:42:13
6590374531 05-apr-09 08:42:13
05-apr-09 08:47:07
6590375157 05-apr-09 08:47:07
289 05-apr-09 08:52:32 6590375931 05-apr-09 08:52:13 6590375956 05-apr-09 08:52:31 05-apr-09 08:57:32 6590376581 05-apr-09 08:57:23 6590376594 05-apr-09 08:57:29 …
6590375932 05-apr-09 08:52:13 6590376582 05-apr-09 08:57:23
Checking for Events You can obtain the history on logical standby apply activity by querying the DBA_LOGSTDBY_EVENTS view. This view can provide relevant information to determine the root cause of failures that occur when applying redo data to the logical standby database. Here’s a simple query against the DBA_LOGSTDBY_EVENTS view ordered by the event time and the order it was committed on the primary database: cat logical_events.sql ALTER SESSION SET NLS_DATE_FORMAT
= 'DD-MON-YY HH24:MI:SS';
SET LONG 999999 SET LINES 255 COLUMN STATUS FORMAT A60 SELECT EVENT_TIME, STATUS, EVENT FROM DBA_LOGSTDBY_EVENTS ORDER BY EVENT_TIMESTAMP, COMMIT_SCN;
Execution of this script yields the following results: EVENT_TIME STATUS EVENT ------------------ -------------------------------------------------------------------------------------------------------------------------------17-MAR-09 22:15:37 ORA-16226: DDL skipped due to lack of support alter database backup controlfile to '/apps/oracle/admin/MATRIX/bkups/control01_ MATRIX1_17Mar09_1818.ctl.bkup' 18-MAR-09 01:00:44 ORA-16226: DDL alter database backup controlfile 18-MAR-09 01:00:44 ORA-16226: DDL alter database backup controlfile MATRIX_18Mar09_0100.ctl.bkup'
skipped due to lack of support to trace skipped due to lack of support to '/apps/oracle/admin/MATRIX/bkups/control01_
18-MAR-09 08:22:00 ORA-16226: DDL skipped due to lack of support -- Create database link create public database link DBATOOLS connect to rodba_web identified by **********using 'DBATOOLS'
290
Oracle Data Guard 11g Handbook 18-MAR-09 08:45:47 ORA-02019: connection description for remote database not found CREATE OR REPLACE VIEW V_WEB_DOCS (DOC_ID, DOC_TIMESTAMP, DESCRIPTION, CREATED, FILE_NAME, CONTENT, DOC_TYPE) AS SELECT /*+ first_rows */ DOC_ID, DOC_TIMESTAMP, DESCRIPTION, CREATED, FILE_NAME, CONTENT, DOC_TYPE FROM DOCUMENTS
By default, only the last 100 records are stored in the DBA_LOGSTDBY_EVENTS view. You can change the amount of history that is preserved with the DBMS_LOGSTDBY.APPLY_SET package procedure. In the preceding output, you can determine that the root cause of the failures on the logical standby database was the CREATE DATABASE LINK command. Since the CREATE DATABSE LINK command is skipped in the logical standby database, all subsequent CREATE VIEW commands failed. You can also see that the command ALTER DATABASE BACKUP CONTROL is also skipped on the logical standby database. For a complete list of unsupported commands, review Chapter 4. On the logical standby DG submenu, the option to check the detailed view of the events displays all the columns of the DBA_LOGSTDBY_EVENTS view. In particular, the columns in which we are interested are XIDUSN (Transaction ID undo segment number), XIDSLT (Transaction ID slot number), XIDSQN (Transaction ID sequence number), and STATUS_CODE (Oracle error code associated with the STATUS message).
Checking Stats Valuable SQL Apply information such as LogMiner statistics, current state, and status information on the logical standby database can be obtained by querying the V$LOGSTDBY_STATS view. The V$LOGSTDBY_STATS view also exposes the custom logical standby options set by the DBMS_ LOGSTDBY.APPLY_SET procedure including the default values. In addition, you can compare the values for transactions applied and transactions ready to determine whether transactions are being applied as fast as they are being read. Executing the option to check the stats from the logical standby DG Submenu yields the following results: # Enter Task Number: 4 # ----------------------------------------------------------------------- # # Executing logical_stats.sql on DB: MATRIXRT # ----------------------------------------------------------------------- # NAME ----------------------------------number of preparers number of appliers maximum SGA for LCR cache parallel servers in use maximum events recorded preserve commit order
VALUE ---------------------------------------4 20 1500 27 100 FALSE
Chapter 7: transaction consistency record skip errors record skip DDL record applied DDL record unsupported operations coordinator state transactions ready transactions applied coordinator uptime realtime logmining apply delay Log Miner session ID txns delivered to client DML txns delivered DDL txns delivered CTAS txns delivered Recursive txns delivered Rolled back txns seen LCRs delivered to client bytes of redo processed bytes paged out … … 33 rows selected.
Monitoring Data Guard Implementations
291
NONE Y Y N N IDLE 8711 8711 200488 Y 0 1 95226 22860 323 77 72043 23019 357570 552773192 0
In this environment, you can see that attributes for maximum SGA, preparers, appliers, and commit order have been customized to suit the high amount of transactions on the reporting database.
Checking the Logical Standby Parameters The DBA_LOGSTDBY_PARAMETERS view provides a list of parameters used by SQL Apply on the logical standby database. Querying on the NAME and VALUE columns, you can ascertain miscellaneous options and settings on the logical standby. Menu option 5 provides a complete output of the DBA_LOGSTDBY_PARAMETERS view: # Enter Task Number: 5 # ----------------------------------------------------------------------- # # Executing logical_parameters.sql on DB: MATRIXRT # ----------------------------------------------------------------------- # NAME --------------------------------APPLY_SCN APPLY_SERVERS FIRST_SCN GUARD_STANDBY LMNR_SID LOG_AUTO_DELETE
VALUE --------------------------------6557897644 20 6557896604 READY 1 FALSE
292
Oracle Data Guard 11g Handbook MAX_SERVERS MAX_SGA PREP_DICT_RECEIVED PRESERVE_COMMIT_ORDER PRIMARY _SYNCPOINT_INTERVAL
27 1500 FALSE 1135258887 4294967295
12 rows selected.
Checking the Logical Standby Processes You can query the DBA_LOGSTDBY_PROCESS view to analyze the current state of each of the SQL Apply processes. During the log mining process, the READER process reads redo records from the standby redo logs or archive logs, the PREPARER process converts the block records into logical change records (LCR), and the BUILDER process groups the LCRs into transactions and manages the LCR cache in the shared pool of the system global area (SGA). As you can see in the following output, you can have multiple PREPARER processes. Also, you will notice that an ORA-16116 error message appears in the STATUS column indicating that there is no work for the processes: # Enter Task Number: 6 # ----------------------------------------------------------------------- # # Executing logical_process.sql on DB: MATRIXRT # ----------------------------------------------------------------------- # TYPE SID SERIAL# LID SPID HIGH_SCN STATUS ------------ ----- ------- ----- ------- ---------- --------------------------COORDINATOR 248 1 -1 31451 6590542563 ORA-16116: no work available READER 245 1 0 31454 6590542573 ORA-16116: no work available BUILDER 246 1 1 31456 6590542573 ORA-16116: no work available PREPARER 244 1 2 31458 6590542401 ORA-16116: no work available PREPARER 241 1 3 31460 6590542542 ORA-16116: no work available PREPARER 243 1 4 31462 6590542500 ORA-16116: no work available PREPARER 242 1 5 31464 6590542506 ORA-16116: no work available ANALYZER 237 1 6 31466 6590542542 ORA-16116: no work available APPLIER 238 1 7 31468 6590542509 ORA-16116: no work available APPLIER 236 1 8 31470 6590540298 ORA-16116: no work available APPLIER 235 1 9 31472 6590512759 ORA-16116: no work available … …
During the apply phase, the ANALYZER process identifies dependencies; the COORDINATOR process, also known as the LSP process, assigns and coordinates transactions to different APPLIER processes; and the APPLIER process applies transactions to the logical standby database. Again, you will notice multiple numbers of APPLIERS in the preceding output. Here’s the simple query to view the logical standby processes: COLUMN LID FORMAT 9999 COLUMN SERIAL# FORMAT 9999 COLUMN SID FORMAT 9999 COL STATUS FOr a55
Chapter 7:
Monitoring Data Guard Implementations
293
SET LINES 255 COL TYPE FOR a12 COL SPID FOR a7 SELECT TYPE, SID, SERIAL#, LOGSTDBY_ID AS LID, SPID, HIGH_SCN, STATUS FROM V$LOGSTDBY_PROCESS /
The STATUS column informs you what the process is doing or waiting on or whether work is available for it.
Checking Status Codes of Logical Standby Processes Again, we will query from the V$LOGSTDBY_PROCESS view to determine the status codes of each of the SQL Apply processes. In this menu option, we provide a high-level summary report categorized by type and status code: prompt prompt prompt prompt prompt
16113 16116 16117 16123 16124
-> -> -> -> ->
Apply change to a particular object No work available Processing Transaction Waiting for Commit Approval Transaction Waiting on Another Transaction before proceeding
SELECT TYPE, STATUS_CODE,COUNT(1) NO_OF_TXNS FROM V$LOGSTDBY_PROCESS GROUP BY TYPE,STATUS_CODE /
Executing menu option 7 from the logical standby DG submenu produces these results: # Enter Task Number: 7 # ----------------------------------------------------------------------- # # Executing logical_trx.sql on DB: MATRIXRT # ----------------------------------------------------------------------- # 16113 -> Apply change to a particular object 16116 -> No work available 16117 -> Processing 16123 -> Transaction Waiting for Commit Approval 16124 -> Transaction Waiting on Another Transaction before proceeding TYPE STATUS_CODE NO_OF_TXNS ------------------------------ ----------- ---------APPLIER 16116 20 COORDINATOR 16116 1 READER 16116 1 PREPARER 16116 4 ANALYZER 16116 1 BUILDER 16116 1 6 rows selected.
294
Oracle Data Guard 11g Handbook In our output, we provide some common status codes that you will likely encounter that can help you quickly assess your situation.
Checking on Stuck Appliers Correlating V$SESSION and V$LOGSTDBY_PROCESS, you can identify the events or resources that the session is waiting on. The following query displays a high-level summary of the number of appliers that may be waiting on a specified event: COL EVENT FORMAT A50 TRUNC SELECT LS.STATUS_CODE, S.EVENT, COUNT(1) No_Of_Appliers FROM V$LOGSTDBY_PROCESS LS ,V$STREAMS_APPLY_SERVER SAS ,V$SESSION S WHERE LS.TYPE = 'APPLIER' -AND LS.STATUS_CODE IN ( 16124, 16123 ) AND LS.LOGSTDBY_ID = SAS.SERVER_ID AND S.SID = SAS.SID GROUP BY LS.STATUS_CODE, S.EVENT;
You may want to also add additional filters for the STATUS_CODE column. Filtering on transactions that are waiting for commit approvals with a STATUS_CODE of 16123, you may encounter a similar kind of output, as shown here: STATUS_CODE ----------16123 16123
EVENT ----------------------------enq: TX - allocate ITL entry rdbms ipc message
NO_OF_APPLIERS -------------4 4
Once you identify wait events to be the delaying factor for SQL Apply, you will want to identify the SQL statements that are causing the issue(s) and take corrective tuning measures.
Checking the LCR for Paging The LCR Cache is an area of the shared pool where the PREPARER process stages logical change records (LCRs) as it converts redo change blocks to LCRs. If the LCR Cache is not sized adequately, LCR paging can occur. LCR paging is an operation in which the SQL Apply process writes to a SPILL table in the SYSAUX tablespace from memory to disk. LCR paging is a very expensive operation and should be avoided. To determine whether you are experiencing LCR paging, you can execute the following query: SELECT VALUE BYTES FROM V$LOGSTDBY_STATS WHERE NAME = 'bytes paged out' /
If a non-zero value is returned from this query, you should execute this query on a periodic basis and determine what transactions are causing LCR paging. Remember that the 'bytes paged out' value is a cumulative value since the SQL Apply process started. If you see this value increasing, you may want to resize the MAX_SGA logical standby parameter.
Chapter 7:
Monitoring Data Guard Implementations
295
Generating Syntax to Skip DDL Transactions Rarely, conditions will warrant that you skip transactions on the logical standby database. When you face such events, DDL statements such as CREATE TABLE AS SELECT (CTAS) or other DDL statements will typically be a symptom of unsupported DDLs such as CREATE DATABASE LINK. In general, you should never have to skip a Data Manipulation Language (DML) statement. Skipping DML statements can cause logical corruptions on the logical standby database. The following menu option can be helpful when you have to skip a transaction that is causing SQL Apply to halt: # Enter Task Number: 11 # ----------------------------------------------------------------------- # # Executing logical_skip_transactions.sql on DB: MATRIXRT # ----------------------------------------------------------------------- # XIDUSN XIDSLT XIDSQN ------ ------ -----2 40 611166 10 36 958286 To Skip, Execute: -------------------------------------------------------------------------EXECUTE DBMS_LOGSTDBY.SKIP_TRANSACTION(2,40,611166); EXECUTE DBMS_LOGSTDBY.SKIP_TRANSACTION(10,36,958286);
The SKIP_TRANSACTION procedure accepts three parameters in the following order for the transaction that is being skipped: 1. Transaction ID undo segment number (XIDUSN) 2. Transaction ID slot number (XIDSLT) 3. Transaction ID sequence number (XIDSQN) In our example, the following SQL statement is used to generate the syntax to skip transactions on the logical standby: SET NUMWIDTH 6 SET LINES 155 SELECT XIDUSN, XIDSLT, XIDSQN FROM DBA_LOGSTDBY_EVENTS WHERE EVENT_TIME = (SELECT MAX(EVENT_TIME) FROM DBA_LOGSTDBY_EVENTS); SELECT 'EXECUTE DBMS_LOGSTDBY.SKIP_TRANSACTION(' xidusn ',' xidslt xidsqn ');' "To Skip, Execute:" FROM DBA_LOGSTDBY_EVENTS WHERE EVENT_TIME = (SELECT MAX(EVENT_TIME) FROM DBA_LOGSTDBY_EVENTS);
','
296
Oracle Data Guard 11g Handbook We query the latest event from the DBA_LOGSTDBY_EVENTS to determine candidate transactions that can be skipped. You should review the EVENT column to examine the statement that caused the failure.
Executing Diagnostics Another menu option worth noting is the diagnostic script per MetaLink Note 241512.1. This script will generate a rather comprehensive report for troubleshooting purposes. The script generates a log file with the following naming convention in the current directory: logical_diag_ [ORACLE_SID_MONDD_HHMM].out. Here’s a sample name of the output file: logical_diag_ MATRIXRT_Apr06_1058.out. Because the date, hour, and minute of the day is appended to the output file, the diagnostic script should generate a new file every time you execute the menu option.
Executing SQL Apply Lag Scheduled Monitoring We provide another shell script called logical_lag_alert.ksh. We will not include the source code for this shell script in this chapter, but it will be bundled with the tar extract. The logical_lag_alert .ksh shell script is designed to be invoked from the cron job scheduler or as a daemon and will send an alert to the recipients in the event that the SQL Apply lag exceeds the user-defined threshold or if the standby redo log lag exceeds the user-defined threshold specified in minutes. If you are launching the logical_lag_alert.ksh shell script as a daemon, make sure that it is part of the server startup scripts. Alternatively, you can schedule this shell script to run every 5 minutes from cron. You can create a cron job entry that resembles this: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /apps/oracle/general/sh/logical_lag_ alert.ksh MATRIX 10 10 > /tmp/logical_lag_alert.MATRIX.log 2> 1
This cron job entry will execute every 5 minutes 24 hours a day, 7 days a week. The logical_lag_ alert.ksh script accepts three parameters: N
Database name
N
SQL Apply lag threshold in minutes
N
Standby redo log lag threshold in minutes
The database name must exist as an entry in the ORATAB file in /etc/oratab or /var/opt/oracle/ oratab depending on the operating system. If you do not provide any parameters, the script will spit out an error indicating that several parameters are required before it even starts the main logic. Once all the required parameters are accepted, the shell script will source the Oraclesupplied oraenv file to create or update the ORACLE_HOME and PATH environment variables.
Conclusion Monitoring a Data Guard environment for proper configuration and performance can potentially mitigate risks when it comes to opening the standby database in a disaster recovery situation. First, you must discover settings in the primary database that can possibly corrupt the standby database, such as nologging activities. Second, you must examine various log files such as Oracle alert logs and trace files in a timely manner to capture any errors generated from the inception of the redo buffer on the primary database to the Redo Apply process on the standby database.
Chapter 7:
Monitoring Data Guard Implementations
297
Furthermore, you must monitor the performance of the Data Guard environment so that you do not jeopardize the RPO or RTO of the disaster recovery requirements. By checking to see whether your Data Guard configuration follows the industry best practices, you can be assured that you can easily meet your RPO and RTO requirements. The complete DG Menu, including the logical standby DG submenu, is available for download from either the Oracle Press web site at www.oraclepress.com or from the Data Guard Handbook web site at www.dataguardbook.com. Obviously, we cannot cover every facet of the Data Guard monitoring components but hope to address the common metrics. As new techniques are discovered, we will update our scripts and post revisions on the web site. You are strongly encouraged to check for updates and download the scripts instead of copying the scripts manually.
CHAPTER
8 Hl^iX]dkZgVcY;V^adkZg
'..
300
DgVXaZ9ViV<jVgY&&g =VcYWdd`
[ndj]VkZWZZcgZVY^c\Vaai]ZegZXZY^c\X]VeiZgh!ndjh]djaYcdlWZ[jaan kZghZY^ci]Z9ViV<jVgYVgX]^iZXijgZ0hiVcYWnYViVWVhZXgZVi^dc!bVcV\ZbZci! VcYbdc^idg^c\0l]Vii]ZY^[[ZgZcihiVcYWnYViVWVhZineZhd[[ZgVcYl]Vii]ZnYd cdi0VcYl]Vi^ciZg[VXZhndjXVcjhZidbVcV\Z9ViV<jVgY#7jijeidcdl!ndj ]VkZaZVgcZYdcan]dlidhZijendjgYViVWVhZidWZegdiZXiZY^ci]ZZkZcid[ hdbZhdgid[egdYjXi^dc[V^ajgZ#Ndj]VkZc¼inZiaZVgcZY]dlidjhZndjghiVcYWnYViVWVhZ[dg i]ZejgedhZ[dgl]^X]^ilVhXgZViZY/idiV`ZdkZgVhi]ZegdYjXi^dcYViVWVhZ#I]^h^hl]ZgZrole transitionXdbZh^cideaVn#
I
Introduction to Role Transition GdaZigVch^i^dc^hY^k^YZY^cidildWVh^X[jcXi^dch/switchoverVcYfailover#BVcn976hjhZY^[[ZgZci iZgbhidYZhXg^WZi]ZhZild[jcXi^dch!hjX]Vhhl^iX]dkZgVcYhl^iX]WVX`dg[V^adkZgVcY[V^aWVX`! [dgZmVbeaZ#HdbZZkZcXdbW^cZdgXdc[jhZi]Zild[jcXi^dch!WZa^Zk^c\i]Vii]ZnVgZYd^c\V [V^adkZgl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]gZVYVcYViVegZk^djhi^bZ#I]^h^hjhjVaangZ[ZggZY idVhVdependant transaction.6hi]ZVeeanegdXZhhgZVYhi]ZgZYd!^ibjhi\dWVX`VcY[dgi] WZilZZci]ZVgX]^kZad\h!add`^c\[dgi]ZVeegdeg^ViZH8C#I]Zi]gZVYbZg\^c\ad\^XVaanbV`Zhi]Z gZYdhigZVbhadd`a^`ZVh^c\aZhigZVbd[gZYd!Vhh]dlc^c;^\jgZ-"(# I]^hi]gZVYbZg\^c\^hi]ZgZVhdcndjl^aahZZi]ZVeeanegdXZhhZhlV^i^c\[dghdbZi]^c\ l]Zc^ildjaYVeeZVgi]Vii]ZgZ^hhj[[^X^ZcigZYdidegdXZhh#6cYi]^h^hVahdl]nYViVl^aaWZ adhiVi[V^adkZgi^bZ#
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
305
500
501 Thread One 502
100
101 Thread Two
FIGURE 8-1.
102
Redo ready to be applied
Thread 1
Thread 2
Sequence 500
Sequence 501
Thread Merging
Sequence 502
FIGURE 8-2.
Transactions by SCN in the redo stream
Sequence 100
Sequence 101
Sequence 102
306
DgVXaZ9ViV<jVgY&&g =VcYWdd`
FIGURE 8-3.
Merged redo
L]Zcndj^c^i^ViZV[V^adkZg!i]Z[^ghii]^c\ndjYd^h^chigjXi9ViV<jVgYid[^c^h]Veean^c\Vaa i]ZgZYdi]Vi^i]VhgZXZ^kZY#>[ndjlZgZgjcc^c\gZVa"i^bZVeeanl^i]HGA[^aZh!i]ZcegZiin bjX]Vaai]ZgZYdi]ViXVcWZVeea^ZY]VhWZZcVeea^ZY#HdbZgZYdbVnhi^aaWZVeea^ZYWnjh^c\ i]Z]ZVgiWZVigZYdi]ViZVX]i]gZVYhZcYhl]Zc^i^h^YaZ#7ji9ViV<jVgYbjhiadd`ViVaad[i]Z i]gZVYhd[gZYdVcY[^\jgZdjil]ZgZi]ZaVhiXdch^hiZci]ZVgiWZVi^h^ci]ZgZYdhigZVbVcYi]Zc Y^hXVgYVaaigVchVXi^dchi]Vib^\]iWZ^ci]ZgZYdV[iZgi]Vied^ci!Vhh]dlc^c;^\jgZ-")# >cdjgZmVbeaZ!I]gZVY'hideeZYhZcY^c\gZYdViH8C&%%-!WjiI]gZVY&Xdci^cjZYid hZcY^ihgZYd#6i[V^adkZg^cBVm^bjbEZg[dgbVcXZbdYZ!Vaad[i]ZgZYdV[iZgH8C&%%.ldjaY WZY^hXVgYZYh^cXZi]ZgZ^hcdlVn[dg9ViV<jVgYidWZhjgZi]VicdigVchVXi^dch^cI]gZVY'¼h higZVbi]VilZgZcdigZXZ^kZYWni]ZhiVcYWnl]^X]h]djaYWZVeea^ZY[^ghi#H^cXZ]ZVgiWZVigZYd ^hhZciZkZgn+hZXdcYhdghd!i]Z\ZcZgVagjaZd[i]jbW^hi]Vindjb^\]iadhZVgdjcY+hZXdcYhd[ gZYdYjg^c\V[V^adkZgl]ZcVaalVhgjcc^c\eZg[ZXianWZ[dgZi]Z[V^ajgZ#7jii]^h^h_jhiVWZhi \jZhh#I]ZgZ^hcdlVnidYZiZgb^cZZmVXian]dlbjX]gZYdlVhadhi!VcYl]ViZkZgcjbWZgndj YdXdbZjel^i]^hWVhZYdcgZYdkdajbZdkZgVeZg^dYd[i^bZ!cdijhZgigVchVXi^dch#
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
Sequence 500
Sequence 501
Thread 1
Thread 2
SCN 1000
SCN 1001
SCN 1002
SCN 1003
SCN 1005
SCN 1004
SCN 1007
SCN 1006
SCN 1009
SCN 1008
Last Consistent Heartbeat
307
Sequence 100
Sequence 101
SCN 1010 SCN 1012 Sequence 502
SCN 1014
Lost Redo upon failover!
SCN 1016
FIGURE 8-4.
Lost redo
>cBVm^bjb6kV^aVW^a^indgBVm^bjbEgdiZXi^dcbdYZ!i]ZVeeanegdXZhhldjaY`cdli]Vi ^ilVh^bedhh^WaZ[dgI]gZVY'id]VkZ\ZcZgViZYVcngZYdV[iZgi]ZZcYd[^ihgZYdhigZVb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ZbZci^dcZY^ci]ZWZ\^cc^c\d[i]^hX]VeiZg!ndjcZZYidiV`ZhdbZegZeVgVidgnhiZeh WZ[dgZhiVgi^c\i]Zhl^iX]dkZg#I]Zc!YZeZcY^c\dcndjgXdc[^\jgVi^dcG68dgh^c\aZ^chiVcXZ VcYiVg\ZihiVcYWne]nh^XVadgad\^XVa!hdbZZmigVhiZehbVnVahdWZcZXZhhVgn# 6[iZglZ]VkZY^hXjhhZYi]ZegZeVgVidgnhiZeh!lZl^aa\di]gdj\]i]ZVXijVahl^iX]dkZghiZeh! [^ghi[dgVe]nh^XVahiVcYWnYViVWVhZVcYi]Zc[dgVad\^XVahiVcYWnYViVWVhZjh^c\dcanHFAEajh i]ZEdlZgJhZgBZi]dY#6[iZgi]Vi!lZl^aaZmVb^cZi]ZhiZeh[dgi]Z7gd`ZgVcYi ^h^bedgiVcii]VindjjcYZghiVcYi]ZHFAEajhbZi]dYZkZc^[ndjVgZjh^c\i]Z7gd`Zgdg
Configuration Completeness Check 6hlZbZci^dcZY!jcaZhhndjVgZjh^c\i]Z7gd`Zgdg[ndj[daadlZY8]VeiZg'VcYjhZYGZXdkZgnBVcV\ZgGB6C!i]^h l^aa]VkZWZZcYdcZ[dgndj^c&&g#Eg^dgkZgh^dchd[DgVXaZgZfj^gZYi]VindjbVcjVaanXgZViZi]Z iZbe[^aZdci]Ze]nh^XVahiVcYWn# NOTE If you are using the Data Guard Broker, you must make sure that all the prerequisites from Chapter 5 have been met before beginning a role transition. >[ndj]VkZcdiVagZVYnZcVWaZY;aVh]WVX`9ViVWVhZ!cdlldjaYWZV\ddYi^bZidYdhd#>[^i ^hZcVWaZYWZ[dgZndjWZ\^ci]Zhl^iX]dkZg!ndjXVcjhZ^iidgZijgcidndjgdg^\^cVaXdc[^\jgVi^dc ZVh^an^[ndjZcXdjciZghdbZ`^cYd[[V^ajgZYjg^c\i]Zhl^iX]dkZg#H^cXZi]^hgZfj^gZhVWdjcXZd[ i]Zeg^bVgn!i]^hh]djaYWZYdcZVihdbZed^cieg^dgidVhl^iX]dkZgl]ZcndjghnhiZbXVc l^i]hiVcYVfj^X`gZhiVgid[i]Zeg^bVgnYViVWVhZ#
Preparatory Checks DjgegZeVgVidgnldg`[dgVhl^iX]dkZgWZ\^chWZ[dgZi]ZegZ"hl^iX]dkZgldg`gZfj^gZY[dg ndjgVeea^XVi^dchiVgih#H^cXZi]^h^hVeaVccZYZkZci!ndjg[^ghihiZe^hidkZg^[ni]VindjXVc ^c[VXieZg[dgbVhl^iX]dkZg#I]^h^hYdcZWnX]ZX`^c\idbV`ZhjgZi]Vii]ZiVg\ZihiVcYWn
312
DgVXaZ9ViV<jVgY&&g =VcYWdd`
VcYegZ[ZgVWanndjgdi]ZghiVcYWnYViVWVhZhVhlZaa^hXdbeaZiZanhncX]gdc^oZYl^i]i]Z XjggZcieg^bVgnYViVWVhZ#6hl^iX]dkZgXVccdiXdbeaZiZjci^a^i]VhgZXZ^kZYVcYVeea^ZYVaa gZYdjeidVcY^cXajY^c\i]Z:DGgZYdi]VindjVgZ\d^c\id\ZcZgViZl]ZcndjVXijVaanhiVgi i]Zhl^iX]dkZg#
Verifying That the Standby Has Received All Redo >[ndjVgZgjcc^c\^cVoZgdYViVadhhbdYZBVm^bjb6kV^aVW^a^indgBVm^bjbEgdiZXi^dc!ndj XVcZchjgZi]Vii]ZiVg\Zid[ndjghl^iX]dkZg^hhncX]gdc^oZYWnZmVb^c^c\i]ZV$ARCHIVE_ DEST_STATUSk^Zldci]Zeg^bVgnYViVWVhZ/ SQL> SELECT DB_UNIQUE_NAME, PROTECTION_MODE, SYNCHRONIZATION_STATUS, 2> SYNCHRONIZED FROM V$ARCHIVE_DEST_STATUS DB_UNIQUE_NAME PROTECTION_MODE SYNCHRONIZATION_STATUS SYN --------------- -------------------- ---------------------- --NONE MAXIMUM PERFORMANCE CHECK CONFIGURATION NO matrix_dr0 MAXIMUM AVAILABILITY OK ES NONE MAXIMUM PERFORMANCE CHECK CONFIGURATION NO NONE MAXIMUM PERFORMANCE CHECK CONFIGURATION NO NONE MAXIMUM PERFORMANCE CHECK CONFIGURATION NO NONE MAXIMUM PERFORMANCE CHECK CONFIGURATION NO NONE MAXIMUM PERFORMANCE CHECK CONFIGURATION NO NONE MAXIMUM PERFORMANCE CHECK CONFIGURATION NO NONE MAXIMUM PERFORMANCE CHECK CONFIGURATION NO NONE MAXIMUM PERFORMANCE CHECK CONFIGURATION NO 10 rows selected.
6hndjXVchZZ^ci]^hVWdkZ!djgiVg\ZihiVcYWnVcYdjgdcanhiVcYWnB6IG>MT9G%^h hncX]gdc^oZYl^i]i]Zeg^bVgnYViVWVhZ#I]^h^hhj[[^X^ZciidkZg^[ni]Vii]ZhiVcYWn]VhgZXZ^kZY Vaai]ZgZYd#7ji^[SYNCHRONIZEDYdZhcdihVnYESdgndjVgZgjcc^c\^cBVm^bjb EZg[dgbVcXZbdYZ!ndjcZZYidYdVW^ibdgZldg`idkZg^[ni]ZgZYdhiVijh# SELECT CLIENT_PROCESS,PROCESS,SEQUENCE#,STATUS FROM V$MANAGED_STANDBY; CLIENT_P PROCESS SEQUENCE# STATUS -------- --------- ---------- -----------ARCH ARCH 326 CLOSING ARCH ARCH 0 CONNECTED ARCH ARCH 327 CLOSING ARCH ARCH 0 CONNECTED N/A MRP0 328 APPLYING_LOG LG R RFS 32 IDLE ARCH RFS 0 IDLE N/A RFS 0 IDLE 8 rows selected. SQL>
I]Zdjieji[gdbi]^hXdbbVcYl^aah]dlndji]ZXjggZcihZfjZcXZi]Vii]Zeg^bVgn^h hZcY^c\!VhZk^YZcXZYWni]ZCLIENT_PROCESSZfjVaidLGWR!l]^X]^hhZfjZcXZ('-^cdjg XVhZ#>[ndjVgZjh^c\HNC8dg6HNC8!ndjl^aa\Zii]ZhVbZgZhjai#>[!]dlZkZg!ndjVgZjh^c\ 6G8=gZbZbWZgi]Vi6G8=]VhWZZcYZegZXViZYWjihi^aaZm^hih^c&&gVcYegZk^djhkZgh^dch!
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
313
ndjh]djaYViaZVhihZZVc6G8=idG;HXdccZXi^dcl^i]i]ZaVhiVgX]^kZYhZfjZcXZ[gdbi]Z eg^bVgn!l]^X]h]djaYWZcdbdgZi]Vc&aZhhi]Vci]Zeg^bVgn!Vhh]dlc^ci]Z[daadl^c\ XdbbVcYZmZXjiZYdci]Zeg^bVgn/ SQL> SELECT THREAD#,SEQUENCE#,STATUS FROM V$LOG; THREAD# SEQUENCE# STATUS ---------- ---------- ---------------1 328 CURRENT 1 326 INACTIVE 1 327 INACTIVE SQL>
>[i]ZhiVcYWn^hcdigZXZ^k^c\i]ZXjggZcigZYd!ndjXVccdihl^iX]dkZg#CdiZi]Vi^[ndjg eg^bVgn^hVG68!ndjh]djaYhZZbjai^eaZA
Checking That the Apply Is Caught Up DcXZndj]VkZYZiZgb^cZYi]Vii]ZgZYdhigZVb^hXjggZci!ndjcZZYidbV`ZhjgZi]Vii]ZgZYd ]VhVaaWZZcVeea^ZYidi]ZhiVcYWnYViVWVhZ#
Redo Apply >ci]ZXVhZd[Ve]nh^XVahiVcYWnndjl^aahZZi]ZBGE%a^cZ^ci]ZV$MANAGED_ STANDBYfjZgna^`Zhd/ CLIENT_P -------N/A LGWR
PROCESS SEQUENCE# --------- ---------MRP0 328 RFS 328
STATUS -----------APPLYING_LOG IDLE
>[ndjVgZhl^iX]^c\dkZgidVe]nh^XVahiVcYWnVcYndjYdcdihZZi]ZBGE%a^cZ!i]Zci]Z Veean^hcdigjcc^c\#Idhl^iX]dkZg!ndjbjhihiVgii]ZVeeanhZgk^XZVcYlV^i[dg^iidXViX]je l^i]i]ZXjggZcigZYdhigZVbWZ[dgZhiVgi^c\# >[ndjhZZi]ZBGE%a^cZWji^i]VhVhiVijhd[WAIT_FOR_GAP!ndjXVccdihl^iX]dkZgjci^a i]Z\Ve]VhWZZcgZhdakZY# GZbZbWZgi]ViVhiVijhd[WAIT_FOR_LOGbZVchi]ViZ^i]ZgndjVgZcdigjcc^c\gZVa"i^bZVeean dgndj]VkZheZX^[^ZYVDELAY#>ci]ZXVhZd[VDELAY!ndjbjhihidei]ZVeeanegdXZhhVcYgZhiVgi^i jh^c\i]ZNODELAYfjVa^[^Zg0di]Zgl^hZ!ndjghl^iX]dkZgl^aacdiWZVWaZidXdbeaZiZ#
SQL Apply >[ndjVgZeZg[dgb^c\Vhl^iX]dkZgidVad\^XVahiVcYWn!i]ZgZl^aaWZcd^cY^XVi^dc ^ci]ZV$MANAGED_STANDBYk^ZlVWdjii]ZHFA6eeanegdXZhh!_jhii]ZgZYdigVchedgi#IdkZg^[n i]Vii]Zad\^XVahiVcYWn^hXVj\]ijel^i]i]Zeg^bVgn!jhZi]ZV$LOGSTDBY_PROGRESSk^Zl# =ZgZ¼hVcZmVbeaZ/ SQL> SELECT APPLIED_SCN, LATEST_SCN, MINING_SCN FROM V$LOGSTDBY_PROGRESS; APPLIED_SCN LATEST_SCN MINING_SCN ----------- ----------- ---------7178240496 7178240507 7178240507
>[i]ZgZYdigVchedgiX]ZX`[gdbV$MANAGED_STANDBY^hjeidYViZVcYi]ZMINING_SCNVcY LATEST_SCN[gdbi]ZVWdkZXdbbVcYVgZ^chncX!i]Zci]Zad\^XVahiVcYWn^hXVj\]ijeVcY
314
DgVXaZ9ViV<jVgY&&g =VcYWdd`
gZVYnid\d#>[!dci]Zdi]Zg]VcY!igVchedgiadd`hXdggZXiWjii]ZMINING_SCN^hWZ]^cYi]Z LATEST_SCN!ndjbVn]VkZV\Ve#NdjXVcX]ZX`[dgi]^hWnjh^c\i]^hHFAXdbbVcY/ SQL> SELECT STATUS FROM V$LOGSTDBY_PROCESS WHERE TYPE = 'READER'; STATUS ---------------------------------------------------------------------ORA:01291 Waiting for logfile
>ci]^hXVhZ!ndj]VkZV\Vei]VibjhiWZgZhdakZYWZ[dgZWZ\^cc^c\i]Zhl^iX]dkZg!Vhl^i] Ve]nh^XVahiVcYWn#
Canceling Jobs and Backups ;^cVaan!ndjbjhiXVcXZaVcngjcc^c\_dWhdci]Zeg^bVgnYViVWVhZVcYY^hVWaZVcncZldcZh [gdbhiVgi^c\hjX]VhGB6CWVX`jeh!Veea^XVi^dcXaZVcje_dWh!DgVXaZIZmiHncX_dWh!VcYhd dc#>cVYY^i^dc!hideVcnGB6CWVX`jehi]ViVgZXjggZciangjcc^c\dci]ZiVg\ZihiVcYWnYViVWVhZ Vhi]^hXVc^ciZg[ZgZl^i]i]Zhl^iX]dkZg#;dgZmVbeaZ!id[^cYdji^[GB6C^hgjcc^c\!igni]Z [daadl^c\XdbbVcY/ SQL> SELECT PROCESS, OPERATION, R.STATUS, MBYTES_PROCESSED PCT, S.STATUS FROM V$RMAN_STATUS R, V$SESSION S WHERE R.SID=S.SID PROCESS OPERATION STATUS PCT STATUS ------------------ ------------------------- ---------------- --- -------19507 RMAN RUNNING 0 ACTIVE 19507 BACKUP BACKUPSET RUNNING 0 ACTIVE
DcXZndj]VkZeZg[dgbZYVaad[i]ZX]ZX`h^ci]^hhZXi^dcVcYgZhdakZYVcnegdWaZbh!ndj VgZgZVYnidXdci^cjZ#7ji^[ndjXVccdigZhdakZi]Zb!ndjbjhiVWVcYdci]Zhl^iX]dkZg#
Preprocessing Steps >[ndjghiVcYWnYViVWVhZeVhhZYi]ZbVcYVidgnX]ZX`hY^hXjhhZYhd[Vg!ndjVgZgZVYnidWZ\^ci]Z hl^iX]dkZg#Ndjg[^ghihiZe^hidhiVgibdc^idg^c\i]ZVaZgiad\hd[i]Zeg^bVgnVcYi]ZiVg\ZihiVcYWn YViVWVhZh#>[edhh^WaZ!YdVtail fd[ZVX]YViVWVhZ¼hVaZgiad\#>[ndjVgZjh^c\L^cYdlh!ndj¼aa [^cYi]^gY"eVgin[gZZiddahi]Vil^aaaZindjYdi]^h^[ndjlVci#=ZgZ¼hVcZmVbeaZdci]Zeg^bVgn YViVWVhZhnhiZb/ [Matrix] cd $ORACLE_BASE/diag/rdbms [Matrix] tail -f ./matrix/Matrix/trace/alert_Matrix.log Mon Jan 19 13:20:37 2009 Thread 1 cannot allocate new log, sequence 334 Private strand flush not complete Current log# 3 seq# 333 mem# 0: +DATA/matrix/onlinelog/group_3.297.671727289 Current log# 3 seq# 333 mem# 1: +FLASH/matrix/onlinelog/group_3.256.671727297 LGWR: Standby redo logfile selected to archive thread 1 sequence 334 LGWR: Standby redo logfile selected for thread 1 sequence 334 for destination LOG_ARCHIVE_DEST_2 Thread 1 advanced to log sequence 334 Current log# 1 seq# 334 mem# 0: +DATA/matrix/onlinelog/group_1.300.671727255
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
315
Current log# 1 seq# 334 mem# 1: +FLASH/matrix/onlinelog/group_1.266.671727263
6cY]ZgZ¼hi]ZXdggZhedcY^c\iVg\ZihiVcYWnVaZgiad\/ [Matrix] cd $ORACLE_BASE/diag/rdbms [Matrix] tail -f ./matrix_dr0/Matrix_DR0/trace/alert_Matrix_DR0.log Mon Jan 19 16:19:49 2009 Primary database is in MAXIMUM AVAILABILITY mode Standby controlfile consistent with primary kcrrvslf: active RFS archival for log 6 thread 1 sequence 333 RFS[8]: Successfully opened standby log 5: '+DATA/matrix_dr0/onlinelog/group_5.258.671757777' Mon Jan 19 16:19:51 2009 Media Recovery Waiting for thread 1 sequence 334 (in transit) Recovery of Online Redo Log: Thread 1 Group 5 Seq 334 Reading mem 0 Mem# 0: +DATA/matrix_dr0/onlinelog/group_5.258.671757777 Mem# 1: +FLASH/matrix_dr0/onlinelog/group_5.421.671757783
I]ZhZildVaZgiad\hl^aaiZaandjl]Vi^h]VeeZc^c\Yjg^c\i]Zhl^iX]dkZgegdXZhh!VcYndjh]djaY WZbdc^idg^c\i]ZbgZ\VgYaZhhd[l]^X]^ciZg[VXZndjVgZjh^c\idbVcV\Z9ViV<jVgY¸HFAEajh! i]Z7gd`Zg!dg[ndjVgZeVgVcd^YVcYl]d^hc¼i4!ndjXVcVahdijgcdc9ViV<jVgYigVX^c\idi]ZbVm^bjbhd i]ViVaaigVX^c\^c[dgbVi^d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jil]Vi^h gjcc^c\!add`ViV$SESSION/ SQL> SELECT PROGRAM, TYPE FROM V$SESSION WHERE TYPE='USER'; PROGRAM TYPE ------------------------------------------------ ---------emagent@stadu67 (TNS V1-V3) USER emagent@stadu67 (TNS V1-V3) USER OMS USER OMS USER oracle@stadu67 (J000) USER sqlplus@stadu67 (TNS V1-V3) USER sqlplus@stadu67 (TNS V1-V3) USER
>cdjgXVhZ!^ilVhi]Z:ciZgeg^hZBVcV\Zg9ViVWVhZ8dchdaZ#LZYdc¼igZVaancZZYidldggn VWdjii]dhZhZhh^dch!WjiidXaZVgi]Zbdji!lZh]jiYdlci]Z978dchdaZ#DcXZi]VilVhYdcZ! Vcdi]Zgadd`\^kZhjhi]Zh^\cVaidbdkZV]ZVY/ SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE; SWITCHOVER_STATUS -------------------TO STANDBY SQL>
I]^h^h^i6ai]dj\]^ibVnhZZba^`ZVadc\gdVYid\Zi]ZgZVcYVaad[i]dhZX]ZX`hlZgZ ldgi]^i!lZXVccdlZmZXjiZi]Zhl^iX]dkZgXdbbVcY/ SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN; Database altered.
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
317
NdjXVchZZl]ViigVche^gZYdci]Zeg^bVgnWnZmVb^c^c\i]ZiV^ad[i]ZVaZgiad\/ Mon Jan 19 18:12:23 2009 ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN Mon Jan 19 18:12:27 2009 LGWR: Standby redo logfile selected to archive thread 1 sequence 336 LGWR: Standby redo logfile selected for thread 1 sequence 336 for destination LOG_ARCHIVE_DEST_2 Thread 1 advanced to log sequence 336 ... Active process 17986 user 'lcarpent' program 'oracle@stadu67 (FBDA)' Active process 17986 user 'lcarpent' program 'oracle@stadu67 (FBDA)' CLOSE: waiting for server sessions to complete. CLOSE: all sessions shutdown successfully. ... Mon Jan 19 18:12:47 2009 Thread 1 closed at log sequence 337 Successful close of redo thread 1 ARCH: Noswitch archival of thread 1, sequence 337 ARCH: End-Of-Redo Branch archival of thread 1 sequence 337 ... Mon Jan 19 18:12:53 2009 Backup controlfile written to trace file /scratch/OracleHomes/diag/rdbms/matrix/Matrix/trace/Matrix_ora_32137.trc Archivelog for thread 1 sequence 337 required for standby recovery ... Mon Jan 19 18:12:56 2009 MRP0 started with pid=21, OS id=1728 MRP0: Background Managed Standby Recovery process started (Matrix) Fast Parallel Media Recovery NOT enabled Managed Standby Recovery not using Real Time Apply parallel recovery started with 2 processes Media Recovery Log +FLASH/matrix/archivelog/2009_01_19/thread_1_seq_337.351.676577573 Identified End-Of-Redo for thread 1 sequence 337 Resetting standby activation ID 2212007183 (0x83d88d0f) Media Recovery End-Of-Redo indicator encountered Media Recovery Applied until change 7591537 MRP0: Media Recovery Complete: End-Of-REDO (Matrix) MRP0: Background Media Recovery process shutdown (Matrix) Switchover: Complete - Database shutdown required (Matrix) Completed: ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN
;gdbi]^hZY^iZYdjieji!ndjXVchZZi]ZhiZehXdkZgZYZVga^Zg^ci]ZX]VeiZg/ 1. Hl^iX]ZYad\[^aZh^bbZY^ViZanidhZfjZcXZ((+# 2. @^aaZYd[[VcngZbV^c^c\jhZgh# 3. 8adhZYi]ZYViVWVhZ#
318
DgVXaZ9ViV<jVgY&&g =VcYWdd` 4. Ejii]Z:DG^chZfjZcXZ((,Vhh]dlcaViZgWni]ZBGE# 5. Hl^iX]ZYad\hV\V^cl^i]djiVaadl^c\VcVYkVcXZ^chZfjZcXZcjbWZgh# 6. LgdiZdjii]ZXdbbVcYidgZ"XgZViZi]ZXdcigda[^aZidi]ZigVXZ[^aZh# 7. HiVgiZYi]ZBGE!l]^X]egdXZhhZYi]Z:DG^chZfjZcXZ((,VcYh]jiYdlc#
6ii]^hed^ci!i]Zeg^bVgnYViVWVhZ]VhWZZcY^hbdjciZY!VcYl]Zc^i^hgZhiVgiZY^il^aaWZ Ve]nh^XVahiVcYWnYViVWVhZ#IdXdbeaZiZi]Zhl^iX]dkZg!ndjbjhilV^i[dgi]Z:DGidWZ egdXZhhZYVii]ZiVg\Zie]nh^XVahiVcYWn#:mVb^cZi]ZiV^ad[i]ZhiVcYWnVaZgiad\VcYndjl^aa hZZl]ZgZi]ZBGEegdXZhhZhi]Z:DGVcYZm^ih/ Mon Jan 19 21:11:39 2009 Media Recovery Waiting for thread 1 sequence 336 (in transit) RFS[8]: Successfully opened standby log 5: +DATA/matrix_dr0/onlinelog/group_5.258.671757777' Recovery of Online Redo Log: Thread 1 Group 5 Seq 336 Reading mem 0 Mon Jan 19 21:11:51 2009 Media Recovery Waiting for thread 1 sequence 337 Mon Jan 19 21:11:58 2009 Redo Shipping Client Connected as PUBLIC -- Connected User is Valid RFS[10]: Assigned to RFS process 19665 RFS[10]: Identified database type as 'physical standby' RFS[10]: Archived Log: +FLASH/matrix_dr0/archivelog/2009_01_19/thread_1_seq_337.350.676588325' Mon Jan 19 21:12:07 2009 Media Recovery Log +FLASH/matrix_dr0/archivelog/2009_01_19/thread_1_seq_337.350.676588325 Identified End-Of-Redo for thread 1 sequence 337 Resetting standby activation ID 2212007183 (0x83d88d0f) Media Recovery End-Of-Redo indicator encountered Resetting standby activation ID 2212007183 (0x83d88d0f) MRP0: Media Recovery Complete: End-Of-REDO (Matrix_DR0) MRP0: Background Media Recovery process shutdown (Matrix_DR0)
DcXZi]ZBGE]Vhh]jiYdlcV[iZgegdXZhh^c\i]Z:DG!i]ZSWITCHOVER_STATUS[gdb V$DATABASEl^aah]dlTO PRIMARYVhadc\VhcdjhZghVgZVXXZhh^c\i]ZYViVWVhZ#>[^ihVnh SESSIONS ACTIVE!i]ZcjhZi]ZWITH SESSIONS SHUTDOWNfjVa^[^Zgdci]Zhl^iX]dkZg XdbbVcY# 8dbeaZiZi]Zhl^iX]dkZgl^i]i]ZALTER DATABASE COMMIT TO PRIMARYXdbbVcY/ SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN; Database altered.
I]^hXdbbVcY[^c^h]Zhjei]ZegdXZhh^c\d[i]Zhl^iX]dkZgWnXaZVg^c\kVg^djhbZbdgn higjXijgZhVhcZZYZYVcYXdckZgi^c\i]ZhiVcYWnXdcigda[^aZidVcdgbVaYViVWVhZXdcigda[^aZ# L]ZcXdbeaZiZ!i]ZhiVcYWnXVcWZdeZcZYVhi]Zeg^bVgn/ Mon Jan 19 21:45:17 2009 ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
319
Stopping the MRP I]ZBGEegdXZhhbjhiXdbeaZiZVeean^c\i]Z:DGgZYdVcYi]ZcZm^i#>cDgVXaZ&%g,^[ndj jhZYi]ZTHROUGH ALL SWITCHOVERhiVgijefjVa^[^Zgidi]ZMANAGED RECOVERYXdbbVcY! ndj]VYidhidei]ZBGEbVcjVaanWZ[dgZi]Zhl^iX]dkZgXdbbVcYXdjaYXdbeaZiZdci]Z hiVcYWn0di]Zgl^hZ^ildjaY[V^a#>cDgVXaZ9ViVWVhZ&&g,i]Zhl^iX]dkZgXdbbVcYl^aahide i]ZBGEdcXZi]ZgZ^hcdbdgZgZYdidVeean#I]ZTHROUGH ALL SWITCHOVERfjVa^[^Zg]Vh WZZcYZegZXViZYh^cXZDgVXaZ9ViVWVhZ&%gGZaZVhZ'#
ALTER DATABASE SWITCHOVER TO PRIMARY (Matrix_DR0) Backup controlfile written to trace file /Matrix_DR0_ora_20944.trc SwitchOver after complete recovery through change 7591537 Online log +DATA/matrix_dr0/onlinelog/group_1.259.671758349: Thread 1 Group 1 was previously cleared Online log +DATA/matrix_dr0/onlinelog/group_2.272.671758359: Thread 1 Group 2 was previously cleared Online log +DATA/matrix_dr0/onlinelog/group_3.274.671758367: Thread 1 Group 3 was previously cleared Standby became primary SCN: 7591535 Converting standby mount to primary mount. Switchover: Complete - Database mounted as primary (Matrix_DR0) Completed: ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN
>[ndjjhZYi]ZTHROUGH ALL SWITCHOVERhiVgijefjVa^[^Zg[dgi]ZBGE!i]Zhl^iX]dkZg XdbbVcYl^aahiVaa[dgVbVm^bjbd[&*b^cjiZh[dgi]ZBGEidhide#Ndjl^aahZZi]Za^cZ Media Recovery Continuing^ci]ZVaZgiad\/ Mon Jan 19 21:12:07 2009 Media Recovery Log +FLASH/matrix_dr0/archivelog/2009_01_19/thread_1_seq_337.350.676588325 Identified End-Of-Redo for thread 1 sequence 337 Resetting standby activation ID 2212007183 (0x83d88d0f) Media Recovery End-Of-Redo indicator encountered M a R co r Co Resetting standby activation ID 2212007183 (0x83d88d0f) Media Recovery Waiting for thread 1 sequence 338
I]^hbZVchi]Vii]ZBGE]VhWZZcidaYid^\cdgZi]Zhl^iX]dkZgndjjhZYi]ZTHROUGH ALL SWITCHOVERXaVjhZidhiVgibVcV\ZYgZXdkZgn#>[ndjZcXdjciZgi]^hh^ijVi^dc!i]Zhl^iX]dkZg l^aaXVcXZai]ZBGEVjidbVi^XVaandcXZ^i]VhVeea^ZYi]Z:DG/ Mon Jan 19 21:12:27 2009 alter database commit to switchover to primary with session shutdown ALTER DATABASE SWITCHOVER TO PRIMARY (Matrix_DR0) Maximum wait for role transition is 15 minutes. Mon Jan 19 21:12:57 2009
320
DgVXaZ9ViV<jVgY&&g =VcYWdd`
Switchover: Media recovery is still active Ro C a Ca c MR o mor r o o app Mon Jan 19 21:12:58 2009 MRP0: Background Media Recovery cancelled with status 16037 ORA-16037: user requested cancel of managed recovery operation Managed Standby Recovery not using Real Time Apply Shutting down recovery slaves due to error 16037 Recovery interrupted
I]ZTHROUGH ALL SWITCHOVERfjVa^[^Zg]VhWZZcYZegZXViZYh^cXZDgVXaZ9ViVWVhZ&%g GZaZVhZ'# ;^c^h]i]Zhl^iX]dkZgWndeZc^c\i]ZcZleg^bVgnYViVWVhZl^i]ALTER DATABASE OPEN! Vil]^X]ed^cijhZghXVchiVgiidgZXdccZXi#GZhiVgii]ZdaYeg^bVgnVhVhiVcYWnVcYhiVgiGZYd 6eeani]ZBGE#D[XdjghZ!i]ZgZhiVgid[i]ZdaYeg^bVgnXVcWZYdcZ^ceVgVaaZal^i]i]Z hl^iX]dkZgegdXZhh^c\dci]ZhiVcYWn# Dci]ZcZleg^bVgn!jhZi]^hXdbbVcY/ SQL> ALTER DATABASE OPEN;
6cYdci]Zdg^\^cVaeg^bVgn!cdlVhiVcYWnYViVWVhZ!jhZi]^hXdbbVcY/ SQL> SQL> SQL> 2>
SHUTDOWN IMMEDIATE STARTUP MOUNT ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
I]ZcndjXVchiVgijei]ZVjm^a^VgnG68^chiVcXZhdci]Zeg^bVgnVcYhiVcYWnYViVWVhZh^[ ndjVgZjh^c\G68#NdjgXa^Zcihl^iX]dkZgl^aadXXjgWVhZYdcndjghZgk^XZgZadXVi^dchigViZ\n! l]^X]^hY^hXjhhZY^c8]VeiZg&%#
Switching over to a Logical Standby I]Zhl^iX]dkZgegdXZhh[dgVad\^XVahiVcYWn^hhdbZl]Vih^beaZgWZXVjhZd[^begdkZbZcih^c DgVXaZ9ViVWVhZ&&gVcYi]Z[VXii]ViVad\^XVahiVcYWn^hVagZVYndeZcgZVY"lg^iZ#7ji^iVahd]Vh VhZXdcYhZid[hiZehi]Vi\jVgVciZZi]ZhV[Zind[ndjgYViV^[V[V^ajgZdXXjghV[iZgi]Zhl^iX]dkZg WjiWZ[dgZi]ZcZlad\^XVahiVcYWnYViVWVhZXVcegdXZhhcZligVchVXi^dch# GZbZbWZg!i]dj\]!i]Vil]Zcndjhl^iX]dkZgidVad\^XVahiVcYWn!Vcne]nh^XVahiVcYWn YViVWVhZhl^aacdadc\ZggZXZ^kZgZYd[gdbi]^hcZleg^bVgnVhi]ZnVgZcdie]nh^XVaXde^Zhd[ i]ZcZleg^bVgnWjigVi]Zgd[i]ZdaYeg^bVgn#Di]Zgad\^XVahiVcYWnYViVWVhZhXVcWZbVcjVaan gZ^ciZ\gViZY# 6hd[DgVXaZ9ViVWVhZ&&g,ndjcdadc\ZgcZZYidh]jiYdlcVcnYViVWVhZ^chiVcXZeg^bVgn dgad\^XVahiVcYWnl]ZcndjeZg[dgbVhl^iX]dkZgWZilZZcndjgeg^bVgnVcYVad\^XVahiVcYWn YViVWVhZ#>cDgVXaZ9ViVWVhZ&%gGZaZVhZ'!ndjYdcZZYidh]jiYdlcVaaVjm^a^Vgn^chiVcXZh _jhia^`ZVe]nh^XVahiVcYWnhl^iX]dkZgVhadc\VhndjgCOMPATIBILITY^hhZiid&%#'#%#'dg ]^\]Zg#>[COMPATIBILITY^hcdihZiid&%#'#%#'dgndjVgZjh^c\Veg^dgkZgh^dcd[DgVXaZ!i]Zc cdidcanYdndjcZZYidh]jiYdlci]ZVjm^a^Vgn^chiVcXZh!WjindjbjhiY^hVWaZi]Z^gi]gZVYhdc Wdi]i]Zeg^bVgnYViVWVhZVcYi]ZiVg\Ziad\^XVahiVcYWnYViVWVhZ#DcXZi]Zhl^iX]dkZg^h XdbeaZiZ!ndjXVcgZ"ZcVWaZi]Zi]gZVYhVcYgZhiVgii]Z^chiVcXZh#
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
321
NOTE As of Oracle Database 11\, you no longer need to shut down any database instance (primary or logical standby) when you perform a switchover between your primary and a logical standby database. 6hl^i]Ve]nh^XVahiVcYWn!ndjXVcX]ZX`i]ZSWITCHOVER_STATUSXdajbcd[V$DATABASE idbV`ZhjgZi]Vii]Zeg^bVgn^h^cVhiViZidXdch^YZgVhl^iX]dkZg/ SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE; SWITCHOVER_STATUS ----------------TO STANDBY
7jiWZ[dgZndjXVcXdbbZcXZi]Zhl^iX]dkZg!ndj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eg^bVgn#NdjYdcdicZZYidiZaai]Zad\^XVahiVcYWn l]ZgZidhZcYi]ZgZYdWZXVjhZ^i`cdlhl]ZgZi]Zeg^bVgn^hVcYdcandcZeg^bVgnYViVWVhZ XVcWZ^cV9ViV<jVgYXdc[^\jgVi^dc#L]^aZi]ZegZeVgZ^hgjcc^c\!ndjl^aahZZPREPARING DICTIONARY^ci]ZSWITCHOVER_STATUSXdajbcd[V$DATABASEk^Zl# I]ZgZVhdc[dgi]^hZmigVhiZe^hidZchjgZi]Vii]ZcZlad\^XVahiVcYWnYViVWVhZ`cdlh]dlid Veeani]ZgZYd[gdbi]ZcZleg^bVgni]ZbdbZcicZleg^bVgnigVchVXi^dchhiVgiid\ZcZgViZgZYd# >[ndjh`^ei]^hegZeVgVidgnhiZe!ndjl^aaWZ\ZcZgVi^c\gZYd[gdbWjh^cZhhigVchVXi^dchi]Vil^aa WZhZciidndjgad\^XVahiVcYWn#I]ZcZlY^Xi^dcVgnldjaYi]ZcWZWZ]^cYi]VigZYd!VcY^[ndj ]VYV[V^ajgZd[i]ZcZleg^bVgnWZ[dgZi]ZY^Xi^dcVgnlVhhZciidi]ZcZlad\^XVahiVcYWn!V [V^adkZgldjaYgZhjaih^cYViVadhh# DcXZi]ZY^Xi^dcVgn^hWj^aiVcYhZci!^il^aah]dlPREPARING SWITCHOVERVcYndjXVc Xdci^cjZ#NdjXVcX]ZX`i]^hWnadd`^c\Vii]Zhl^iX]dkZghiVijhV\V^c#Cdl^il^aahVnTO LOGICAL STANDBY^chiZVYd[TO STANDBYVh^i]VhgZXZ^kZYVcYegdXZhhZYi]ZcZlY^Xi^dcVgn VcY`cdlhl]d^h\d^c\idWZi]ZWdhh/ SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE; SWITCHOVER_STATUS ----------------TO LOGICAL STANDBY
322
DgVXaZ9ViV<jVgY&&g =VcYWdd`
6ii]^hed^ci!ndjVgZcdi&%%"eZgXZciXdbb^iiZYidi]Zhl^iX]dkZg!V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^dch]VkZVaaXdbb^iiZY!i]Zhl^iX]dkZgXdbeaZiZhVcY9ViV<jVgY ZcVWaZhi]ZGUARDdci]Zeg^bVgnidegZkZciVcnbdgZjeYViZhidi]ZYViV!Vhi]^h^hcdlVad\^XVa hiVcYWnYViVWVhZ# NOTE When you switchover, the SQL Apply AR is enabled to its highest level, ALL, which prevents anyone other than a SYSDBA user from updating anything in the logical standby, not just the tables that SQL Apply is maintaining from the primary. If you need to write to the , you will logical standby and previously lowered the guard to A on the new logical standby. have to set the guard manually to A FjZgn^c\i]Zhl^iX]dkZghiVijhdci]Zad\^XVahiVcYWnl^aaiZaandjl]Zc^i^hgZVYnidVhhjbZ i]Zeg^bVgngdaZ/ SQL> SELECT SWITCHOVER_STATUS FROM V$DATABASE; SWITCHOVER_STATUS ----------------TO PRIMARY
;^c^h]i]Zhl^iX]dkZg_jhiVhndjY^Y[dgi]Ze]nh^XVahiVcYWnhl^iX]dkZgWnZmZXji^c\i]Z COMMITXdbbVcYdci]Zad\^XVahiVcYWn/ SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY; Database altered.
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
323
NOTE Notice that we did not use the E on either of the two switchover commands in this case. This is because there is no need to knock users off to do the switchover with a logical standby. H^cXZi]ZgZlVhcdcZZYidh]jiYdlcVcnG68^chiVcXZh!ZkZgni]^c\dcWdi]h^YZh^hjeVcY gjcc^c\!VcYi]Zdcani]^c\aZ[iidYd^hidhiVgijeHFA6eeandci]ZcZlad\^XVahiVcYWn/ SQL> ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
6cnjhZg"VYYZYdW_ZXihidi]Zdg^\^cVaad\^XVahiVcYWncdli]Zeg^bVgnldjaYd[XdjghZcdi Zm^hi^ci]ZcZlad\^XVahiVcYWn!VcYi]Z^ggZYdldjaYWZh`^eeZYjci^andjXgZViZYVcY ^chiVci^ViZYi]ZbV\V^c^cndjgcZlad\^XVahiVcYWn# I]Vi^h^i6hl^i]e]nh^XVahiVcYWnhl^iX]dkZg!ndjgXa^Zcihl^iX]dkZgl^aadXXjgWVhZYdc ndjghZgk^XZgZadXVi^dchigViZ\n#
Using the Broker or Grid Control to Switchover LZlZcii]gdj\]i]ZEdlZgJhZgBZi]dY[^ghi^ci]^hX]VeiZghdi]VindjjcYZghiVcY9ViV<jVgY¼h jcYZg"i]Z"XdkZgegdXZhh^c\!h^cXZcdcZd[^i^hZmedhZYidi]ZjhZgl]ZcndjjhZ9c[VXi!ndjXVcVahdiV^ai]Z7gd`Zgad\VhlZaaVh i]ZVaZgiad\[dgZkZcbdgZ^c[dgbVi^dc#I]Z7gd`Zgad\^h^ci]ZhVbZY^gZXidgnVhi]ZYViVWVhZ VaZgiad\VcYWZ\^chl^i]DRC# DcXZndj]VkZXdbeaZiZYi]ZbVcYVidgnX]ZX`h!ndjXdccZXiid9 CONNECT sys@MATRIX_DR0 Password: Connected. DGMGRL> S ITC O ER TO MATRIX_DR0;
I]Vi¼hVWdjiVhh^beaZVh^iXVc\ZiCdG68Vjm^a^Vgn^chiVcXZh]jiYdlcVcYgZhiVgi[dg e]nh^XVahiVcYWnhl^iX]dkZg!cd8GHgZXdc[^\jgVi^dc!cdgZhiVgid[i]ZdaYeg^bVgn^[eZg[dgb^c\ Ve]nh^XVahiVcYWnhl^iX]dkZg!cdbVcjVahiVgijed[i]ZVeeanegdXZhh¸cdi]^c\!_jhiVh^c\aZ XdbbVcY# I]Z7gd`ZgYdZhVaad[i]ZegdXZhh^c\[dgndjgZ\VgYaZhhd[i]ZineZd[hiVcYWnndjVgZhl^iX]^c\ id#6cY
324
DgVXaZ9ViV<jVgY&&g =VcYWdd`
FIGURE 8-5.
Using Grid Control to switchover
Switchover Health Check 6hndjXVchZZ!eZg[dgb^c\Vhl^iX]dkZg^hcdiVY^[[^XjaiegdXZhh!ZkZc^[ndjjhZHFAEajh#I]Z VXijVaXdbbVcYhVgZkZgnh^beaZVcYcZZYidWZYdcZ^cdgYZg#I]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jVah]dlhi]Z V$DATAGUARD_STATSk^Zl/ SQL> SELECT NAME, VALUE, TIME_COMPUTED FROM V$DATAGUARD_STATS WHERE NAME LIKE '%lag%'; NAME VALUE TIME_COMPUTED ------------------ ---------------- -----------------------apply lag +00 00:00:00 20-JAN-2009 22:54:18 transport lag +00 00:00:00 20-JAN-2009 22:54:18 SQL>
I]^hl^aah]dlndjl]ZgZi]^hhiVcYWnYViVWVhZ¹i]^c`hº^i^h^cgZaVi^dcidi]Zeg^bVgn!Wji^i YdZhcdih]dlndjZmVXiani]ZaVhiH8Ci]VilVhgZXZ^kZY#NdjXVc[^cYi]^h^c[dgbVi^dcWnadd`^c\ Vii]ZhiVcYWngZYdad\[^aZhjh^c\V$STANDBY_LOG/ SQL> SELECT THREAD#,SEQUENCE#,LAST_CHANGE#,LAST_TIME FROM V$STANDBY_LOG; THREAD# SEQUENCE# LAST_CHANGE# LAST_TIME
326
DgVXaZ9ViV<jVgY&&g =VcYWdd`
---------- ---------- ------------ --------1 0 0 1 5 11 21-JAN-09 0 0 0 0 0 0
NOTE A E and LA In versions of Oracle prior to 11\, the LA L are only filled in when the RFS E columns of V$ A processes run down after they discover the disconnect from the primary. You may have to wait until they do run down to get a valid value from this view at failover time if you are not using Oracle Database 11\. DcXZndj]VkZhZaZXiZYndjgiVg\Zi!ndjVgZgZVYnid[V^adkZg#I]ZegdXZYjgZjhZYYZeZcYh dci]ZineZd[hiVcYWnndj]VkZX]dhZc#
Failing over to a Physical Standby 6[V^adkZgidVe]nh^XVahiVcYWn^hZmZXjiZYdcandci]ZiVg\ZihiVcYWnVcYjhZhhdbZd[i]ZhVbZ XdbbVcYhjhZY[dgVhl^iX]dkZg#6hl^i]Vhl^iX]dkZg!ndjbjhih]jiYdlcVaaWjii]Z^chiVcXZ d[VG68hiVcYWnl]ZgZi]ZBGE^hgjcc^c\#SHUTDOWNIMMEDIATEdgABORT]VhaZhh^bedgiVcXZ di]Zgi]VcheZZY^ci]^hXVhZ!h^cXZcdgZYd^hWZ^c\\ZcZgViZYWni]ZhiVcYWnVcY]ZcXZcdgZVa XgVh]gZXdkZgncZZYhidiV`ZeaVXZ# L]Zci]dhZ^chiVcXZhVgZh]jiYdlc!ndjbjhi[^ghiiZaai]ZVeeanegdXZhhi]Vii]Zeg^bVgn^h \dcZVcYi]^hhiVcYWnYViVWVhZ^h\d^c\idWZXdbZi]ZcZleg^bVgn#NdjYdi]^hWn^chigjXi^c\^i idVeeanVaai]ZgZYd^iXVcjh^c\VcVYY^i^dcVafjVa^[^Zgidi]ZRECOVER MANAGED STANDBY DATABASEXdbbVcY!FINISH#IdYdi]^h!ndj[^ghiXVcXZai]ZBGEVcYi]ZcgZhiVgi^il^i]i]Z ZmigVfjVa^[^Zg/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; Database altered. SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH; Database altered.
TIP If you have a gap in the redo and it is not possible for the MRP to apply all the redo it has received, the command will fail and VA E P AL you must revert to the old AL ER A A A E A A A A A E to failover your standby database, which will incur data loss from the last redo successfully applied onward. This command can also be used explicitly to prevent redo from being applied at failover time. I]^hiZaahi]ZBGEcdiidlV^iVcnadc\Zg[dgbdgZgZYdVcYidVeeanVaai]ZgZYd^iXVcVcY[^c^h] jeWnZbjaVi^c\i]Zhl^iX]dkZgXdbbVcYVii]Zeg^bVgnVcYeaVX^c\i]ZIZgb^cVa:DGI:DG^c i]Z]ZVYZgd[i]ZaVhigZYdad\[gdbi]Zeg^bVgn#NdjXVchZZi]^h^ci]ZVaZgiad\djieji/ ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH Attempt to do a Terminal Recovery (Matrix_DR0)
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
327
Media Recovery Start: Managed Standby Recovery (Matrix_DR0) Fast Parallel Media Recovery enabled Managed Standby Recovery not using Real Time Apply Terminal Recovery timestamp is '01/20/2009 23:56:20' Terminal Recovery: applying standby redo logs. Terminal Recovery: thread 1 seq# 377 redo required Terminal Recovery: Recovery of Online Redo Log: Thread 1 Group 6 Seq 377 Reading mem 0 Mem# 0: +DATA/matrix_dr0/onlinelog/group_6.265.671757787 Mem# 1: +FLASH/matrix_dr0/onlinelog/group_6.420.671757793 I E O R o or r a 1 c 3 Incomplete recovery applied all redo ever generated. Recovery completed through change 7658944 time 01/20/2009 20:55:47 Media Recovery Complete (Matrix_DR0) Terminal Recovery: successful completion Resetting standby activation ID 2216964717 (0x8424326d) Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH
6c^ciZgZhi^c\cdiZgZ\VgY^c\i]ZFINISHXdbbVcY^hi]Vi^ceg^dggZaZVhZh!i]ZZm^hiZcXZd[ G;HegdXZhhZhldjaYXVjhZi]Z[V^adkZgid[V^ah^cXZi]ZBGEXdch^YZgZYi]ZegZhZcXZd[VcG;H egdXZhhZk^YZcXZi]Vii]Zeg^bVgnlVhhi^aa[jcXi^dc^c\#6cY^ci]ViXVhZ!l]nVgZndj[V^a^c\ dkZg4>cDgVXaZ9ViVWVhZ&%gGZaZVhZ'!9ViV<jVgYVYYZYVFORCEfjVa^[^Zgi]ViVaadlhi]Z 976id[dgXZi]Zh]jiYdlcd[i]dhZZggVciG;HegdXZhhZh#>c&&g,FORCElVhbVYZi]ZYZ[Vjai VcYi]ZFORCEfjVa^[^ZgYZegZXViZY# DcXZi]ZFINISHXdbbVcY]VhXdbeaZiZY!i]ZegdiZXi^dcbdYZd[i]Zeg^bVgnYViVWVhZ^h adlZgZYidBVm^bjbEZg[dgbVcXZ!gZ\VgYaZhhd[^ihdg^\^cVaegdiZXi^dcbdYZ#I]^h^hYdcZhdi]Vi i]ZcZleg^bVgnYViVWVhZXVcdeZcl^i]djiVhiVcYWn^[ndj]VYdcandcZhiVcYWnYViVWVhZ!VcY ^i^hcdli]Z[V^aZYeg^bVgnYViVWVhZ#L^i]BVm^bjbEgdiZXi^dcbdYZ!^i^hZmigZbZan^bedgiVci i]Vii]ZegdiZXi^dcbdYZ^hadlZgZYidBVm^bjbEZg[dgbVcXZ^ci]^hXVhZ!h^cXZi]ZVWhZcXZd[V k^VWaZhiVcYWnl^aaegZkZcii]Zeg^bVgnYViVWVhZ[gdbdeZc^c\#>cVYY^i^dc!i]ZegdiZXi^dcaZkZa^h hZiidUNPROTECTEDVii]^hed^ci^ci]ZegdXZYjgZWZXVjhZ9ViV<jVgYYdZhcdiZkZc`cdl^[ndj ]VkZVhiVcYWnYViVWVhZXdc[^\jgZYidegdiZXi^il]ZcndjdeZc[dgWjh^cZhh/ Protection Mode Protection Level -------------------- -------------------MAXIMUM PERFORMANCE UN ROTECTED
I]ZhiVcYWnYViVWVhZ^hcdl^ci]ZhVbZeaVXZi]Vi^ilVh^ci]Zhl^iX]dkZgl]Zci]ZBGE Veea^ZYi]Z:DG¸^ca^bWd#CdlndjXVc^hhjZi]Zhl^iX]dkZgXdbbVcYVcYdeZci]ZcZl eg^bVgnYViVWVhZ/ SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN; Database altered. SQL> ALTER DATABASE OPEN; Database altered. SQL>
I]ZdeZcl^aaeVjhZl]^aZ9ViV<jVgYig^ZhidZhiVWa^h]VXdccZXi^dcl^i]i]ZhiVcYWn YViVWVhZhndj]VkZXdc[^\jgZY!l]^X]^cdjgXVhZ^hi]Z[V^aZYeg^bVgnYViVWVhZ#DcXZ^iig^Zh VXdjeaZd[i^bZh!i]ZdeZcl^aa[^c^h]VcYi]ZegdiZXi^dcaZkZad[i]ZYViVWVhZl^aaWZhZiid
328
DgVXaZ9ViV<jVgY&&g =VcYWdd`
Speeding Up the Open L]Zcgjcc^c\^cBVm^bjb6kV^aVW^a^in!ndjXVcYZ[Zgi]ZYZhi^cVi^dcjhZY[dgi]Zdg^\^cVa eg^bVgnYViVWVhZi]VindjYZ[^cZY[dghl^iX]dkZgjci^andjgZ^chiViZi]ZdaYeg^bVgnVhV hiVcYWnYViVWVhZ#>ci]^hbVccZg!9ViV<jVgYl^aacdiignidViiVX]idi]ZhiVcYWnWZ[dgZ Vaadl^c\i]ZYViVWVhZiddeZc#>[ndjlZgZgjcc^c\^cBVm^bjbEgdiZXi^dcbdYZVcYcd di]ZghiVcYWnlVhXdc[^\jgZYl^i]HNC8igVchedgi!ndjbjhiadlZgi]ZegdiZXi^dcbdYZid BVm^bjbEZg[dgbVcXZWZ[dgZeZg[dgb^c\i]Z[V^adkZg#
MAXIMUM PERFORMANCEjci^andjbVcjVaangV^hZ^iWVX`idAVAILABILITYdgPROTECTIONVh
gZfj^gZY/ Protection Mode Protection Level -------------------- -------------------MAXIMUM PERFORMANCE MAXIMUM PERFORMANCE
>[jhZghlZgZXdccZXiZYidi]Ze]nh^XVahiVcYWnjh^c\i]Z6Xi^kZ9ViV<jVgYdei^dc!i]Znl^aa WZiZgb^cViZYVhl^i]Vhl^iX]dkZg#Ndjcdl]VkZVcZleg^bVgnYViVWVhZ!VcYVhl^i]hl^iX]dkZg! i]ZXa^Zci[V^adkZgl^aadXXjgWVhZYdcndjghZgk^XZgZadXVi^dchigViZ\n#
Failing over to a Logical Standby 6hl^i]e]nh^XVahiVcYWn[V^adkZg!^[ndj]VkZV\Ve^ci]ZgZYd!ndjVgZ\d^c\id[V^adkZgidndjg ad\^XVahiVcYWnl^i]bV_dgYViVadhhjcaZhhndjXVchdbZ]dl[^cYVaai]Vib^hh^c\gZYd#7jii]^h ^hcdiVaaWVYcZlh#6hl^i]Vad\^XVahiVcYWnhl^iX]dkZg!ndjYdcdicZZYidh]jiYdlcVcnZmigV G68^chiVcXZh!cdgYdndj]VkZidiZgb^cViZVcnjhZghl]db^\]iWZViiVX]ZYidi]Zad\^XVa hiVcYWn#DcXZndj]VkZYZX^YZYid[V^adkZgidndjgad\^XVahiVcYWn!ndjZmZXjiZdcZXdbbVcY/ SQL> ALTER DATABASE ACTIVATE LOGICAL STANDBY DATABASE FINISH APPLY; Database altered. SQL>
CAUTION APPL qualifier to the logical If you do not specify the standby activate command, VaagZYdi]Vi]VhcdiWZZcVeea^ZYl^aa APPL qualifier should be used WZY^hXVgYZY. Omitting the only to prevent all the redo from being applied at failover time, after a LA A A A A E for example. L]Zci]^hXdbbVcYXdbeaZiZh!HFA6eeanl^aa]VkZVeea^ZYVaai]ZVkV^aVWaZgZYdjh^c\i]Z hVbZgjaZhVeea^ZYidi]Ze]nh^XVahiVcYWngZbZbWZgi]gZVYbZg\^c\VcYYViVadhh4!XdckZgiZY i]ZXdcigda[^aZidVeg^bVgnXdcigda[^aZ!VcYgZbdkZYi]ZGUARDhdi]ViVaajhZghXVcjeYViZVaa YViV^ci]ZYViVWVhZVhjhjVa#I]ZhVbZVYk^XZdcegdiZXi^dcbdYZhl^i]e]nh^XVahiVcYWn [V^adkZgbZci^dcZY^ci]ZaVhihZXi^dcVahdVeea^Zh]ZgZ!VhYdZhXa^Zci[V^adkZg# 6hl^i]Vhl^iX]dkZgidVad\^XVahiVcYWn!ndjbjhigZbZbWZgi]ViVcne]nh^XVahiVcYWn YViVWVhZhl^aacdadc\ZggZXZ^kZgZYd[gdbi]^hcZleg^bVgnWZXVjhZi]ZnVgZcdie]nh^XVaXde^Zh
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
329
d[i]ZcZleg^bVgnWjigVi]Zgd[i]ZdaYeg^bVgn#Di]Zgad\^XVahiVcYWnYViVWVhZhXVcWZ bVcjVaangZ^ciZ\gViZY#
Bringing Back the Old Primary Hdl]ViYdndjYdVWdjii]Zdg^\^cVaeg^bVgnYViVWVhZV[iZgV[V^adkZg4GZ\VgYaZhhd[l]^X]ineZ d[hiVcYWnndj[V^aZYdkZgid!^[i]VilVhndjgdcanhiVcYWnYViVWVhZndjVgZ\d^c\idWZgjcc^c\ jcegdiZXiZYjci^andjXVchZijeVcZlhiVcYWnYViVWVhZVcY\Zi^ihncX]gdc^oZY# >[ndjY^Ycdi[daadldjghj\\Zhi^dcVcYZcVWaZ;aVh]WVX`9ViVWVhZWZ[dgZndj]VYid[V^adkZg! ndjgdcanX]d^XZ^hidYZaZiZi]Zdg^\^cVaeg^bVgnYViVWVhZZkZc^[^i^h^ceZg[ZXiXdcY^i^dcVcYgZ" XgZViZ^i[daadl^c\i]ZegdXZYjgZhdjia^cZY^c8]VeiZg'# >[!dci]Zdi]Zg]VcY!ndjY^YZcVWaZ;aVh]WVX`9ViVWVhZWZ[dgZi]Zeg^bVgn[V^ajgZVcYi]Z dg^\^cVaeg^bVgnYViVWVhZ^hhi^aa^ciVXil]Zci]Zeg^bVgnh^iZXdbZhWVX`!ndjXVcZVh^anWg^c\ WVX`i]Zdg^\^cVaeg^bVgnVhVhiVcYWnl^i]V[Zlh^beaZhiZeh#I]^hegdXZYjgZ^hjhjVaangZ[ZggZY idVhreinstatement# CAUTION Be careful not to let the old primary database come back up as an open read-write primary database after you have failed over to a standby. This could cause your applications to connect to this stale database and begin generating transactions at the same time other client applications are connected to the real primary. We refer to this as a “split brain” situation that is difficult to recover from, at least for those transactions that were run on the old primary by mistake. Never let a failed primary database go beyond the mount phase if you have already failed over to a standby.
Reinstating the Primary After a Physical Standby Failover IdWZ\^ci]ZegdXZhh!lZcZZYid[^\jgZdjii]Zed^ciVil]^X]djghiVcYWnYViVWVhZWZXVbZi]Z eg^bVgnYViVWVhZ#H^cXZgZYd^hVeea^ZYWnH8C!lZcZZYi]Z[V^adkZgH8C[gdbi]ZcZleg^bVgn# L]ZcVe]nh^XVahiVcYWnWZXdbZhi]Zeg^bVgn!i]Z[V^adkZgH8C^hlg^iiZcidi]ZXdcigda[^aZVcY k^h^WaZi]gdj\]i]ZXdajbcSTANDBY_BECAME_PRIMARY_SCN/ SQL> SELECT TO_CHAR(STANDBY_BECAME_PRIMARY_SCN) FAILOVER_SCN FROM V$DATABASE; FAILOVER_SCN ---------------------------------------2
6gbZYl^i]i]^hH8CcjbWZg!lZXVc\dWVX`idi]Zdg^\^cVaeg^bVgnYViVWVhZ!bdjci^i! [aVh]^iWVX`idi]ViH8C!VcYXdckZgi^i^ceaVXZidVe]nh^XVahiVcYWnYViVWVhZ#6YYVgZhiVgi! VcYlZ]VkZVe]nh^XVahiVcYWnYViVWVhZV\V^c SQL> STARTUP MOUNT ORACLE instance started. Database mounted. SQL> FLASHBACK DATABASE TO SCN 2; Flashback complete. SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY;
330
DgVXaZ9ViV<jVgY&&g =VcYWdd`
Database altered. SQL> SHUTDOWN IMMEDIATE ORA-01507: database not mounted ORACLE instance shut down. SQL> STARTUP MOUNT ORACLE instance started. Database mounted.
I]ZcZleg^bVgn¼h6gX]e^c\egdXZhhl^aa[^cYi]ZhiVcYWnVcY^bbZY^ViZanWZ\^cidgZhdakZ Vcn\Veh^ci]ZgZYdVii]ZcZmiad\hl^iX]!VcYl^aahiVgihZcY^c\i]ZXjggZcigZYdhigZVb#CdllZ XVcgZhiVgii]ZBGEid\Zii]ZVeean\d^c\V\V^chdlZXVc\ZiXVj\]ijeVh[VhiVhedhh^WaZ/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT; Database altered. SQL>
LZcdl]VkZVgjcc^c\e]nh^XVahiVcYWni]Vi^hViH8C,+*-.)'!VcYi]ZBGEl^aahiVgiid add`[dggZYd[gdbi]Vied^cidc#>ci]ZcdgbVahZfjZcXZd[ZkZcih!i]ZBGEl^aacZZYi]ZgZYd i]Vi^hXdciV^cZY^chZfjZcXZcjbWZg(,,!WZXVjhZi]Vi^hl]ZgZlZlZgZdci]Zdg^\^cVaeg^bVgn l]Zci]Z[V^ajgZ]VeeZcZY#GZbZbWZgi]Vi!jca^`ZVhl^iX]dkZg!l]^X][dgXZhVad\hl^iX] [daadlZYWni]Z:DG^ci]Z]ZVYZgd[i]ZcZmiad\!i]ZFINISHXdbbVcYejihi]Z:DG^cidi]Z ]ZVYZgd[i]ZXjggZciad\[^aZ#I]^hWg^c\hjhWVX`idi]ZhjW_ZXid[THROUGH ALL SWITCHOVER# >[lZ]VYheZX^[^ZYi]^hYZegZXViZYfjVa^[^Zgl]ZclZhiVgiZYi]ZBGE!i]Zci]^h:DGldjaYWZ ^\cdgZYVcYi]ZVeeanldjaYXdci^cjZ#H^cXZlZY^YcdijhZ^ii]^hi^bZ!i]ZBGEhideeZY#7ji i]^hVahdidaYjhi]Vi^i`cdlhi]ZgZ^hbdgZgZYdWZndcYi]Z:DGVgX]^kZad\/ Media Recovery Log +FLASH/matrix/archivelog/2009_01_20/thread_1_seq_377.370.676680217 Identified End-Of-Redo for thread 1 sequence 377 Resetting standby activation ID 2216964717 (0x8424326d) Media Recovery End-Of-Redo indicator encountered Media Recovery Applied until change 7658944 MRP0: Media Recovery Complete: End-Of-REDO (Matrix) M a R co r arc o c o E O REDO MRP0: Background Media Recovery process shutdown (Matrix)
6aalZ]VkZidYd^hgZhiVgii]ZBGEdcXZV\V^c!VcY^il^aaXdci^cjZdcjci^a^hhZZhVcdi]Zg :DG^ci]Z^cXdb^c\gZYdVihdbZed^ci^ci]Z[jijgZ#6cdi]Zg^ciZgZhi^c\ed^ci^hi]ViV[V^adkZg ^c&&gl^aaVahdgZhZii]ZhZfjZcXZcjbWZgh[dgi]Zi]gZVYhiddcZbjX]a^`ZVcdeZcgZhZiad\h# >cDgVXaZ.i, i]^hldjaY]VkZYZhigdnZYdjghiVcYWnYViVWVhZ!WjicdiVcnbdgZ#H^cXZ&%g,9ViV <jVgY^hXVeVWaZd[egdXZhh^c\VgZhZia^`Zi]^hVcYVeean^c\dcanl]Vi^icZZYh[gdbi]ZdaYad\ higZVbVcYi]Zchl^iX]^c\dkZgidi]ZcZlad\higZVbi]ViWZ\^chVi&V\V^c/ Tue Jan 20 22:45:22 2009 ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT Attempt to start background Managed Standby Recovery process (Matrix) Tue Jan 20 22:45:22 2009 MRP0 started with pid=30, OS id=21131 MRP0: Background Managed Standby Recovery process started (Matrix)
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
331
Fast Parallel Media Recovery enabled Managed Standby Recovery starting Real Time Apply … parallel recovery started with 2 processes Waiting for all non-current ORLs to be archived... Media Recovery Log +FLASH/matrix/archivelog/2009_01_20/thread_1_seq_1.372.676680255 Media Recovery Log +FLASH/matrix/archivelog/2009_01_20/thread_1_seq_2.517.676680255 Completed: ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT
9ViV<jVgY\VegZhdaji^dcl^aaiV`ZeaVXZVcYVaai]Zb^hh^c\gZYd!h^cXZi]Z[V^adkZgl^aaWZ hZciidi]ZhiVcYWnVcYVeea^ZY!Wg^c\^c\jhWVX`idhncX]gdc^oVi^dcV\V^c!VcYlZl^aadcXZ bdgZWZegdiZXiZY#L]Zcndj]VkZhdbZeaVccZYYdlci^bZ!ndjXVcZmZXjiZVhl^iX]dkZgVcY gZijgcegdYjXi^dcegdXZhh^c\idi]Zdg^\^cVah^iZ!VcYgZijgci]Z9Gh^iZid^ihjhjVa[jcXi^dc! egdiZXi^c\ndjgYViV#
Reinstating After a Logical Standby Failover >[ndj[V^aZYdkZgidVad\^XVahiVcYWn!i]Zcndj]VkZidgZ^chiViZndjgdaYeg^bVgnYViVWVhZVh Vad\^XVahiVcYWn#I]ZdaYeg^bVgnXVccdiWZVe]nh^XVahiVcYWn!h^cXZ^i^hcdiVcZmVXiXdend[ i]ZcZleg^bVgn#9jg^c\i]ZgZ^chiViZbZciegdXZhh^il^aaWZXdbZVe]nh^XVahiVcYWnYViVWVhZ[dg VWg^Z[bdbZciWZ[dgZWZXdb^c\Vad\^XVahiVcYWn# 6hl^i]Ve]nh^XVahiVcYWngZ^chiViZbZci!ndjbjhi[^\jgZdjii]ZH8CVil]^X]i]Zad\^XVa hiVcYWnWZXVbZi]ZcZleg^bVgnYViVWVhZ#=dlZkZg!jca^`Zi]Ze]nh^XVahiVcYWnegdXZhh!^ci]^h egdXZhhndjXVccdijhZi]ZSTANDBY_BECAME_PRIMARY_SCN#I]Z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ggn!i]ZXdbbVcYndjcZZY^hlZaaYdXjbZciZY#?jhigjci]Z[daadl^c\ HFAdcndjgcZleg^bVgnYViVWVhZ/ SQL> SELECT merge_change# AS FLASHBACK_SCN, processed_change# AS RECOVERY_SCN FROM DBA_LOGSTDBY_HISTORY WHERE stream_sequence# = (SELECT MAX(stream_sequence#)-1 FROM DBA_LOGSTDBY_HISTORY); FLASHBACK_SCN RECOVERY_SCN ------------- -----------2
332
DgVXaZ9ViV<jVgY&&g =VcYWdd` NOTE If you are using Oracle Database 10\, these columns are not present and you have to use a time-based method to reinstate the old primary database rather than this SCN-based method.
IV`Zi]ZFLASHBACK_SCNcjbWZgVcY\didi]ZdaYeg^bVgn!hiVgi^ije^ci]ZMOUNThiViZ! VcY[aVh]^iWVX`idi]^hcjbWZg#I]Zc!_jhiVhl^i]e]nh^XVahiVcYWngZ^chiViZbZci!XdckZgi^iid Ve]nh^XVahiVcYWnYViVWVhZ/ SQL> STARTUP MOUNT ORACLE instance started. Database mounted. SQL> FLASHBACK DATABASE TO SCN 2; Flashback complete. SQL> ALTER DATABASE CONVERT TO PHYSICAL STANDBY; Database altered. SQL> SHUTDOWN IMMEDIATE ORA-01507: database not mounted ORACLE instance shut down. SQL> STARTUP MOUNT ORACLE instance started. Database mounted.
I]^h^hcdiVe]nh^XVahiVcYWnYViVWVhZ^ci]ZcdgbVahZchZ0^i^hVe]nh^XVahiVcYWnYViVWVhZ VaaWn^ihZa[!h^cXZ^i]Vhcdeg^bVgn#I]ZcZleg^bVgn]VhVY^[[ZgZciDBIDVcYDB_NAME!VcYi]^h e]nh^XVahiVcYWnl^aacZ^i]ZggZXZ^kZcdgVeeani]ZgZYd[gdbi]Zeg^bVgn!l]^X]ldjaYcdi]Zae VcnlVnh^cXZlZVgZhi^aab^hh^c\i]ZgZYd[gdbi]Z[aVh]WVX`i^bZidi]Z[V^adkZgi^bZ#HdlZ ]VkZid[^\jgZdjil]ViVgX]^kZad\hlZcZZY[gdbi]Zad\^XVahiVcYWnbZiVYViVVcY]VcY"[ZZY i]ZbidBGE#7VX`idi]ZcZleg^bVgn¸VcY!jh^c\i]ZildH8ChndjdWiV^cZY!ZmZXjiZi]^h XdbbVcY/ SQL> SELECT file_name FROM DBA_LOGSTDBY_LOG WHERE first_change# = recovery_scn AND next_change# > flashback_scn; NAME ----------------------------------------------------------------------+FLASH/matrix/archivelog/2009_01_20/thread_1_seq_376.370.676680217 +FLASH/matrix/archivelog/2009_01_20/thread_1_seq_377.372.676680255
I]^hl^aa\^kZndjVh]dgia^hid[VgX]^kZad\hi]VindjcZZYidXVggnWVX`idi]ZdaYeg^bVgn VcYbV`Zi]ZbVkV^aVWaZidi]ZBGEl]ZcndjhiVgi^ijeidXdci^cjZi]^hgZ^chiViZbZciegdXZhh# IdbV`Zi]ZbVkV^aVWaZidi]ZBGE!dcXZi]ZnVgZi]ZgZ!ndjcZZYidgZ\^hiZgi]ZbVh^[ndjlZgZ bVcjVaangZhdak^c\V\Ve!l]^X]!^c[VXi!ndjVgZ/ SQL> ALTER DATABASE REGISTER LOGFILE '
>';
>[Vaai]ZVgX]^kZad\hgZijgcZYWni]ZfjZgnVgZcdiVkV^aVWaZidWZgZ\^hiZgZYVii]ZdaYeg^bVgn! i]Zcndjgldg`^hYdcZ]ZgZVcYndjbjhigZWj^aYVad\^XVahiVcYWn[daadl^c\i]ZegdXZYjgZh djia^cZY^c8]VeiZg'#7ji^[Vaa\dZhlZaaVcYndj]VkZi]Zad\h!VcYi]ZgZ\^higVi^dclVhhjXXZhh[ja! i]ZcndjXVceZg[dgbi]ZcZmieVgi/iZaa^c\i]Ze]nh^XVahiVcYWnYViVWVhZ_jhi]dl[VgndjlVci^iid
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
333
gZXdkZgVcYcd[jgi]Zg#I]^hgZfj^gZhi]VindjjhZVcdi]ZgfjVa^[^Zgidi]ZbVcV\ZYgZXdkZgn XdbbVcYidhiVgii]ZBGE!jh^c\i]ZUNTIL CHANGEhnciVm/ SQL> RECOVER MANAGED STANDBY DATABASE UNTIL CHANGE Database altered.
;
I]^hfjVa^[^Zg^chigjXihi]ZBGEidgZXdkZgi]ZgZYdYViVjeid!Wjicdi^cXajY^c\!i]ZheZX^[^ZY H8Cl]^X]Va^\chi]Ze]nh^XVahiVcYWnl^i]i]Z[V^adkZged^cid[i]ZcZleg^bVgn#L]ZcYdcZ! i]ZBGEZm^ih!VcYi]^h^hl]ZgZ^iZcYh^ihh]dgia^[ZVhVe]nh^XVahiVcYWn#6Xi^kViZVcYdeZci]Z YViVWVhZ/ SQL> ALTER DATABASE ACTIVATE STANDBY DATABASE; Database altered. SQL> ALTER DATABASE OPEN; Database altered.
Ndjg[V^aZYeg^bVgnYViVWVhZ^hcdlgZVYnidVhhjbZ^ihgdaZVhi]ZcZlad\^XVahiVcYWn YViVWVhZ#7jiWZ[dgZ^iXVcYdi]^h!^icZZYhid`cdll]Vii]ZcZleg^bVgnadd`ha^`Zhd^iXVc egdXZhhi]ZgZYd¸i]Vi^h!^icZZYhi]ZAd\B^cZgY^Xi^dcVgn#7ji!jca^`Zi]ZegdXZYjgZ^c8]VeiZg 'l]ZgZndjY^Yi]ZWj^aYdci]Zeg^bVgnVcYjhZYi]ZBGEidgZXdkZgjeidi]ZWj^aYVcYi]Zc aZiHFA6eeaniV`ZdkZg!ndjVgZVagZVYneVhii]Vied^ci#HdndjcZZYidiZaandjgcZlad\^XVa hiVcYWnidVh`i]Zeg^bVgnYViVWVhZ[dgVcZlXdend[i]ZY^Xi^dcVgnVcYVaai]ZgZYd^cWZilZZc# IdYdi]^h!ndjjhZVcVYY^i^dcVafjVa^[^Zgdci]ZAd\^XVaHiVcYWnEgdXZhhAHEXdbbVcYXVaaZY NEW PRIMARY!l]^X]^chigjXihHFA6eeanid\Zii]ZY^Xi^dcVgndkZgVYViVWVhZa^c`i]Vindj egdk^YZ/ SQL> CREATE PUBLIC DATABASE LINK r a o ca CONNECT TO system IDENTIFIED BY password USING 'service_name_of_new_primary_database'; SQL> ALTER DATABASE START LOGICAL STANDBY APPLY NEW PRIMARY r a o ca Database altered.
HFA6eeanl^aaXdccZXiidi]ZcZleg^bVgnjh^c\i]ZYViVWVhZa^c`VcYgZig^ZkZi]ZAd\B^cZg Y^Xi^dcVgn#DcXZi]ZY^Xi^dcVgn]VhWZZcWj^ai!HFA6eeanl^aaVeeanVaai]ZgZYdhZci[gdbi]Z cZleg^bVgnVcY\Zi^ihZa[hncX]gdc^oZY# NOTE One thing to remember is that SQL Apply will apply redo only for objects that existed in the old primary database before the failover. As with switchover, any user-added objects to the original logical standby (now the primary) would of course not exist and their redo would be skipped until you created and instantiated them again in your new logical standby. NdjcdlVgZegdiZXiZYV\V^cWnndjgad\^XVahiVcYWn#I]^hbVnhZZba^`ZVXjbWZghdbZ egdXZhh!Wjii]ZhiZehVgZ[ZlVcYgZVaancdiiddY^[[^Xjaidgi^bZXdchjb^c\#6cYZmZXji^c\i]ZhZ hiZeh^hValVnh\d^c\idWZVadiZVh^ZgVcYbjX][VhiZgi]Vcjh^c\VcZlWVX`jeidXgZViZVcZl ad\^XVahiVcYWnYViVWVhZ#
334
DgVXaZ9ViV<jVgY&&g =VcYWdd`
Using the Broker or Grid Control to Failover Hd!V[iZgVaai]Vi!VgZlZ\d^c\idiZaandj_jhi]dlZVhn^i^hid[V^adkZgjh^c\i]Z7gd`Zgdg CONNECT sys@MATRIX_DR0 Password: Connected. DGMGRL> FAILO ER TO MATRIX_DR0;
6hl^i]hl^iX]dkZg!i]Z7gd`ZgYdZhVaad[i]ZegdXZhh^c\[dgndj#7jil]ViVWdjiVaai]dhZ gZ^chiViZbZcihiZehlZ_jhilZcii]gdj\]4I]Vi^hVadiZVh^Zg!idd#DcXZndj]VkZkZg^[^ZYi]Vi i]ZdaYeg^bVgn^hhi^aak^VWaZ!bdjci^iVcYZmZXjiZVh^c\aZ7gd`ZgXdbbVcY/ DGMGRL> REINSTATE DATABASE MATRIX;
>[i]Z7gd`ZgY^hXdkZgh^i^hcdiedhh^WaZidgZ^chiViZi]Z[V^aZYeg^bVgn!^il^aaiZaandjhd!VcY ndjbjhigZ"XgZViZi]ZhiVcYWnYViVWVhZ#;V^adkZgl^i][i]Z7gd`ZgiZaah[^i^hbdjciZYVagZVYn!dcZXa^X`^hZcdj\]#6hndjXVc hZZ!i]ZegdXZhhd[[V^adkZgVcYgZ^chiViZbZci^hbjX]h^beaZgl]Zci]Z7gd`Zg^h^ckdakZY#7ji^[ ndjVgZVEdlZgJhZg!i]ZhiZeh^ci]ZegZXZY^c\hZXi^dchVgZ[dgndj#
FIGURE 8-6.
Using Grid Control to failover
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
335
Myth Buster: No One Will Ever Allow Data Guard to Failover Automatically! I]^h^hhdbZi]^c\lZ]VkZ]ZVgYVadi#6adid[eZdeaZcdl\ZiidhaZZeVic^\]iWZXVjhZi]Z e]dcZYdZhc¼ig^c\l]ZcV[V^ajgZdXXjgh¸9ViV<jVgY]VhVagZVYnbdkZYegdYjXi^dc egdXZhh^c\idi]ZY^hVhiZggZXdkZgnh^iZ#Ign^i!ndjb^\]ia^`Z^i
Automatic Failover Cdli]Vindj]VkZ\diiZci]^h[Vg^cidi]^hWdd`!^i^hi^bZidiV`ZVlVa`dci]Zl^aYh^YZ#>[ ndji]dj\]ii]VilZ]VYVgZVhdc[dgheg^c`a^c\^c[dgbVi^dcVWdjii]Z7gd`ZgVcYibZVchi]Vil]Zci]ZgZ^hVegdWaZb!i]ZgZ^hcdgddb[dgZggdg!VcYeZdeaZbV`Z b^hiV`Zh!ZheZX^Vaanl]Zci]ZnVgZhigZhhZY#>iVahdbZVchi]VindjYdcdiZcYjegZan^c\dcV hXg^eidgYdXjbZcii]VilVhlg^iiZcWnhdbZdcZl]dbVncdadc\Zgldg`[dgi]ZXdbeVcn#
Fast-Start Failover Architecture I]ZVgX]^iZXijgZZbeadnZYWn;H;D^hVi]^gY"bZbWZgfjdgjbi]ViZchjgZhi]Vii]Z[V^adkZgdXXjgh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ZA$DZggdg#
N
"S c Arc r" 6eg^bVgn6G8=egdXZhh^hjcVWaZidVgX]^kZVcdca^cZgZYdad\ WZXVjhZi]ZVgX]^kZad\YZhi^cVi^dc^h[jaadgjcVkV^aVWaZ#
ro
" I]Zeg^bVgnXdcigda[^aZ^hXdggjeiZY#
o ar " 6Xg^i^XVaY^Xi^dcVgndW_ZXi^ci]Zeg^bVgnYViVWVhZ^h
I]Z7gd`Zg^hkZgnheZX^[^XVWdjii]ZXdcY^i^dciV\/ndjbjhiZciZgi]ZbVhVWdkZdgi]Z XdbbVcYl^aai]gdlVcZggdg#I]Z\ddYcZlh^hi]Vi^[i]ZeVgi^XjaVgXdcY^i^dc^hVagZVYnhZi!cd Zggdg^hgZijgcZY#NdjXVcVahd^chigjXii]Z7gd`Zgid[^gZd[[V[V^adkZg^[VheZX^[^XDG6Zggdg^h \ZcZgViZYWni]Zeg^bVgnYViVWVhZ#I]ZhZXdcY^i^dchldjaYWZhZiVh[daadlh/ ENABLE FAST_START FAILOVER CONDITION "Corrupted Controlfile"; ENABLE FAST_START FAILOVER CONDITION 27102;
I]gZZd[i]ZXdcY^i^dchVgZZcVWaZYWnYZ[Vjai^cV;H;DXdc[^\jgVi^dc!Vhh]dlc^ci]Z[daadl ZmXZgei[gdbVSHOW FAST_START FAILOVERXdbbVcY/ Configurable Failover Conditions Health Conditions: Corrupted Controlfile Corrupted Dictionary Inaccessible Logfile Stuck Archiver Datafile Offline Oracle Error Conditions: (none)
YES YES NO NO YES
;^cVaan!ndjXVcXdYZVcVeea^XVi^dcdghXg^eiid^c^i^ViZV[V^adkZg^[ndjgbdc^idg^c\iddah Y^hXdkZghdbZi]^c\i]Vindj`cdlidWZVegdWaZb!hjX]Vhi]ZXa^ZcihcdiWZ^c\VWaZidXdccZXi idi]Zeg^bVgnYViVWVhZ!VcY[V^a^c\dkZgldjaYVaadli]ZbidXdccZXiidi]Z9Gh^iZVcYXdci^cjZ egdXZhh^c\#Jh^c\i]ZDBMS_DG.INITIATE_FS_FAILOVEReVX`V\Z!ndjgVeea^XVi^dcXVcgZfjZhi i]ViV[V^adkZgWZ^c^i^ViZY^bbZY^ViZan/ DECLARE STATUS INTEGER; STATUS := DBMS_DG.INITIATE_FS_FAILOVER (''Failover Requested'')
>[STATUS^hgZijcZYVh%!i]ZcV[V^adkZgl^aaXdbbZcXZ#Di]Zgl^hZ!dcZd[h^medhh^WaZZggdgh l^aaWZgZijgcZYVcYi]Z[V^adkZgl^aacdi]VeeZc#I]ZhZVgZYdXjbZciZY^ci]ZPL/SQL Packages and Types ReferencebVcjVa# I]ZhZjhZg"YZ[^cZYXdcY^i^dchl^aaXVjhZi]Z7gd`Zgidh]jiYdlci]Zeg^bVgnYViVWVhZ ^bbZY^ViZanVcYeZg[dgbV[V^adkZgl^i]djilV^i^c\[dgi]Zi]gZh]daYi^bZgidZme^gZ#Hdndjl^aa lVciidjhZi]ZhZXdcY^i^dchXVgZ[jaan#
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
339
Enabling Fast-Start Failover Cdli]Vindj]VkZYZX^YZYl]ZgZndjVgZ\d^c\ideaVXZi]ZDWhZgkZgVcYegZeVgZYi]ZhnhiZb [dg^i!VcYndjjcYZghiVcYl]ZcV[V^adkZgl^aadXXjg!ndjXVchiVgihZii^c\je;H;D#Ndjbjhi bZZihZkZgVaegZgZfj^h^iZhWZ[dgZhZii^c\je;H;D!bdhid[l]^X]lZ]VkZWZZcY^hXjhh^c\ i]gdj\]djii]^hWdd`/ N JhZi]Z7gd`Zgl^i]Vaad[^ihegZgZfj^h^iZh# N :cVWaZ;aVh]WVX`9ViVWVhZdcWdi]i]Zeg^bVgnVcYi]ZhiVcYWn# N HZijei]ZXdc[^\jgVi^dcXdggZXian[dgi]ZegdiZXi^dcbdYZ# N HiVcYWngZYdad\[^aZhdcWdi]h^YZh N GZYdigVchedgihZijei]ZhVbZ^cWdi]Y^gZXi^dch N >chiVaai]ZDWhZgkZghnhiZbVcYXdc[^\jgZICHC6B:H# >[ndj]VkZWZZc[daadl^c\i]ZhZijeVcYhj\\Zhi^dch^ci]^hWdd`!ndjl^aa]VkZVagZVYn Xdc[^\jgZYndjg9ViV<jVgY^beaZbZciVi^dcidbZZiVaad[i]ZegZgZfj^h^iZh!l^i]i]ZZmXZei^dc d[i]ZDWhZgkZghnhiZb# Id\ZihiVgiZY!i]Z7gd`ZgcZZYhid`cdll]^X]hiVcYWnl^aaWZXdbZndjg;H;DiVg\Zi#>c VYY^i^dc!i]ViYViVWVhZ^cndjgXdc[^\jgVi^dccZZYhid`cdli]Vi^i^hi]Zeg^bVgni]Vil^aaWZXdbZ i]ZiVg\ZiV[iZgV[V^adkZg#>[ndj]VkZdcandcZhiVcYWnYViVWVhZ!i]Zci]Z7gd`Zg`cdlhl]^X] dcZidjhZdcandcZX]d^XZd[XdjghZVcYl^aahZii]ZegdeZgi^ZhVXXdgY^c\an#7ji^[ndj]VkZ bdgZi]VcdcZhiVcYWnYViVWVhZ!ndjbjhiZmea^X^ianiZaai]Z7gd`Zgl]^X]dcZidjhZ#I]ZcZmi ildXdbbVcYhl^aabV`Zi]ViX]Vc\ZVcYXVcWZgjc^cZ^i]ZgXVhZ/ DGMGRL> EDIT DATABASE MATRIX SET PROPERTY FastStartFailoverTarget = 'MATRIX_DR0'; Property "faststartfailovertarget" updated DGMGRL> EDIT DATABASE MATRIX_DR0 SET PROPERTY FastStartFailoverTarget = 'MATRIX'; Property "faststartfailovertarget" updated DGMGRL>
Cdli]Vii]Z7gd`Zg`cdlhl]^X]ildeVgi^ZhVgZ^ckdakZY^ci]ZhZije!^iVahdcZZYhid`cdl ]dladc\i]ZDWhZgkZgh]djaYlV^i^ihXdjciYdlci^bZgWZ[dgZhiVgi^c\i]Z[V^adkZg!_jhi^cXVhZ i]Zeg^bVgn^hcdigZVaanYdlc#I]^h^hgZ[ZggZYidVhi]ZFast-Start Failover threshold VcY^hV Xdc[^\jgVi^dcaZkZaegdeZgin!VhY^hXjhhZY^c8]VeiZg*# >c\ZcZgVa!^[ndjVgZcdijh^c\G68!ndjXVchZiVcnkVajZYdlcid+hZXdcYhi]ZYZ[Vjai^h(% YZeZcY^c\dcndjgcZildg`¼haViZcXnVcYgZa^VW^a^in#7ji^[ndjgeg^bVgnYViVWVhZ^hVG68!ndj cZZYidiV`Z^cidVXXdjcii]ZXajhiZggZXdc[^\jgVi^dcVcYb^hXdjcii^bZ#L]Zci]ZDWhZgkZg
FSFO and Protection Modes >cDgVXaZ9ViVWVhZ&%g,l]ZgZ;H;DlVh^cigdYjXZY!ndj]VYidWZgjcc^c\^cBVm^bjb 6kV^aVW^a^inbdYZidZcVWaZ;H;D#>c&&g,Wdi]BVm^bjb6kV^aVW^a^inVcYBVm^bjb EZg[dgbVcXZbdYZhVgZhjeedgiZY#NdjXVccdiZcVWaZ;H;Djh^c\BVm^bjbEgdiZXi^dcbdYZ#
340
DgVXaZ9ViV<jVgY&&g =VcYWdd`
adhZh^ihXdccZXi^dcidi]Zeg^bVgnG68^chiVcXZidl]^X]^ilVhViiVX]ZY!^il^aaignid\Zi gZViiVX]ZYidVhjgk^k^c\^chiVcXZ#7jii]Vi^chiVcXZbVnWZWjhngZXdkZg^c\i]Z[V^aZY^chiVcXZ VcYl^aacdiVchlZgg^\]iVlVn#>[^ihXdjciZgZme^gZhWZ[dgZVhjgk^k^c\^chiVcXZXVcgZean!i]Z DWhZgkZgl^aahiVgiV[V^adkZgVcYi]Zeg^bVgnl^aa]Vc\VcYZkZcijVaanVWdgi#6\ddYgjaZd[ i]jbW[dghZii^c\i]Zi]gZh]daYXdjciZg^hi]Zi^bZ^iiV`ZhndjgG68eg^bVgnidZk^XiVcdYZeajh '%hZXdcYh#;dgbdgZ^c[dgbVi^dcVcYXjggZcii]^c`^c\dchZii^c\ndjgi]gZh]daY!gZ[Zgidi]Z B66;Vhi"HiVgi;V^adkZgeVeZg#( DGMGRL> EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold = 45; Property "faststartfailoverthreshold" updated DGMGRL>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gcdiidgZ^chiViZi]Z[V^aZYeg^bVgnVjidbVi^XVaanWnhZii^c\i]ZegdeZgin FastStartFailoverAutoReinstateidFALSE#=dlZkZg!_jhia^`Zi]Zeg^bVgnh]jiYdlc egdeZgin!i]^hegdeZgin^h^\cdgZY^[i]ZgZVhdc[dgi]Z[V^adkZglVhYjZidVjhZg"YZ[^cZYZkZci dgVYViV[^aZd[[a^cZZggdg#I]Z7gd`Zgl^aacZkZgignVcVjidbVi^XgZ^chiViZbZci^ci]ZhZXVhZh! VcYndjbjhigZbZYni]ZegdWaZbVcYeZg[dgbVbVcjVagZ^chiViZjh^c\i]Z9 ENABLE FAST_START FAILOVER; Error: ORA-16651: requirements not met for enabling fast-start failover
6fj^X`oerr ORA 16651l^aa\^kZndjVc^XZa^hid[l]VindjcZZYidX]ZX`#;^mi]Z egdWaZbVcYignV\V^c/ DGMGRL> ENABLE FAST_START FAILOVER; Enabled. DGMGRL> SHOW FAST_START FAILOVER; Fast-Start Failover: ENABLED Threshold: 45 seconds Target: matrix_dr0 Observer: (none) Lag Limit: 60 seconds (not in use) Shutdown Primary: TRUE Auto-reinstate: TRUE Configurable Failover Conditions
342
DgVXaZ9ViV<jVgY&&g =VcYWdd`
Health Conditions: Corrupted Controlfile Corrupted Dictionary Inaccessible Logfile Stuck Archiver Datafile Offline Oracle Error Conditions: (none) DGMGRL>
YES YES NO NO YES
CdlndjXVchZZZmVXianl]Vindj]VkZXdc[^\jgZY#I]Zdcani]^c\aZ[iidYd^hidhiVgii]Z DWhZgkZgdc^ihhnhiZb#L]Zci]ZDWhZgkZghiVgih!^il^aadeZcV[^aZXVaaZY;H;D#YVi^ci]Z XjggZciY^gZXidgnWnYZ[Vjai!l]ZgZ^il^aahidgZ^ihXdc[^\jgVi^dc^c[dgbVi^dcVWdjii]Z;H;DhZije ^i^hXdcigdaa^c\#H^cXZ^i^hedhh^WaZid]VkZbdgZi]VcdcZDWhZgkZgdci]ZhVbZhnhiZb Xdcigdaa^c\bjai^eaZ;H;DXdc[^\jgVi^dch!^i^hV\ddY^YZVidfjVa^[nl]ZgZi]^h[^aZh]djaY\dVcY l]VicVbZ^ih]djaYjhZ#I]^h^hhdi]Zbjai^eaZDWhZgkZghYdcdi\Zi^cidV[^\]iVWdjil]ddlch ;H;D#YViVcYi]ZgZ^hcdX]VcXZi]ViVcDWhZgkZgb^\]i\Zii]Zlgdc\Xdc[^\jgVi^dc[^aZ#I]^h^h YdcZWneaVX^c\i]ZFILEfjVa^[^Zgdcidi]ZSTARTXdbbVcY/ [Matrix] dgmgrl sys/oracle@matrix_dr0 DGMGRL for Linux: Version 11.1.0.6.0 – Production Copyright (c) 2000, 2005, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. Connected. DGMGRL> START OBSERVER FILE o r a Ma r a ; Observer started
I]ZDWhZgkZgl^aahiVn^ci]^hl^cYdljci^andjhide^i[gdbVcdi]Zg9
i]VihdlZXVcXjiVcYeVhiZi]Zdjieji[dgZmVbeaZh]ZgZ!Wjindjh]djaYgZY^gZXii]Z9
Your Path>/Matrix.log sys/oracle@matrix_dr0
L]ZcndjhiVgii]ZDWhZgkZg[gdb SHOW CONFIGURATION VERBOSE; Configuration Name: matrix Enabled: YES Protection Mode: MaxAvailability Databases: matrix - Primary database matrix_dr0 - Physical standby database - Fast-Start Failover target
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
343
Fast-Start Failover: ENABLED Threshold: 45 seconds Target: matrix_dr0 O r r a Lag Limit: 60 seconds (not in use) Shutdown Primary: TRUE Auto-reinstate: TRUE Current status for "matrix": SUCCESS
I]Zh^beaZhilVnidiZhi;H;D^hideZg[dgbVSHUTDOWN ABORTdci]Zeg^bVgnYViVWVhZ# L]Zci]Zeg^bVgn\dZhYdlc!i]ZDWhZgkZgl^aaYZiZXii]ZXgVh]VcYhiVgi^ihXdjciYdlc#6[iZg i]ZXdjciYdlcZme^gZh!^il^aa^c^i^ViZi]Z[V^adkZg#>ci]ZDWhZgkZgl^cYdl!ndjXVchZZl]Vii]Z DWhZgkZg^hYd^c\/ DGMGRL> START OBSERVER; Observer started 16:58:50.43 Friday, January 23, 2009 Initiating Fast-Start Failover to database "matrix_dr0"... Performing failover NOW, please wait... Failover succeeded, new primary is "matrix_dr0" 17:01:32.76 Friday, January 23, 2009
EgdYjXi^dc^hcdlgjcc^c\dcdjghiVcYWnYViVWVhZ!BVig^mT9G%!VcYVaa^hlZaa!l^i]i]Z ZmXZei^dcd[djg[V^aZYeg^bVgnYViVWVhZ/ DGMGRL> SHOW CONFIGURATION VERBOSE; Configuration Name: matrix Enabled: YES Protection Mode: MaxAvailability Databases: ma r _ r0 r mar a a a matrix - Physical standby database ( a - Fast-Start Failover target Fast-Start Failover: ENABLED Threshold: 45 seconds Target: matrix Observer: stadu67 Lag Limit: 60 seconds (not in use) Shutdown Primary: TRUE Auto-reinstate: TRUE Current status for "matrix": ar ORA 1 0 o or mor a a a a ar
)
I]ZDG6"&++%-^h^hhjZYWZXVjhZBVig^m^hYdlc#6aalZ]VkZidYdid\Zidjgdg^\^cVa eg^bVgnYViVWVhZWVX`^cidi]Z[daYVcYegdiZXi^c\djgcZleg^bVgn^hidhiVgi^ije/ SQL> STARTUP ORACLE instance started.
344
DgVXaZ9ViV<jVgY&&g =VcYWdd`
Total System Global Area 535662592 bytes Fixed Size 1301112 bytes Variable Size 394265992 bytes Database Buffers 134217728 bytes Redo Buffers 5877760 bytes Database mounted. ORA 1 po a o r o a o r a a a
pr
a a a
op
6hndjXVchZZ!i]Z7gd`ZgegZkZciZYi]ZdaYeg^bVgn[gdbXdb^c\Vaai]ZlVnjeWZXVjhZ^i lVhidaYV[V^adkZg]VYdXXjggZY#>ci]ZDWhZgkZgl^cYdl!ndjl^aahZZl]ZgZi]ZDWhZgkZghiVgih i]ZgZ^chiViZbZciegdXZhh/ 17:07:40.89 Friday, January 23, 2009 Initiating reinstatement for database "matrix"... Reinstating database "matrix", please wait... Operation requires shutdown of instance "Matrix" on database "matrix" Shutting down instance "Matrix"... ORA-01109: database not open Database dismounted. ORACLE instance shut down. Operation requires startup of instance "Matrix" on database "matrix" Starting instance "Matrix"... ORACLE instance started. Database mounted. Continuing to reinstate database "matrix" ... Reinstatement of database "matrix" succeeded 17:09:16.32 Friday, January 23, 2009
LZY^Ycdi]VkZidYdVcnd[i]ZgZ^chiViZbZcihiZehlZlZcii]gdj\]ZVga^Zg^ci]^hX]VeiZg# I]ZnlZgZVaaYdcZ[dgjh!VcYlZVgZcdlWVX`jedcWdi]h^YZh![jaanegdiZXiZYVcYgZVYn[dg i]ZcZmi[V^ajgZ/ DGMGRL> SHOW CONFIGURATION VERBOSE; Configuration Name: matrix Enabled: YES Protection Mode: MaxAvailability Databases: matrix_dr0 - Primary database matrix - Physical standby database - Fast-Start Failover target Fast-Start Failover: ENABLED Threshold: 45 seconds Target: matrix Observer: stadu67 Lag Limit: 60 seconds (not in use) Shutdown Primary: TRUE Auto-reinstate: TRUE Current status for "matrix": SUCCESS
8]VeiZg-/ Hl^iX]dkZgVcY;V^adkZg
FIGURE 8-7.
345
Using Grid Control to configure FSFO
A^[Z^h\ddY#Hd^hhaZZe7jilV^i!Ydc¼i\didhaZZe_jhinZi#LdjaYc¼indja^`ZidhZZ]dlZVhn ^i^hidZcVWaZ;H;Dl^i]il^aaYdVaad[i]Zldg`lZ_jhiejindji]gdj\]!^cXajY^c\ hZii^c\jeVaai]ZegZgZfj^h^iZh#LZ¼kZgZhZii]ZXdc[^\jgVi^dcid^ihdg^\^cVahiViZ!^cXajY^c\Y^hVWa^c\ ;aVh]WVX`9ViVWVhZ#Dci]Z9ViV<jVgY]dbZeV\Z!ndjhiVgii]Z;Vhi"HiVgi;V^adkZgL^oVgYWn Xa^X`^c\i]Z9^hVWaZYa^c`cZmiidi]Z;H;DcVbZ!Vhh]dlc^c;^\jgZ-",# I]^hl^aaiV`Zndjidi]Z[^ghieV\Z!l]ZgZndjl^aaXdc[^\jgZi]ZDWhZgkZgVcYbV`ZVcn X]Vc\Zhidi]Z;H;Dh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jVgY]VhZcVWaZY6Xi^kZ 9ViV<jVgYidVXXdbea^h]i]^h\dVa/Egdk^YZVgZVY"dcane]nh^XVahiVcYWnYViVWVhZi]ViXVc XdcXjggZcianhZgkZVhY^hVhiZggZXdkZgnl^i]djiVgZhiVgiWZ^c\gZfj^gZY# I]Z[daadl^c\hiZehVgZgZfj^gZYidZcVWaZVe]nh^XVahiVcYWnYViVWVhZ^cgZVY"dcanbdYZ/ N >[i]Ze]nh^XVahiVcYWn^hXjggZcianh]jiYdlc!jhZi]^h/ SQL> STARTUP;
N >[i]Ze]nh^XVahiVcYWn^hXjggZcian^cbVcV\ZYgZXdkZgnbdYZVeean^c\gZYd!jhZi]^h/ 1.
8VcXZai]ZGZYd6eean/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
2.
DeZci]ZYViVWVhZ[dggZVY"dcanVXXZhh/ SQL> ALTER DATABASE OPEN;
N IdgZijgci]ZYViVWVhZ[gdbgZVY"dcanidVeean^c\gZYd!gZhiVgii]ZhiVcYWnYViVWVhZ^c i]ZBDJCIbdYZVcYjhZi]^hXdbbVcY/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE 2> DISCONNECT FROM SESSION;
8]VeiZg./ 6Xi^kZ9ViV<jVgY
353
N >[ndjlVciidZcVWaZgZVa"i^bZVeeand[gZYd!jhZi]^h/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE 2> USING CURRENT LOGFILE DISCONNECT;
>cgZk^Zl!i]ZgZ^hcdgZVaY^[[ZgZcXZWZilZZci]Z^beaZbZciVi^dcd[Ve]nh^XVahiVcYWni]Vi ]VhWZZcdeZcZYgZVY"dcan^cDgVXaZ9ViVWVhZ&%gdgDgVXaZ9ViVWVhZ&&g^cVWVh^XgZVY"dcan Xdc[^\jgVi^dc#I]Zbdhi^bedgiVciXdcXZeiidgZbZbWZg^hi]VicdgZYdl^aaWZVeea^ZYidi]Z e]nh^XVahiVcYWnl]^aZi]Z^chiVcXZ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ceaVXZidbV^ciV^cegdiZXi^dc[dgi]Z eg^bVgnYViVWVhZ# >cDgVXaZ9ViVWVhZ&&g,i]dj\]!gZYdXdci^cjZhidh]^e[gdbi]Zeg^bVgnidi]ZhcVeh]di hiVcYWn!WjicdgZYd^hVeea^ZYVcYndjggZXdkZgni^bZdW_ZXi^kZGIDl^aaWZadc\Zg^[ndj]VkZ id[V^adkZgYjg^c\i]ZhcVeh]dieZg^dY#
Read-Write Standby in Oracle Database 10g IdXgZViZVe]nh^XVahiVcYWnVcYdeZc^iVhVgZVY"lg^iZXadcZd[i]Zeg^bVgnYViVWVhZ!ndj¼aa cZZYideZg[dgbi]Z[daadl^c\hiZeh/ 1. EgZeVgZi]Ze]nh^XVahiVcYWnidZcVWaZV\jVgVciZZYgZhidgZed^ci#7ZXVjhZ;aVh]WVX` 9ViVWVhZgZfj^gZhi]Vii]Z[aVh]WVX`ad\hgZh^YZ^ci]Z[aVh]gZXdkZgnVgZV;G6lZcZZY idhZijeV[aVh]gZXdkZgnVgZ^[lZYdcdi]VkZdcZ/ SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=20G; SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='+FLASH';
NOTE Although we have set up our flash recovery area in Automatic Storage Management (ASM), you can also set up your flashback recovery area in a normal disk directory. In that case, you would use something like ER _F LE_ EST ' rc or d t ' this: _RE
354
DgVXaZ9ViV<jVgY&&g=VcYWdd` 2. 8gZViZV\jVgVciZZYgZhidgZed^ciVcYXVcXZagZYdVeean/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; SQL> CREATE RESTORE POINT before_open_standby GUARANTEE FLASHBACK DATABASE;
8gZVi^c\VcZVhn"id"gZbZbWZgcVbZhjX]Vhbefore_open_standbyVjidbVi^XVaan VhhdX^ViZh^il^i]VcH8Cdgi^bZhiVbe#L]ZcndjaViZgcZZYid[aVh]WVX`i]ZYViVWVhZ idgZhidgZ^iidVegZk^djhed^ci^ci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]Z e]nh^XVahiVcYWnYViVWVhZidjhZVgX]^kZ\VegZhdaji^dcid[ZiX]Vcnb^hh^c\VgX]^kZY gZYdad\hVcYVaadlGZYd6eeanidVeeani]Zad\h#IdXdbeaZiZi]^hegdXZhh!eZg[dgbi]Z [daadl^c\hiZe/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
=dlZkZg!^[i]ZVXi^kViZYe]nh^XVahiVcYWn]Vh[VaaZchj[[^X^ZcianWZ]^cYi]Zeg^bVgnYViVWVhZ! h^beanVaadl^c\\VegZhdaji^dciddXXjg^hcdiVk^VWaZVaiZgcVi^kZ#>ildjaYgZhjai^ciddbVcn VgX]^kZad\hWZ^c\gZfjZhiZY[dg\VegZhdaji^dc#>iXdjaYVahdWZi]ViVaad[i]ZcZXZhhVgnVgX]^kZ ad\hVgZcdiVkV^aVWaZdcY^h`VcnbdgZVii]Zeg^bVgnYViVWVhZ#>ci]^hhXZcVg^d!^iWZXdbZh cZXZhhVgnidiV`ZVc^cXgZbZciVaWVX`jed[i]Zeg^bVgnYViVWVhZVcYVeeani]Viidi]Ze]nh^XVa hiVcYWnYViVWVhZjh^c\GB6CidgZhncX]gdc^oZi]ZhiVcYWnYViVWVhZl^i]i]Zeg^bVgn# NOTE This procedure can also be used if the apply process was unable to resolve an archive log gap due to corruption of the archive log or a large gap in the redo between the primary and the standby. If this is the case, make sure that Redo Apply has been stopped first by executing the ALTER ATA ASE RE ER A A E STA ATA ASE A EL; command. IdXdbeaZiZi]^hegdXZYjgZ!jhZi]Z[daadl^c\hiZeh/ 1. >YZci^[ni]ZXjggZciH8Cdci]Ze]nh^XVahiVcYWnYViVWVhZWZ[dgZhiVgi^c\i]Z^cXgZbZciVa WVX`je!Vhi]ZWVX`jebjhiWZXgZViZY[gdbi]^hH8C[dglVgY#Dci]Ze]nh^XVahiVcYWn YViVWVhZ!ZmZXjiZi]Z[daadl^c\XdbbVcY/ SQL>SELECT CURRENT_SCN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scpi]ZWVX`jehZih[gdbi]Zeg^bVgnYViVWVhZcVbZYBVig^midi]Ze]nh^XVa hiVcYWnYViVWVhZcVbZYBVig^mT9G%!ndjldjaYZmZXjiZi]Z[daadl^c\XdbbVcY/ $scp /$ORACLE_HOME/dbs/FORSTDBYSYNCH_* MATRIX_DR0:/tmp
5. 6[iZgbdk^c\i]Z^cXgZbZciVaWVX`jee^ZXZhidi]Ze]nh^XVahiVcYWnYViVWVhZ!i]ZWVX`je e^ZXZhbjhiWZXViVad\ZY^cGB6C#I]ZcndjXVcgZXdkZgi]ZhiVcYWnYViVWVhZl^i] i]ZXViVad\ZY^cXgZbZciVaWVX`jee^ZXZh#=ZgZ¼h]dlideZg[dgbi]ZhZhiZeh[gdbi]Z e]nh^XVahiVcYWnYViVWVhZ/ $rman target / RMAN> CATALOG START WITH '/tmp/FORSTDBYSYNCH'; RMAN> RECOVER DATABASE NOREDO;
6. 7Z[dgZi]Ze]nh^XVahiVcYWnYViVWVhZXVcWngZijgcZYid^ihdg^\^cVahiViZ!V[ZlbdgZ hiZehgZbV^c#NdjbjhiXgZViZVhiVcYWnXdcigda[^aZWVX`jedci]Zeg^bVgnYViVWVhZVcY gZhidgZ^idci]Ze]nh^XVahiVcYWnYViVWVhZ#8dccZXiidi]ZEg^bVgnYViVWVhZVcYZmZXjiZ i]ZhZXdbbVcYh RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY FORMAT '/tmp/FORSTDBYCTRL.bak'; $scp /tmp/FORSTDBYCTRL.bak MATRIX_DR0:/tmp
7. 7VX`dci]Ze]nh^XVahiVcYWnYViVWVhZ!Ydi]^h/ RMAN> SHUTDOWN; RMAN> STARTUP MOUNT;
8. >[i]Zeg^bVgnVcYhiVcYWnYViV[^aZY^gZXidg^ZhVgZcdi^YZci^XVa!ndjcZZYidXdbeaZiZi]^h ^ciZgbZY^ViZhiZeVcYdci]Ze]nh^XVahiVcYWnYViVWVhZ!XdccZXiidGB6CVcYXViVad\ i]ZhiVcYWnYViV[^aZh!VcYhl^iX]i]ZYViVWVhZidjhZi]Z_jhi"XViVad\ZYYViV[^aZh/ RMAN> CATALOG START WITH '+DATA/MATRIX_DR0/DATAFILE/'; RMAN> SWITCH DATABASE TO COPY;
9. I]ZhVbZh^ijVi^dcZm^hihl^i]i]ZgZYdad\Y^gZXidg^Zhi]ViZm^hiZYl^i]i]ZYViV[^aZ Y^gZXidg^Zh#6\V^c!i]^h^hVc^ciZgbZY^ViZhiZe!VcY^[i]ZY^gZXidg^ZhVgZi]ZhVbZ!^i XVcWZh`^eeZY#Di]Zgl^hZ!jhZasmcmd^[^i^hVc6HB"bVcV\ZYYViVWVhZ!dgjhZVc DHji^a^inidgZbdkZVaadca^cZVcYhiVcYWngZYdad\h[gdbi]ZhiVcYWnY^gZXidg^Zh#
8]VeiZg./ 6Xi^kZ9ViV<jVgY
357
>cVYY^i^dc!bV`ZhjgZi]Vii]ZLOG_FILE_NAME_CONVERTeVgVbZiZg]VhWZZchZiid XdckZgii]ZY^gZXidgneVi]h[gdbBVig^midBVig^mT9G%#6hVcZmVbeaZ!ndjldjaY ^cXajYZi]Z[daadl^c\^cndjgeVgVbZiZg[^aZ/ LOG_FILE_NAME_CONVERT='/MATRIX/','MATRIX_DR0/'.
10. NdjVahdcZZYidXaZVgVaad[i]ZgZYdad\\gdjehdci]ZhiVcYWn/ SQL> ALTER DATABASE CLEAR LOGFILE GROUP1; SQL> ALTER DATABASE CLEAR LOGFILE GROUP2;
11. L]Zcndj]VkZhjXXZhh[jaanXaZVgZYVaahiVcYWngZYdad\\gdjeh!gZ"ZcVWaZ;aVh]WVX` 9ViVWVhZdci]Ze]nh^XVahiVcYWnYViVWVhZ/ SQL> ALTER DATABASE FLASHBACK OFF; SQL> ALTER DATABASE FLASHBACK ON;
12. ;^cVaan!hi^aadci]Ze]nh^XVahiVcYWn!gZhiVgii]ZbVcV\ZYgZXdkZgnegdXZhh/ SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LO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VcY ZcVWaZYXdggZXian!VhY^hXjhhZY^c8]VeiZg*#;djg`Zn^iZbhVgZgZfj^gZY^cXdc[^\jg^c\i]Z9ViV <jVgY7gd`Zg!YZeZcY^c\dcndjgZck^gdcbZci/ N HZii]ZDG_BROKER_START^c^i^Va^oVi^dceVgVbZiZg# N 8gZViZi]Z9ViV<jVgY7gd`ZghZgk^XZ[dgi]Za^hiZcZg# N 8gZViZi]Z7gd`ZgXdc[^\jgVi^dc# N :cVWaZi]Z7gd`ZgXdc[^\jgVi^dc# ?jhiVhl^i]i]ZDgVXaZ9ViVWVhZ&%ghcVeh]dihiVcYWn!lZcZZYidZcVWaZ;aVh]WVX`9ViVWVhZ dci]Ze]nh^XVahiVcYWnYViVWVhZ^[^i^hcdiVagZVYnZcVWaZY#IdYZiZgb^cZl]Zi]Zg;aVh]WVX` 9ViVWVhZ^hZcVWaZYdci]Ze]nh^XVahiVcYWnYViVWVhZ!fjZgnV$DATABASEVh[daadlh/ [oracle@matrix_dr0 app]$ sqlplus / as sysdba SQL*Plus: Release 11.1.0.6.0 - Production on Wed Oct 29 09:58:29 2008 Copyright (c) 1982, 2007, Oracle. All rights reserved Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> SELECT FLASHBACK_ON FROM V$DATABASE; FLASHBACK_ON -----------------NO
NdjYdcdicZZYidZcVWaZ;aVh]WVX`9ViVWVhZZmea^X^ianidjhZVhcVeh]dihiVcYWnYViVWVhZ Vhadc\Vhi]Ze]nh^XVahiVcYWn^hcdideZc^cgZVY"dcanbdYZ#HcVeh]dihiVcYWnjhZhV \jVgVciZZYgZhidgZed^ci CONNECT sys/oracle Connected. DGMGRL> EDIT DATABASE 'MATRIX_DR0'SET STATE='APPLY-OFF'; Succeeded. DGMGRL> EXIT [oracle@matrix_dr0 ]
2. CZmi!ZcVWaZ;aVh]WVX`9ViVWVhZdci]Ze]nh^XVahiVcYWnYViVWVhZi]gdj\]HFAEajh l]^aZi]ZYViVWVhZ^h^cVBDJCIhiViZ#>[ndjge]nh^XVahiVcYWn^hdeZcgZVY"dcanVii]^h i^bZ!ndjcZZYidh]ji^iYdlcVcYWg^c\^iWVX`idi]ZBDJCIhiViZVh[daadlh/ [oracle@matrix_dr0 ]$sqlplus / as sysdba SQL> SHUTDOWN IMMEDIATE Database closed. Database dismounted. ORACLE instance shut down.
8]VeiZg./ 6Xi^kZ9ViV<jVgY SQL>STARTUP MOUNT ORACLE instance started. Total System Global Area Fixed Si e Variable Si e Database Buffers Redo Buffers Database mounted.
422670336 1300352 276826240 138412032 6131712
359
bytes bytes bytes bytes bytes
3. DcXZWVX`^ci]ZBDJCIhiViZ!ZcVWaZ;aVh]WVX`9ViVWVhZ/ SQL> ALTER DATABASE FLASHBACK ON; Database altered.
4. Cdli]Vi;aVh]WVX`9ViVWVhZ^hZcVWaZY!ndjXVcV\V^cZcVWaZi]ZVeea^XVi^dcd[gZYd idi]Ze]nh^XVahiVcYWnYViVWVhZ^cegZeVgVi^dc[dgXdckZgi^c\^iid[jaanjeYViVWaZ#H^cXZ ndjVgZjh^c\i]Z7gd`Zg!jhZ9 CONNECT sys/oracle Connected. DGMGRL> EDIT DATABASE 'MATRIX_DR0'SET STATE='APPLY-ON'; Succeeded.
5. NdjVgZcdlgZVYnidYdi]ZVXijVaXdckZgh^dcidVhcVeh]dihiVcYWn#6aandj]VkZidYd ^hZciZgi]Z[daadl^c\XdbbVcYid9 CONVERT DATABASE 'MATRIX_DR0' TO SNAPSHOT STANDBY; Converting database "MATRIX_DR0" to a Snapshot Standby database, please wait. Database "MATRIX_DR0" converted successfully
6. 6[iZgi]ZXdckZgh^dcXdbeaZiZh!a^`ZVaadi]Zgldg`ndjYdVhV976!ndjcZZYid kZg^[ni]ZegdeZgXdbeaZi^dcd[i]ZXdckZgh^dc#I]^h^hVXXdbea^h]ZYl^i]i]ZSHOW CONFIGURATIONXdbbVcYVh[daadlh/ DGMGRL> SHOW CONFIGURATION Configuration Name: DGConfig1 Enabled: YES Protection Mode: MaxPerformance Databases: MATRIX - Primary database MATRIX_DR0 - Snapshot standby database Fast-Start Failover: DISABLED Current status for "DGConfig1": SUCCESS DGMGRL>
7. NdjcZZYidYdhdbZbdgZkZg^[^XVi^dc¸^ci]^hXVhZidVhhjgZndjghZa[i]VigZYd^h VXijVaanWZ^c\hZciidi]ZhiVcYWn[gdbi]Zeg^bVgnYViVWVhZ#NdjXVcVXXdbea^h]i]^hWn fjZgn^c\V$MANAGED_STANDBYdci]ZhcVeh]dihiVcYWnYViVWVhZVcYcdi^c\i]ZkVajZ ^ci]ZBLOCK#Xdajbc/ SQL> SELECT STATUS, SEQUENCE#, BLOCK# FROM V$MANAGED_STANDBY
360
DgVXaZ9ViV<jVgY&&g=VcYWdd` WHERE CLIENT_PROCESS='LGWR'; STATUS SEQUENCE# BLOCK# ---------- ---------- ------IDLE 83 2183 SQL>
8. Dci]Zeg^bVgnYViVWVhZ!XdccZXik^VHFAEajhVcY^chZgiVgdl^cidi]Zhr.regions iVWaZVh[daadlh/ SQL> INSERT INTO HR.REGIONS 2 VALUES (1, 'TEXAS'); 1 row created. SQL> COMMIT; Commit complete. SQL>
9. GZX]ZX`V$MANAGED_STANDBYVhndjY^YZVga^Zgdci]ZhcVeh]dihiVcYWnidkZg^[ni]Vi gZYd[gdbi]Zeg^bVgnYViVWVhZ^hWZ^c\Veea^ZY#Ndjh]djaYhZZi]Vii]ZBLOCK#]Vh X]Vc\ZY^ci]ZfjZgngZhjaih/ SQL> SELECT STATUS, SEQUENCE#, BLOCK# 2 FROM V$MANAGED_STANDBY 3 WHERE CLIENT_PROCESS='LGWR'; STATUS SEQUENCE# BLOCK# ---------- ---------- ------IDLE 83 2786 SQL>
10. I]^hh]dlhndji]Vii]ZgZYd^hhi^aaXdb^c\^c[gdbi]Zeg^bVgnYViVWVhZVcYndjVgZhi^aa egdiZXiZY#DcZi]^c\idcdiZ[gdbi]^hh^beaZZmVbeaZ^hi]Vii]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ijgci]ZhcVeh]dihiVcYWnndj_jhiXdckZgiZY idVe]nh^XVahiVcYWncdl#
8]VeiZg./ 6Xi^kZ9ViV<jVgY
361
1. 8dccZXiidi]Z9ViV<jVgY7gd`ZgidWZ\^ci]ZegdXZhh/ [oracle@matrix_dr0 app]$ dgmgrl DGMGRL for Linux: Version 11.1.0.6.0 - Production Copyright (c) 2000, 2005, Oracle. All rights reserved. Welcome to DGMGRL, type "help" for information. DGMGRL> CONNECT sys/oracle Connected. DGMGRL> CONVERT DATABASE 'MATRIX_DR0' TO PHYSICAL STANDBY; Converting database "MATRIX_DR0" to a Physical Standby database, please wait. Operation requires shutdown of instance "MATRIX_DR0" on database "MATRIX_DR0" Shutting down instance "MATRIX_DR0"… Database closed. Database dismounted. ORACLE instance shut down. Operation requires startup of instance "MATRIX_DR0" on database "MATRIX_DR0" Starting instance "MATRIX_DR0"… ORACLE instance started. Database mounted. Continuing to convert database "MATRIX_DR0"… Operation requires shutdown of instance "MATRIX_DR0" on database "MATRIX_DR0" Shutting down instance "MATRIX_DR0"… ORA-01109: database not open Database dismounted. ORACLE instance shut down. Operation requires startup of instance "MATRIX_DR0" on database "MATRIX_DR0" Starting instance "MATRIX_DR0"… ORACLE instance started. Database mounted. Database "MATRIX_DR0" converted successfully DGMGRL>
2. 7Za^ZkZ^idgcdi!i]Vi^hVabdhiVaai]ZgZ^hidgZijgc^c\i]ZhcVeh]dihiVcYWnidVe]nh^XVa hiVcYWn#NdjV\V^clVciideZg[dgbhdbZkZg^[^XVi^dcVcYkVa^YVi^dcidVhhjgZi]Vi ZkZgni]^c\^hVh^ih]djaYWZ!VcYi]ZaVhihiZe^hidgZijgci]Ze]nh^XVahiVcYWnidbVcV\ZY gZXdkZgnbdYZ!l]^X]ndj¼aaYdg^\]iV[iZgVfj^X`SHOWCONFIGURATION/ DGMGRL> SHOW CONFIGURATION Configuration Name: DGConfig1 Enabled: YES Protection Mode: MaxPerformance Databases: MATRIX - Primary database MATRIX_DR0 ca a a a a Fast-Start Failover: DISABLED Current status for "DGConfig1": SUCCESS DGMGRL>
362
DgVXaZ9ViV<jVgY&&g=VcYWdd`
NdjVgZYdcZ#I]Z7gd`Zgl^aa]VkZgZhiVgiZYi]ZGZYd6eeanegdXZhhVcYi]Ze]nh^XVa hiVcYWnYViVWVhZl^aaWZldg`^c\dcXViX]^c\jel^i]i]Zeg^bVgn#>[i]Zeg^bVgnYViVWVhZ]Vh cdinZigZXdccZXiZYidi]ZhiVcYWnV[iZgi]ZXdckZgh^dc!ndjXVcXdccZXiVhHNH976idndjg eg^bVgnYViVWVhZVcYhl^iX]ad\[^aZh!Vai]dj\]i]^h^hcdicZXZhhVgn^[ndjVgZgjcc^c\^c BVm^bjb6kV^aVW^ain/ SQL> ALTER SYSTEM SWITCH LOGFILE; System altered. SQL>
I]^hl^aagZXdccZXii]ZAd\Lg^iZgCZildg`HZgk^XZACHegdXZhhid^ihG;HegdXZhhdci]Z hiVcYWn#CdlndjlVciid]VkZVadd`Vil]Vi]VeeZcZYidndjgYViV^ci]ZGZ\^dchiVWaZ!hd WVX`dci]Ze]nh^XVahiVcYWnYViVWVhZ!jhZ9 EDIT DATABASE 'MATRIX_DR0'SET STATE='APPLY-OFF'; Succeeded.
Jh^c\HFAEajh!deZci]Ze]nh^XVahiVcYWn^cgZVY"dcanbdYZ/ SQL> ALTER DATABASE OPEN READ ONLY; Database altered. SQL>
NdjXVcfjZgnVcniVWaZndjX]Vc\ZYl]^aZi]ZYViVWVhZlVhVhcVeh]dihiVcYWn!VcYi]Z X]Vc\ZhbVYZdci]ZhcVeh]dihiVcYWnl^aaWZ\dcZ!hjX]VhndjgX]Vc\Zidi]Zhr.regions iVWaZ10, 'TEXAS'#=dlZkZg!X]Vc\ZhbVYZdci]Zeg^bVgnYViVWVhZ!hjX]Vhi]Zgdlndj ZciZgZY[dghr.regionsl^i]i]ZkVajZh1, 'TEXAS'l^aahi^aaWZi]ZgZ/ SQL> SELECT * FROM HR.REGIONS; REGION_ID REGION_NAME ---------- ------------------------1 TEXAS SQL>
NdjVgZVabdhi[^c^h]ZYH^beanh]jiYdlci]Ze]nh^XVahiVcYWnYViVWVhZVcYgZhiVgi^i^c BDJCIbdYZ#I]^hl^aaiV`Zi]Ze]nh^XVahiVcYWndjid[gZVY"dcanbdYZVcYegZeVgZ^i[dg gZXZ^k^c\gZYd[gdbi]Zeg^bVgnYViVWVhZ/ SQL> SHUTDOWN Database closed. Database dismounted. ORACLE instance shut down. SQL> STARTUP MOUNT ORACLE instance started. Total System Global Area 422670336 Fixed Size 1300352 Variable Size 343935104 Database Buffers 71303168 Redo Buffers 6131712 Database mounted. SQL>
bytes bytes bytes bytes bytes
8]VeiZg./ 6Xi^kZ9ViV<jVgY
363
;^cVaan!ejii]Ze]nh^XVahiVcYWnWVX`^cidbVcV\ZYgZXdkZgnbdYZVcYndj¼gZgZVaanYdcZ [oracle@matrix_dr0 ]$dgmgrl DGMGRL>connect sys/oracle Connected. DGMGRL> EDIT DATABASE 'MATRIX_DR0'SET STATE='APPLY-ON'; Succeeded. DGMGRL>EXIT [oracle@matrix_dr0 ]
Ndj]VkZild!_jhiild!gZVahiZehi]VindjbjhiXdbeaZiZid\d[gdbi]Ze]nh^XVahiVcYWn YViVWVhZidV[jaanjeYViVWaZhcVeh]dihiVcYWnYViVWVhZVcYgZijgcV\V^cidndjge]nh^XVa hiVcYWnYViVWVhZ/ 1. 8dckZgii]Ze]nh^XVahiVcYWnYViVWVhZidVhcVeh]dihiVcYWnYViVWVhZ# 2. 8dckZgii]ZhcVeh]dihiVcYWnYViVWVhZidVe]nh^XVahiVcYWnYViVWVhZ# L]ZclZadd`WVX`Vii]ZgZfj^gZbZcihidVXXdbea^h]i]ZhVbZ[jaanjeYViVWaZdgdeZc gZVY"lg^iZhiVcYWnYViVWVhZ^cDgVXaZ9ViVWVhZ&%g!i]ZcjbWZgd[hiZeh&*^cidiVa!i]ZaZkZad[ XdbeaZm^in!VcYi]Zdeedgijc^in[dgZggdg^hh^\c^[^XV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]Vc\Zh^cidVcdeZgVi^dcVaegdYjXi^dcZck^gdcbZci#>cVYY^i^dcidi]ZhZ X]Vc\Zh[dg9ViVWVhZGZeaVn!hdbZ\ZcZgVaXVcY^YViZhVgZig^\\Zgh[dgHFAEZg[dgbVcXZ6cVanoZg/
8]VeiZg./ 6Xi^kZ9ViV<jVgY
365
N HX]ZbVX]Vc\Zh!^cXajY^c\i]ZVYY^i^dc!gZbdkVa!dgX]Vc\Zd[Vc^cYZm!eVgi^i^dc!dg bViZg^Va^oZYk^Zl N 8]Vc\Zh^c]dldei^b^oZghiVi^hi^XhVgZ\Vi]ZgZY!i]ZY^gZXiVeea^XVi^dcd[di]ZgHFA eZg[dgbVcXZijc^c\VXi^dchhjX]VhXgZVi^c\HFAegd[^aZh!]^hid\gVbh!VcYhddc DcZd[i]Zeg^bVgn\dVah^cG6I^hideZg[dgbdjgiZhi^c\^cVcZck^gdcbZcii]Vib^ggdgh egdYjXi^dcl]ZclZgZeaVndjgXVeijgZYldg`adVYidVhhjgZlZVgZb^c^b^o^c\g^h`[dgdjg VXijVab^\gVi^dcd[i]ZX]Vc\Zh#Djg[^ghihiZei]Zc^hidXdckZgii]Ze]nh^XVahiVcYWnYViVWVhZid VhcVeh]dihiVcYWnWZ[dgZlZXVeijgZdjgldg`adVYjh^c\i]ZegdXZYjgZh[gdbi]ZegZXZY^c\ hZXi^dc#
Database Replay DcXZi]Ze]nh^XVahiVcYWn]VhWZZcXdckZgiZYidVhcVeh]dihiVcYWn!lZXVcWZ\^ci]ZhiZehid XdbeaZiZi]ZegdXZhhd[XVeijg^c\i]ZegdYjXi^dcldg`adVYl^i]9ViVWVhZGZeaVn# NOTE Before you start the Database Replay process, Oracle (and your authors) recommend taking a backup of your primary Oracle Database as a best practice. ;djgbV^cXdbedcZcihbV`Zje9ViVWVhZGZeaVn/ N Workload capture Ldg`adVYXVeijgZjhZhW^cVgn[^aZhdci]Z[^aZhnhiZbXVaaZYcapture files#DcXZldg`adVYXVeijgZ^h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ci]Zldg`adVYXVeijgZhnhiZb#6XVa^WgVi^dc idda^hegdk^YZYidVhh^hindj^cYZiZgb^c^c\]dlbVcngZeaVnXa^Zcihndjl^aacZZYid ZbjaViZi]Zldg`adVY[gdbi]Zdg^\^cVaXVeijgZhnhiZb#>i¼hedhh^WaZi]Vindjl^aacZZY bdgZi]VcdcZXa^ZcihnhiZb!Wjii]ZXVa^WgVi^dciddal^aa]ZaendjYZiZgb^cZi]^h# N Analysis and reporting I]ZejgedhZd[gZ\gZhh^dciZhi^c\^hidYZiZgb^cZi]Z[^icZhhd[ X]Vc\Zh[dgb^\gVi^dc^cidVegdYjXi^dcZck^gdcbZci!l]^X]bZVchVcVanh^hd[i]ZiZhih! VcYgZedgihd[i]ViVcVanh^hbjhiWZegdYjXZY#;dgijcViZan!9ViVWVhZGZeaVncVi^kZan
366
DgVXaZ9ViV<jVgY&&g=VcYWdd` egdk^YZhZmiZch^kZgZedgih[gdbh^beaZZggdga^hi^c\hZcXdjciZgZYYjg^c\i]ZiZhigjc idY^[[ZgZcXZh^cgdlhgZijgcZYWn9BAhiViZbZcih#>cVYY^i^dc!ndjXVcVXXZhh6LG gZedgih[dgYZiV^aZYXdbeVgVi^kZVcVanh^hWZilZZci]ZXVeijgZVcYgZeaVnhnhiZbh#
L]ViVWdjiiZhi^c\4:kZgnWdYneZg[dgbhiZhi^c\¸ViaZVhii]Znh]djaY7ji^igZfj^gZhi^bZ! Z[[dgi!VcYZmigVhidgV\ZidedejaViZi]ZiZhiZck^gdcbZcih[gZfjZcian#6cYh^cXZldg`adVYh jhjVaanYdcdib^b^XegdYjXi^dc!i]ZngVgZanXViX]egdYjXi^dcegdWaZbh#:kZch^beaZiZhiha^`Z X]ZX`^c\VcZl^cYZmXVcWZkZgni^bZXdchjb^c\#I]Z[daadl^c\iVWaZXdciV^chhdbZd[i]Z i]^c\hndjXVciZhil^i]9ViVWVhZGZeaVnVcYVhcVeh]dihiVcYWn# Production Setup
Test on Snapshot Standby
Cdc"6HBhidgV\Z
6HBhidgV\Z
Cd[aVh]gZXdkZgnVgZV
JhZh[aVh]gZXdkZgnVgZV
;aVh]WVX`9ViVWVhZcdiZcVWaZY
;aVh]WVX`9ViVWVhZZcVWaZY
AdlZgD$HkZgh^dc
=^\]ZgD$HkZgh^dc
DaY]VgYlVgZY^h`h$hnhiZb
CZl]VgYlVgZY^h`h$hnhiZb
H^beaZ^cYZmZh
8dbeaZm$bdgZ^cYZmZh
EVgVbZiZgh
8]Vc\ZYeVgVbZiZgh
CdeVgi^i^dc^c\
CZleVgi^i^dc^c\
CdXdbegZhh^dc
8dbegZhh^dcZcVWaZY
AZi¼hadd`ViVh^beaZZmVbeaZd[XVeijg^c\Vldg`adVYdci]Zeg^bVgnYViVWVhZVcYgZeaVn^c\ ^ihZkZgVai^bZhdcdjghcVeh]dihiVcYWn# 9ViVWVhZGZeaVn^hbjX]ZVh^ZgidjhZ^c9ViVWVhZ8dcigda!hd^[ndjYdcdi]VkZ9ViVWVhZ 8dcigdaXdc[^\jgZY!^ildjaYWZegjYZciidXdc[^\jgZ^icdl#IdYdhd!ZmZXjiZi]Z[daadl^c\dc i]Zeg^bVgnYViVWVhZidXgZViZi]Z9ViVWVhZ8dcigdabZiVYViVdghiVgi^i^[VagZVYnXdc[^\jgZY/ [Matrix] emca -config dbcontrol db -repos recreate [Matrix] emctl start dbconsole
Id\ZigZVYn[dg9ViVWVhZGZeaVn!XgZViZVY^gZXidgn^cl]^X]i]ZXVeijgZ^c[dgbVi^dcl^aaWZ eaVXZYVcY\Vi]ZgjendjgiZhi^c\bViZg^Va!hXg^eih!VcYdi]ZgYViV#NdjcZZYidXdckZgindjg e]nh^XVahiVcYWnidVhcVeh]dihiVcYWnWZ[dgZndjhiVgindjgldg`adVY\ZcZgVi^dcidbV^ciV^ci]Z hVbZhiVgi^c\ed^ciVhi]ZXVeijgZdci]Zeg^bVgnYViVWVhZ/ DGMGRL> convert database MATRIX_DR0 to snapshot standby; Converting database "MATRIX_DR0" to a Snapshot Standby database, please wait... Database "MATRIX_DR0" converted successfully
GZbZbWZgi]Vii]^hgZfj^gZhZmigV[aVh]gZXdkZgnVgZVheVXZVh[aVh]WVX`ad\hVgZcdigZXnXaZY l]ZcV
8]VeiZg./ 6Xi^kZ9ViV<jVgY
367
CZmi!Xdc[^\jgZ9ViVWVhZ8dcigdadci]ZhcVeh]dihiVcYWn#Ndjldc¼iWZVWaZidjhZi]Z bZiVYViV[dg9ViVWVhZ8dcigda[gdbi]Zeg^bVgnWZXVjhZi]ZhZVgZcdlildhZeVgViZYViVWVhZh# I]^hhiZeXVcWZYdcZ^ceVgVaaZal^i]i]ZXVeijgZdci]Zeg^bVgnYViVWVhZ# [Matrix_DR0] emca -config dbcontrol db -repos recreate
L]^aZi]Vi^hgjcc^c\!ndjXVchiVgindjgXVeijgZ#I]Z\ZcZgVahiZehidXVeijgZVldg`adVYVgZ a^hiZY]ZgZ#JhZ9ViVWVhZ8dcigdadci]Zeg^bVgnVcYYdi]Z[daadl^c\/ 1. Ad\^cid9ViVWVhZ8dcigdadcndjgeg^bVgnYViVWVhZ# 2. 8a^X`i]ZHd[ilVgZVcYHjeedgia^c`Vii]Zide# 3. JcYZgGZVa6eea^XVi^dcIZhi^c\!hZaZXi9ViVWVhZGZeaVn# 4. Dci]Z8VeijgZLdg`adVYiVh`a^cZ!Xa^X`i]ZcdjgXVhZ!lZgVcVhZid[ egd\gVbhidh^bjaViZVldg`adVY/ [Matrix] wcr_demo_workload.csh ... [7] + Done wcr_demo -d 40 -c salmon [6] + Done wcr_demo -d 30 -c orange [5] + Done wcr_demo -c yellow -d 10 [4] + Done wcr_demo -u 3000 -t 0.01 [3] + Done wcr_demo -u 3000 -t 0.01 [2] + Done wcr_demo -u 3000 -t 0.01 [1] + Done wcr_demo -u 3000 -t 0.01
-t -t -t -c -c -c -c
0.00001 -u 2000 0.00001 -u 2000 0.00001 -u 2000 black blue green red
10. >[ndjY^YcdihZiVhX]ZYjaZYi^bZidZcYi]ZXVeijgZ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ZYZ[Vjai!Xa^X`CZmi!VcYXa^X`HjWb^ii]Z?dW# L]Zci]ZegZegdXZhh_dW^hXdbeaZiZ!ndjVgZgZVYnidhiVgigZeaVn^c\ndjgldg`adVY#Ndjl^aa [^ghilVciidgjci]ZgZeaVndcXZl^i]djiVcnX]Vc\ZhiddWiV^cVWVhZa^cZhZid[bZig^Xh#6[iZg i]Vi!bV`ZbVcngjchd[i]ZgZeaVnl^i]ndjgX]Vc\ZhVcYXdbeVgZi]ZgZhjaihd[i]ZkVg^djhgjch# LZl^aagjci]ZWVhZa^cZ[^ghiVcYi]ZcVYYhZkZgVa^cYZmZhidi]ZhcVeh]dihiVcYWnidX]Vc\Zi]Z ldg`adVYZmZXji^dchiVi^hi^XhVcYYd^iVaaV\V^c# 7Z[dgZndjhiVgi!XgZViZV\jVgVciZZYgZhidgZed^ci^ci]ZhcVeh]dihiVcYWnVcYgZhiVgii]Z hiVcYWn#I]^hl^aa\^kZndjVgZl^cYed^cii]VindjXVcgZijgcidhdi]ViZVX]gZeaVngjchdc ZmVXiani]ZhVbZYViVWVhZXdciZcihVcYhigjXijgZ#GZhiVgi^c\i]ZYViVWVhZhZihi]ZHnhiZb create restore point or r p a guarantee flashback database; SQL> shutdown immediate SQL> startup
NOTE If you are not running in Maximum Availability mode, you need to return to the primary and switch logs at this point to make sure that the primary starts sending redo again to keep you protected. Cdl!^c9ViVWVhZ8dcigda!cVk^\ViZidi]Z9ViVWVhZGZeaVneV\Z!hZaZXii]ZGZeaVnLdg`adVY iVh`!VcYXa^X`i]Z
8]VeiZg./ 6Xi^kZ9ViV<jVgY
369
l^aaiZaandji]Zb^c^bjbcjbWZgd[Xa^Zcihidgjchdi]Vi^iXVchiVgii]ZVeegdeg^ViZ cjbWZgd[jhZgi]gZVYh# [Matrix_DR0] wrc mo ca ra REPLAYDIR=/scratch/oracle/Replay/Capture Workload Replay Client: Release 11.1.0.6.0 – Production Copyright (c) 1982, 2007, Oracle. All rights reserved. Report for Workload in: /scratch/oracle/Replay/Capture ----------------------R comm a o Co r a a 1 c amo 1 C U Workload Characteristics: - max concurrency: 7 sessions - total number of sessions: 11 On the next screen, choose your replay options and then start up the clients using the Database Replay program wrc:[Matrix_DR0] wrc REPLAYDIR=/path USERID=xxx PASSWORD=xxx
6. L]ZcgZeaVnhZZhi]ZXa^Zcih!^il^aaa^hii]Zb^ci]ZiVWaZVii]ZWdiidb#L]Zci]ZnVgZVaa VXXdjciZY[dg!ndjXVcXdci^cjZWnXa^X`^c\CZmi# 7. 8a^X`HjWb^idci]ZcZmieV\ZidhiVgii]ZgZeaVnVcYlV^ijci^ai]ZgZeaVn^hXdbeaZiZY# 8. DcXZi]ZgZeaVn^hXdbeaZiZ!jh^c\i]Za^c`hdci]ZcZmieV\Zndjl^aaXgZViZVcYhVkZi]Z Ldg`adVYGZedgiVcYi]Z6LGgZedgi[dgndjgWVhZa^cZgjc# I]VilVhndjgWVhZa^cZgjc#Cdli]Z[jchiVgih#NdjVgZ\d^c\idgZl^cYi]ZhcVeh]dihiVcYWn VcYYd^iVaadkZgV\V^cV[iZgbV`^c\hdbZX]Vc\Zhi]VindjlVciidiZhi/ 1. ;aVh]WVX`i]ZhcVeh]dihiVcYWnidi]ZgZhidgZed^ci/ SQL> SQL> SQL> SQL> SQL> SQL>
shutdown immediate startup mount flashback database to restore point beforereplay; alter database open resetlogs; shutdown immediate startup
2. I]ZhZXdcYgZhiVgi^hcdiiZX]c^XVaancZXZhhVgn!WjilZlVciidZchjgZi]VilZhiVgil^i] i]ZYViVWVhZ^ci]ZhVbZhiViZVhi]ZWVhZa^cZgjc# 3. CdlbV`ZndjgX]Vc\Zhidi]ZYViVWVhZ#LZ¼aahZijehdbZcZl^cYZmZh/ SQL> create index wcr_grid_xcoor_ycoor on wcr_grid(xcoor, SQL> create index wcr_grid_pixid_xcoor_ycoor on wcr_grid(pixid,xcoor, ycoor); SQL> create index wcr_grid_pixid_xcoor on wcr_grid(pixid, SQL> create index wcr_grid_pixid_ycoor on wcr_grid(pixid, SQL> create index wcr_grid_pixid_xcoor_color on wcr_grid(pixid, xcoor, color); SQL> create index wcr_grid_pixid_ycoor_color on wcr_grid(pixid, ycoor, color); SQL> create index wcr_grid_pixid_color on wcr_grid(pixid, SQL> create index wcr_grid_xcoor_color on wcr_grid(xcoor, SQL> create index wcr_grid_ycoor_color on wcr_grid(ycoor,
ycoor);
xcoor); ycoor);
color); color); color);
370
DgVXaZ9ViV<jVgY&&g=VcYWdd` 4. GZgjci]ZZci^gZgZeaVnjh^c\i]ZhVbZhiZehjhZY[dgi]ZWVhZa^cZgjc# 5. HVkZi]ZgZedgih!VcYgjci]Z6LG9^[[ZgZcXZhgZedgiWZilZZci]ZcZlgjcVcYi]Z WVhZa^cZgjc# 6. 8dbeVgZi]ZgZhjaihd[ZVX]d[ndjghZXdcYVgngjchidi]ZWVhZa^cZ#
NdjXVcXdci^cjZ^ci]ZegZXZY^c\addeVhadc\Vhndj]VkZi]ZY^h`[dgndjg[aVh]WVX`ad\h# L]ZcndjVgZhVi^h[^ZYl^i]i]ZgZhjaihd[ndjgiZhi^c\!XdckZgindjghcVeh]dihiVcYWnWVX`^cid Ve]nh^XVahiVcYWnVcYaZi^igZhncX]gdc^oZl^i]i]Zeg^bVgnWnVeean^c\Vaai]ZgZYdi]Vi]Vh VXXjbjaViZYVii]ZhiVcYWnYjg^c\ndjgiZhi^c\gjch# 1. 9gdei]ZgZeaVngZhidgZed^ci/ SQL> drop restore point beforereplay;
2. 8dckZgii]ZhcVeh]diidVe]nh^XVahiVcYWnYViVWVhZ/ DGMGRL> convert database MATRIX_DR0 to physical standby;
GZYd6eeanVjidbVi^XVaanWZ\^chVeean^c\i]ZgZYdi]ViXVbZ^cl]^aZ^ilVh^c hcVeh]dihiVcYWnbdYZVcYi]Zeg^bVgnXdci^cjZhidhZcYi]ZXjggZcigZYd# ;dgbdgZYZiV^ahdci]^hZmVbeaZd[jh^c\G6I9ViVWVhZGZeaVn!gZ[Zgidi]ZDgVXaZ DeZcL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ViVWVhZ!jh^c\6LGidZmigVXii]ZHFA[gdb i]ZXjghdgXVX]Z^cidVHFAijc^c\hZi#I]ZHFAijc^c\hZi^hi]ZcigVch[ZggZYidi]ZiZhi hnhiZbl]ZgZHFAEZg[dgbVcXZ6cVanoZgXVcVcVanoZi]ZZmigVXiZYHFA# 2. Jh^c\HFAEZg[dgbVcXZ6cVanoZg!bZVhjgZndjgldg`adVY¼heZg[dgbVcXZeg^dgidVcn X]Vc\ZhWZ^c\bVYZWnZmZXji^c\i]ZHFAEZg[dgbVcXZ6cVanoZgV\V^chii]ZHFAijc^c\hZi# 3. 6eeani]ZeaVccZYX]Vc\Zhidi]ZiZhiZck^gdcbZci# 4. GZeZVihiZe'!i]^hi^bZl^i]i]ZX]Vc\Zh^ceaVXZ# 5. 8dbeVgZi]ZeZg[dgbVcXZd[i]ZHFAijc^c\hZih!^YZci^[n^c\i]dhZi]Vi]VkZ^begdkZY! YZ\gVYZY!dghiVnZYi]ZhVbZ# I]ZHFAhiViZbZcihd[eVgi^XjaVg^ciZgZhiidjhXdbZhdjid[hiZe*¸i]dhZl]^X]]VkZ YZ\gVYZY^ceZg[dgbVcXZh^cXZlZbZVhjgZYi]Zb^chiZe'#6hbZci^dcZYZVga^Zg!HFAIjc^c\ 6Yk^hdg^hi^\]ian^ciZ\gViZYl^i]HFAEZg[dgbVcXZ6cVanoZg#6ii]^hed^cindjXVcaZkZgV\ZHFA Ijc^c\6Yk^hdgidXdggZXii]ZYZ\gVYZYHFAhiViZbZcihl]^aZi]ZnVgZ^ci]ZiZhiZck^gdcbZciVcY XgZViZcZleaVch[dgi]Zb#I]ZhZeaVchVgZi]ZchZZYZY^cidHFAEaVcBVcV\ZbZciWVhZa^cZh VcYZmedgiZYWVX`^cidegdYjXi^dc# NOTE For more information on Real Application Testing, read the Oracle white paper “Oracle Database 11\: Real Application Testing Overview.” '
Active Data Guard Hd[Vg!lZ¼kZXdkZgZYi]Ze]nh^XVahiVcYWnYViVWVhZkVg^Vi^d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"^chiVcXZe]nh^XVahiVcYWnYViVWVhZXVcZVh^anWZbdY^[^ZYidVh^c\aZ"^chiVcXZeg^bVgn YViVWVhZVcYbjai^eaZh^c\aZ"^chiVcXZe]nh^XVahiVcYWnYViVWVhZh#Eg^dgidDgVXaZ9ViVWVhZ&&g VcY6Xi^kZ9ViV<jVgY!i]^hlVhVgZXdbbZcYZYVeegdVX]l]Zci]ZXdckZci^dcVaeVi][dg deZc^c\Ve]nh^XVahiVcYWngZVY"dcanlVhiV`ZcVcYi]ZVeea^XVi^dcd[gZYd]VYidWZeVjhZY! aZVk^c\ndjl^i]VcZmiZcYZY[V^adkZgi^bZ#Jh^c\6Xi^kZ9ViV<jVgYgZVYZg[Vgbh!i]ZhVbZ VgX]^iZXijgZd[Vh^c\aZ"^chiVcXZeg^bVgnYViVWVhZ!VcYbjai^eaZe]nh^XVahiVcYWnVXi^kZYViV \jVgYYViVWVhZh!ndja^iZgVaan]VkZi]ZWZhid[VaaldgaYh!Vhh]dlc^c;^\jgZ."(# I]Zi]^gYVgX]^iZXijgZ^hVcZmiZch^dcd[i]Z6Xi^kZ9ViV<jVgYgZVYZg[Vgbh!Vhh]dlc^c ;^\jgZ.")#>[i]Ze]nh^XVahiVcYWn^hdcG68!i]ZcaZkZgV\^c\i]Z[jaaedlZgd[i]ZG68[dg gZVY"dcandeZgVi^dchVcYhXVaVW^a^in^hVhh^beaZVhVYY^c\^chiVcXZhVhcZZYZY# TIP Active Data Guard is a separately licensed option for Oracle Enterprise Edition. An Active Data Guard license is required to use either the Real-Time Query or the RMAN block-change tracking on a standby database.
Single Node
Active Data Guard Reader Farm
FIGURE 9-3.
Reader farm multiple databases
374
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Queries Queries Queries Queries Queries
FIGURE 9-4.
Active Data Guard RAC reader farm
Configuring Active Data Guard ;dgi]ZejgedhZhd[djgY^hXjhh^dc!ndj¼aacZZYV9ViV<jVgYe]nh^XVahiVcYWnYViVWVhZi]Vi bZZihegZgZfj^h^iZheg^dgidZcVWa^c\6Xi^kZ9ViV<jVgY#;dgVhh^hiVcXZl^i]Xdc[^\jg^c\V9ViV <jVgYe]nh^XVahiVcYWnYViVWVhZ!gZ[Zgid8]VeiZg'# TIP The compatible parameter must be set to at least 11.0.0 in either the initialization parameter file or the spfile on both the primary and physical standby databases. The physical standby database must apply some redo V[iZg the compatible parameter was set to 11.0.0 or higher. I]ZVXijVaegdXZhhd[ZcVWa^c\6Xi^kZ9ViV<jVgY^hh^beaZ/DeZci]Ze]nh^XVahiVcYWn YViVWVhZ^cgZVY"dcanbdYZVcYhiVgiGZYd6eean#I]Z9ViV<jVgYe]nh^XVahiVcYWnh]djaYWZ^c dcZd[ildhiViZheg^dgidZcVWa^c\6Xi^kZ9ViV<jVgY/ N I]ZhiVcYWnYViVWVhZ^hbdjciZYVcYGZYd6eean^hgjcc^c\# N I]ZhiVcYWnYViVWVhZ]VhWZZch]jiYdlcXaZVcanVcYGZYd6eeanlVhhideeZY# >ci]Z[^ghihXZcVg^d!egdXZZYVh[daadlhjh^c\HFAEajhdg9ViV<jVgY7gd`Zg^[ndjegZ[Zg# Jh^c\HFAEajhVadcZ!Ydi]^h/ 1. HideGZYd6eean/ SQL> RECOVER MANAGED STANDBY DATABASE CANCEL;
2. DeZci]ZYViVWVhZgZVY"dcan/ SQL> ALTER DATABASE OPEN READ ONLY;
3. GZhiVgiGZYd6eean/ SQL> RECOVER MANAGED STANDBY DATABASE DISCONNECT USING CURRENT LOGFILE;
8]VeiZg./ 6Xi^kZ9ViV<jVgY
375
Jh^c\9ViV<jVgY7gd`Zg!Ydi]^h/ 1. HideGZYd6eean/ DGMGRL> EDIT DATABASE 'MATRIX_DR0' SET STATE='APPLY=OFF'
2. Jh^c\HFAEajh!deZci]ZYViVWVhZgZVY"dcan/ SQL> ALTER DATABASE OPEN READ ONLY;
3. GZhiVgiGZYd6eean/ DGMGRL> EDIT DATABASE 'MATRIX_DR0; SET STATE='APPLY-ON'
>ci]ZhZXdcYhXZcVg^d!l]ZgZi]Ze]nh^XVahiVcYWnVcYGZYd6eeanVgZVagZVYnh]jiYdlc! egdXZZYVh[daadlh# Jh^c\HFAEajhVadcZ!Ydi]^h/ 1. HiVgii]Ze]nh^XVahiVcYWn^cgZVY"dcanbdYZ# SQL> STARTUP
2. HiVgiGZYd6eean# SQL> RECOVER MANAGED STANDBY DATABASE DISCONNECT USING CURRENT LOGFILE;
Jh^c\9ViV<jVgY7gd`Zg!Ydi]^h/ 1. 8dccZXiidi]ZYViVWVhZjh^c\9 STARTUP
2. JcaZhhi]ZYZ[Vjai[dgGZYd6eean]VhWZZcX]Vc\ZY!^hhj^c\i]^hhiVgijeXdbbVcYVahd hiVgihGZYd6eean#>[i]ZYZ[VjaiWZ]Vk^dg]VhWZZcX]Vc\ZY!hiVgiGZYd6eeana^`Zhd/ DGMGRL> EDIT DATABASE 'MATRIX_DR0' SET STATE='APPLY-ON'
>[ndjVgZ^ciZgZhiZY^c]dlZVhn^iXVcWZiddeZcVe]nh^XVahiVcYWn^c6Xi^kZ9ViV<jVgY bdYZ!ndjh]djaYign
FIGURE 9-5.
Enabling Active Data Guard Real-Time Query with Grid Control
376
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Conclusion DgVXaZ9ViVWVhZ&&g6Xi^kZ9ViV<jVgY^cigdYjXZYVcZleVgVY^\b^ci]ZgZVY"dcandei^dch l]Zcjh^c\9ViV<jVgYe]nh^XVahiVcYWnYViVWVhZh#I]ZVW^a^iniddeZci]Ze]nh^XVahiVcYWn gZVY"dcanVcYhi^aaVeeangZYdVhhjgZhi]ViGIDVcYGEDdW_ZXi^kZhXVcWZbZi!WZXVjhZi]Z hiVcYWn^h&%%"eZgXZciVkV^aVWaZ[dg[V^adkZgdghl^iX]dkZgVhcZXZhhVgn#7ZndcYi]ZgZVY"dcan VkV^aVW^a^inidVeea^XVi^dch!i]ZVeea^XVi^dcd[6Xi^kZ9ViV<jVgYidGB6C[Vhi^cXgZbZciVa WVX`jehWnZcV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>ci]^hX]VeiZg!lZl^aaY^\YZZe^cidi]ZYZiV^ahd[[V^adkZgXdc[^\jgVi^dch#Ndj¼aaaZVgc]dlid Xdc[^\jgZndjgXa^ZciVeea^XVi^dchVcYYViVWVhZhhdndjgXdccZXi^dchhZVbaZhhanVcYigVcheVgZcian gZXdccZXiidi]ZcZleg^bVgnYViVWVhZ^ci]ZZkZcid[[V^ajgZ# I]ZegdXZhhd[Xdc[^\jg^c\Xa^Zci[V^adkZgXVcWZY^k^YZY^cidi]gZZWgdVYXViZ\dg^Zh/ N
Service relocation I]ZYViVWVhZhZgk^XZjhZYWni]Zeg^bVgnVeea^XVi^dcidXdccZXiid i]ZYViVWVhZh]djaYWZVXi^kZdcandci]Zeg^bVgnYViVWVhZ#>[V[V^adkZgdghl^iX]dkZg dXXjgh!i]^hhZgk^XZh]djaYWZVjidbVi^XVaanb^\gViZYidi]ZcZleg^bVgnYViVWVhZ#
N
Client notification DcXZi]Z[V^adkZg]VhXdbeaZiZYVcYi]ZhZgk^XZ^hVkV^aVWaZdci]Z cZleg^bVgnYViVWVhZ!i]ZVeea^XVi^dch]djaYWZcdi^[^ZYi]ViV[V^adkZg]VhdXXjggZY VcYi]ViXdccZXi^dchh]djaYWZb^\gViZYidi]ZcZleg^bVgnYViVWVhZ#
N Efficient reconnection I]ZcZlVcYegZk^djhhZhh^dchh]djaYfj^X`anWZVWaZidadXViZ i]ZcZleg^bVgnYViVWVhZVcYcdi\ZihiVaaZYlV^i^c\[dgi^bZdjihdcjcVkV^aVWaZ]dhihdg cZildg`h# 6[iZggZVY^c\i]^hX]VeiZg!ndjh]djaYigjanWZVWaZidhVkZi]ZYVn^ci]ZZkZcid[V[V^adkZg VcY\^kZndjghZa[i]VibZciVaX]ZX`bVg`#
Defining the Problem 8a^Zci[V^adkZghine^XVaan[Vaa^ciddcZd[ildXViZ\dg^Zh/XdbeaZiZh^iZ[V^adkZgdgeVgi^Vah^iZ[V^adkZg# AZi¼hWZ\^cWnZmVb^c^c\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id^beaZbZcii]ZXa^Zci[V^adkZg hdaji^dc!`cdl^c\i]^h^c[dgbVi^dcYdZh]ZaendjjcYZghiVcYl]nXZgiV^ci]^c\hldg`i]ZlVni]Zn Yd#>cVYY^i^dc!l]Zc^iXdbZhidigdjWaZh]ddi^c\Vc^hhjZ!i]ZZmigV`cdlaZY\Z^hV\ddYi]^c\id ]VkZ^cndjgWVX`edX`Zi# I]^hhZXi^dcVahdXdkZghi]ZegdXZhh[adl[dgZVX]e^ZXZ!VcY[dgi]VilZcZZYVcZmVbeaZ DgVXaZCZiVa^VhVhh]dlc]ZgZ/ SALES = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL (ADDRESS = (PROTOCOL (ADDRESS = (PROTOCOL (ADDRESS = (PROTOCOL (LOAD_BALANCE = yes) )
= = = =
TCP)(HOST TCP)(HOST TCP)(HOST TCP)(HOST
= = = =
MATRIX1)(PORT = 1521)) MATRIX2)(PORT = 1521)) MATRIX_DR01)(PORT = 1521)) MATRIX_DR02)(PORT = 1521))
380
DgVXaZ9ViV<jVgY&&g=VcYWdd` (CONNECT_DATA= (SERVICE_NAME=SALES) ) )
TIP In this example, Oracle Net aliases can also be coded into Java Database Connectivity (JDBC) thin applications as a URL and achieve the same functionality as Oracle Call Interface (OCI) clients. Jh^c\i]^hZmVbeaZ¼hXdccZXiYZhXg^eidg!i]Z[daadl^c\hZXi^dchl^aa^aajhigViZ]dlcZlVcY Zm^hi^c\XdccZXi^dchl^aaWZegdeZgangdjiZYdcanidi]Zeg^bVgnYViVWVhZ#
Connection Load Balancing and Connect Time Failover 6hi]Zh^oZd[YViVWVhZXajhiZgh\gdl!^iWZXdbZhbdgZVcYbdgZ^bedgiVci[dgXdccZXi^dchidWZ ZkZcanY^hig^WjiZYVXgdhhcdYZhVcY^chiVcXZhVhi]ZnVgZWZ^c\XgZViZY#I]^h^higjZl]ZcVaVg\Z cjbWZgd[XdccZXi^dchVgZXgZViZY^cVh]dgieZg^dYd[i^bZdg[dgXdccZXi^dchi]ViVgZXgZViZY^c Vig^X`aZ#DgVXaZ¼hWVh^XbZX]Vc^hbh[dgZkZcanY^hig^Wji^c\XdccZXi^dchVgZXVaaZYclient-sideVcY server-side load balancing#I]Z[daadl^c\hZXi^dch[dXjhbV^candcXa^Zci"h^YZadVYWVaVcX^c\VcY XdccZXi"i^bZ[V^adkZg!Vhi]Zn]VkZi]Zbdhi^beVXidcVXa^Zci[V^adkZghdaji^dc#I]Z[jcXi^dcVa^in YZhXg^WZY]ZgZldg`hl^i]Wdi]D8>VcYDgVXaZ?978Xa^Zcih#
Client-side Load Balancing/Connect-time Failover I]ZADDRESS_LIST^cdjgZmVbeaZDgVXaZCZiVa^VhdgJGA^[ndjVgZjh^c\?978i]^cXa^Zci]Vh [djgVYYgZhhZcig^Zh!ZVX]d[l]^X]gZegZhZcihVcDgVXaZa^hiZcZggjcc^c\dcVheZX^[^X]dhiVcYedgi# L]ZcVXdccZXi^dc^hhiVgiZY!i]ZegdXZhhX]ddhZhVc^c^i^VaVYYgZhh[gdbi]ZADDRESS_LISTid ViiZbeii]ZXdccZXi^dc#>[LOAD_BALANCE = YES^h^cXajYZYl^i]^ci]ZADDRESS_LIST!i]Z VYYgZhhidl]^X]i]ZXdccZXi^hbVYZ^hX]dhZcVigVcYdb#I]^h^hXVaaZYclient-side load balancing# >[i]ZXdccZXi^dcidi]Z^c^i^VaVYYgZhhYdZhcdihjXXZZY!DgVXaZCZil^aa\dWVX`idi]ZADDRESS_ LISTVcYgVcYdbanX]ddhZVcZlVYYgZhh#I]^hXdci^cjZhjci^ai]ZXdccZXi^dcViiZbeihjXXZZYh# NOTE Client-side load balancing is implicitly enabled if a E ^h^cXajYZY^ci]ZDgVXaZCZiVa^Vh# L
R P
>[LOAD_BALANCE^hhZiidNO!dg^hcdi^cXajYZY^ci]ZDgVXaZCZiVa^Vh!i]ZcXdccZXi^dc ViiZbeihl^aaValVnh\gVWi]Z[^ghiVYYgZhh[gdbADDRESS_LIST#>[i]ZXdccZXi^dcidi]Z^c^i^Va VYYgZhhYdZhcdihjXXZZY!DgVXaZCZil^aa\dWVX`idi]ZADDRESS_LISTVcYX]ddhZi]ZcZmi VYYgZhh#L^i]Xa^Zci"h^YZadVYWVaVcX^c\ijgcZYd[[!i]ZVYYgZhhZhVgZViiZbeiZYhZfjZci^Vaan# >cVYY^i^dcidegdk^Y^c\adVYWVaVcX^c\VXgdhhY^[[ZgZciVYYgZhhZhdgcdYZhl^i]Vc ADDRESS_LIST!ndjXVcVahdadVYWVaVcXZXdccZXi^dchVXgdhhDESCRIPTIONSl^i]^cV DESCRIPTION_LIST#8dch^YZgi]Z[daadl^c\ZmVbeaZ/ SALES = (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE= YES
8]VeiZg&%/ 6jidbVi^c\H^iZVcY8a^Zci;V^adkZg (ADDRESS = (PROTOCOL (ADDRESS = (PROTOCOL (ADDRESS_LIST = (LOAD_BALANCE= YES (ADDRESS = (PROTOCOL (ADDRESS = (PROTOCOL (CONNECT_DATA= (SERVICE_NAME=SALES) )
381
= TCP)(HOST = MATRIX1)(PORT = 1521)) = TCP)(HOST = MATRIX2)(PORT = 1521)))
= TCP)(HOST = MATRIX_DR01)(PORT = 1521)) = TCP)(HOST = MATRIX_DR02)(PORT = 1521)))
)
>ci]^hZmVbeaZ!l]ZcVXdccZXi^dcViiZbei^hbVYZ!VgVcYdbVYYgZhh[gdbi]Z[^ghiADDRESS_ LIST^hdWiV^cZY[dgi]ZXdccZXi^dcViiZbei#>[i]ViXdccZXi^dcViiZbei[V^ah!Vcdi]ZgVYYgZhh [gdbi]ZideADDRESS_LIST^hgVcYdbanhZaZXiZY#>[VaaVYYgZhhZh[gdbi]Z[^ghiADDRESS_LIST [V^a!ndjbdkZidi]ZhZXdcY ADDRESS_LISTVcYWZ\^cejaa^c\VYYgZhhZh[gdbi]Via^hi^cV gVcYdbdgYZg# NdjbjhiXdch^YZgV[Zl^bea^XVi^dchl]ZcWj^aY^c\ndjg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Xi^dchiViZbZcih!Xdchjaii]ZDgVXaZYdXjbZciVi^dc# NOTE Transparent Application Failover is supported for all OCI and JDBC thick clients. Currently JDBC thin clients are not supported for use with TAF.
Configuring TAF I]Z[^ghihiZe^cXdc[^\jg^c\I6;^hid]VkZVegdeZganYZ[^cZYDgVXaZCZiVa^Vh#L]ZcVI6; [V^adkZgWZ\^ch!lZjhZXa^Zci"h^YZadVYWVaVcX^c\VcYXdccZXi"i^bZ[V^adkZgid\dWVX`idi]Z ADDRESS_LISTVcY\gVWV]dhiideZg[dgbi]ZgZXdccZXi#I]^hbZVchi]VilZh]djaYhiVgil^i] VcDgVXaZCZiVa^Vhi]Vi]VhViaZVhiilddgbdgZVYYgZhhZh^cVcADDRESS_LIST#7jiVhl^i] ZkZgngjaZ!i]ZgZ^hVcZmXZei^dc#>i^hedhh^WaZid]VkZVcDgVXaZCZiVa^Vhi]ViXdciV^chVh^c\aZ VYYgZhh^ci]ZADDRESS_LISTVcYjhZi]ZBACKUPViig^WjiZided^ciidVcdi]ZgDgVXaZCZiVa^Vh idjhZ[dgI6;[V^adkZgejgedhZh#L]^aZjh^c\i]ZBACKUPViig^WjiZYdZh]VkZ^iVYkVciV\Zh!^i YdZhcdi]VcYaZVaaXVhZh!hdlZldc¼iY^hXjhh^ihjhV\Z[jgi]Zg#
8]VeiZg&%/ 6jidbVi^c\H^iZVcY8a^Zci;V^adkZg
383
DcXZlZ]VkZVegdeZgan[dgbZYDgVXaZCZiVa^Vh!lZcZZYidYZX^YZ]dllZlVciid Xdc[^\jgZdjgI6;Viig^WjiZh#I6;Viig^WjiZh^cXajYZi]dhZYZhXg^WZY^ci]Z[daadl^c\hZXi^dch#
TYPE
I]ZTYPEViig^WjiZYZhXg^WZhi]ZineZd[[V^adkZg#Edhh^WaZkVajZhVgZ
N
S SS I]^hheZX^[^Zhi]Vil]ZcV[V^adkZgdXXjgh!I6;h]djaYXgZViZi]ZhZhh^dcVcY eZg[dgbcddi]ZgVXi^dc#
N
S C I]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ihdi]ViI6;Xdci^cjZhidgZignadc\Zcdj\][dgV9ViV<jVgY [V^adkZgdghl^iX]dkZgidXdbeaZiZ^cndjgZck^gdcbZci# HZii^c\i]ZkVg^djhI6;Viig^WjiZhXVcWZVii]ZXa^ZciaZkZal^i]^ci]ZDgVXaZCZiVa^Vhi]Z Xa^ZcijhZhidXdccZXiidi]ZYViVWVhZ!dgVii]ZhZgkZgaZkZa!l]ZgZi]ZnVgZVhhdX^ViZYl^i]i]Z YViVWVhZhZgk^XZjhZYidXdccZXi#6Xa^ZciXdc[^\jgVi^dcl^i]^cVcDgVXaZCZiVa^VhldjaYadd` hdbZi]^c\a^`Zi]Z[daadl^c\/ SALES = (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE= YES (ADDRESS = (PROTOCOL = TCP)(HOST = MATRIX1)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = MATRIX2)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = MATRIX_DR01)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = MATRIX_DR02)(PORT = 1521))) (CONNECT_DATA= (SERVICE_NAME=SALES) (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC)(RETRIES=20)(DELAY=15) ) )
384
DgVXaZ9ViV<jVgY&&g=VcYWdd`
I]^hXdc[^\jgVi^dc^chigjXihI6;idXgZViZi]ZhZhh^dcVi[V^adkZgi^bZVcYidgZ"ZmZXjiZVcnhZaZXih i]VilZgZgjcc^c\l]Zci]Z[V^adkZgdXXjggZY#>cVYY^i^dc!^[i]Z[^ghiViiZbeiViXgZVi^c\i]Z hZhh^dc[V^ah!I6;h]djaYlV^i&*hZXdcYhWZ[dgZign^c\V\V^c[dgVidiVad['%ViiZbeih# L]ZcXdc[^\jg^c\I6;hZii^c\hl^i]^cVcDgVXaZCZiVa^Vh!VcnXdccZXi^dcbVYZjh^c\i]Vi Va^Vh^c]Zg^ihi]ZI6;Viig^WjiZh#>[ndj]VkZbjai^eaZ!dgZkZci]djhVcYh!d[Xa^Zcihdc^cY^k^YjVa ]dhih!ndjldjaYcZZYidXdc[^\jgZI6;[dgZVX]^cY^k^YjVaXa^Zci#6cdei^dcidi]^hXjbWZghdbZ VeegdVX]^hidjhZl]Vi^hXVaaZYserver-side TAF#L^i]hZgkZg"h^YZI6;!i]ZI6;Viig^WjiZhVgZ VhhdX^ViZYl^i]i]ZhZgk^XZdci]ZYViVWVhZ#6cnXa^Zcii]ViXdccZXihidi]ZYViVWVhZjh^c\i]Z hZgk^XZi]Vi]Vhi]ZI6;Viig^WjiZhYZ[^cZYl^aaVjidbVi^XVaan^c]Zg^ii]Zb#>cdjgZmVbeaZDgVXaZ CZiVa^Vh^ci]ZWZ\^cc^c\d[i]^hhZXi^dc!i]ZXa^Zcil^aaWZXdccZXi^c\idi]ZYViVWVhZjh^c\i]Z hZgk^XZSALES#I]^h^hVYViVWVhZhZgk^XZi]Vi^hXgZViZYVcYhiVgiZYWn^cXajY^c\^i^ci]Z SERVICE_NAMES^c^i#dgVeVgVbZiZg!Wnjh^c\SRVCTL^cVGZVa6eea^XVi^dc8ajhiZghG68!dgWn jh^c\i]ZDBMS_SERVICEEA$HFAeVX`V\Z#GZ\VgYaZhhd[l]^X]bZi]dYlVhjhZYidXgZViZdghiVgi i]ZhZgk^XZ!ndjjhZi]ZDBMS_SERVICEEA$HFAidXdc[^\jgZi]ZI6;Viig^WjiZh#;dgZmVbeaZ!dc i]ZYViVWVhZ!ZmZXjiZi]Z[daadl^c\/ exec DBMS_SERVICE.MODIFY_SERVICE( service_name => 'SALES', failover_method => 'BASIC', failover_type => 'SELECT', failover_retries => 20, failover_delay => 15);
CdbViiZg]dlndjXdc[^\jgZI6;!Z^i]ZgVii]ZXa^ZciaZkZadgdci]ZhZgkZgh^YZ!ndjXVc kZg^[nndjghZhh^dchXjggZciI6;hZii^c\WnfjZgn^c\i]ZV$SESSIONk^Zl#;dgZVX]hZhh^dc! V$SESSIONl^aaY^heaVni]Z[V^adkZgineZ![V^adkZgbZi]dY!VcY^[i]VihZhh^dc]VhZkZgWZZc[V^aZY dkZg^ci]ZeVhi#=ZgZ¼hVh^beaZHFAZmVbeaZidkZg^[nndjgXjggZciI6;hZii^c\h/ SQL> SELECT SERVICE, FAILOVER_TYPE, FAILOVER_METHOD, FAILED_OVER FROM V$SESSION;
Fast Application Notification Ndj]VkZaZVgcZY]dlcZlXdccZXi^dchXVceZg[dgb[V^adkZgWZilZZcVYYgZhhZh^cVcADDRESS_ LISTVcY]dlZm^hi^c\XdccZXi^dchXVcVjidbVi^XVaaneZg[dgb[V^adkZgWZilZZc^chiVcXZh#7ji i]ZgZ¼hhi^aabdgZidaZVgc#>bV\^cZi]VindjVgZjh^c\djgZmVbeaZDgVXaZCZiVa^VhV[iZgXdc[^\jg^c\ i]ZhZgkZg"h^YZI6;[dgi]ZhVaZhhZgk^XZVcY]VkZXgZViZYcjbZgdjhXdccZXi^dchVXgdhhVild" ^chiVcXZG68XajhiZg#7ZXVjhZi]^h^hV9ViV<jVgYWdd`!ndj]VkZYji^[jaanXgZViZYVild"cdYZ hiVcYWnXajhiZg!l]^X]^h]jbb^c\Vadc\fj^iZc^XZan#6aad[VhjYYZc!Y^hVhiZghig^`ZhVcYWdi]]dhih ^cndjgeg^bVgnXajhiZg\dYdlc]VgY#L^i]^cb^cjiZh!ndj[V^adkZgVcYigVch^i^dcndjghiVcYWn YViVWVhZidVeg^bVgn#7ji[dghdbZgZVhdc!ndjgZm^hi^c\Veea^XVi^dcXdccZXi^dchVgZ_jhih^ii^c\ i]ZgZ#L]n^hc¼iI6;`^X`^c\^cVcY[V^a^c\dkZgi]ZhZhh^dchidndjgcZleg^bVgn4LZaa!cddcZidaY ndjgVeea^XVi^dcXdccZXi^dchi]Vii]Zeg^bVgn]dhihVgZ\dcZVcYi]VindjeZg[dgbZYV[V^adkZg# I]ZVeea^XVi^dcXdccZXi^dch]VkZidlV^i[dgI8EidiZaai]Zbi]Vii]Zeg^bVgn]dhih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]Zreg$k^Zli]ViYZhXg^WZhi]Z Veea^XVi^dcVcY]dl^iXVcWZXdciVXiZY#6hi]ZhiViZd[gZhdjgXZhhjX]VhhZgk^XZh!^chiVcXZh!dg YViVWVhZhX]Vc\Zh!V;6CD8>bZhhV\Z^heaVXZY^cidi]ZYViVWVhZVaZgifjZjZ#DcXZi]Z bZhhV\Z^hfjZjZY!VYViVWVhZegdXZhhl^aalV`ZjeVcYhZcYi]ZbZhhV\ZidVaaD8>Xa^Zcihi]Vi VgZgZ\^hiZgZY^ci]Zreg$k^Zl#I]ZD8>Veea^XVi^dci]ZciV`Zhi]ZXdggZXiVXi^dchYZeZcY^c\dc i]Z;6CbZhhV\Z# ;dg;6CD8>Xa^ZcihidgZXZ^kZi]Z;6CbZhhV\Z!i]ZnbjhibZZii]Z[daadl^c\gZfj^gZbZcih/ N I]ZOCI_EVENTSbjhiWZZcVWaZYVii]ZZck^gdcbZciXgZVi^dci^bZdci]ZXa^Zci!Vh h]dlc]ZgZ/ ( OCIEnvCreate(...) )
N I]ZD8>Veea^XVi^dcbjhiWZa^c`ZYl^i]i]ZXa^ZcidgdeZgVi^c\hnhiZbi]gZVYa^WgVgn#
386
DgVXaZ9ViV<jVgY&&g=VcYWdd` N I]ZYViVWVhZhZgk^XZjhZYWni]ZVeea^XVi^dcidXdccZXiidi]ZYViVWVhZbjhi]VkZi]Z AQ_HA_NOTIFICATIONShZiidTRUE#=ZgZ¼hVcZmVbeaZ/ exec DBMS_SERVICE.MODIFY_SERVICE( service_name => 'SALES', failover_method => 'BASIC', failover_type => 'SELECT', failover_retries => 20, failover_delay => 15, aq_ha_notifications => true);
CdiZi]Vi^cdgYZgid\ZcZgViZ;6CD8>bZhhV\ZhYjg^c\V9ViV<jVgY[V^adkZg!i]Z[V^adkZg bjhi]VkZWZZceZg[dgbZYjh^c\i]Z9ViV<jVgY7gd`Zg#I]Z9ViV<jVgY7gd`Zg[V^adkZgXdjaY ]VkZWZZcZmZXjiZYWnZ^i]Zgi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ceZg[dgbVcncjbWZgd[[jcXi^dchVi [V^adkZgi^bZ#I]ZcZmiZmVbeaZXgZViZhVig^\\Zgi]Vi[^gZhVi[V^adkZgVcYjhZhi]ZDBMS_ SCHEDULERidXVaaVcZmiZgcVahXg^ei/ CREATE OR REPLACE TRIGGER failover_actions AFTER DB_ROLE_CHANGE ON DATABASE BEGIN dbms_scheduler.create_ ob( ob_name=>'publish_events', ob_type=>'executable', ob_action=>'/u01/oracle/failover_actions.sh', enabled=>TRUE ); END;
I]^hhXg^eiXVcXdciV^cVcnVXi^dchi]VindjlVcieZg[dgbZYVi[V^adkZg!hjX]VhhiVgi^c\ Veea^XVi^dcb^YYaZi^Zgh!hiVgi^c\bZhhV\ZfjZjZh!VcYhddc#
Implementing Client Failover I]^h^hl]ZgZi]ZgjWWZgbZZihi]ZgdVY#L]Zi]ZgndjXVbZY^gZXian]ZgZ[gdbi]ZWZ\^cc^c\d[ i]ZX]VeiZgdgndjidd`i]ZaZ^hjgZanhigdaai]gdj\]i]Z¹C^iinci]^hhZXi^dc!lZl^aaVYYgZhhXdc[^\jgVi^dcYZiV^ah[dgVXdbeaZiZh^iZ[V^adkZg VhlZaaVhVeVgi^Va[V^adkZg#:VX]hZXi^dcl^aaXdkZg]dlidXdc[^\jgZXa^Zci"h^YZXdbedcZcihVh lZaaVhYViVWVhZXdbedcZcih#
Complete Site Failover Configuration 6eea^XVi^dcYZeadnbZcihi]VicZZYidXdc[^\jgZ[dgVXdbeaZiZh^iZ[V^adkZg]VkZXdbeaZiZan gZYjcYVciVeea^XVi^dcXdbedcZcihWZilZZci]Zeg^bVgnVcYhiVcYWnYViVXZciZgh#Ine^XVaan l^i]^cZVX]h^iZ^hVcZildg`adVYWVaVcXZgdgigV[[^XbVcV\Zg!l]^X]VXXZeih^cXdb^c\Xa^Zci gZfjZhih#I]^higV[[^XbVcV\Zgi]ZcY^hig^WjiZhi]ZgZfjZhihidkVg^djhVeea^XVi^dchZgkZghdci]Vi h^iZ#L]ZcVh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6hndjXVc\jZhh!i]ZXdc[^\jgVi^dc[dgi]Zi]^gYineZ^h[VgbdgZXdbeaZmi]Vc[dgi]Z[^ghi# LZl^aaViiVX`i]^hhZXi^dc^cVi^ZgZYVeegdVX]!hiVgi^c\l^i]!Vhndjb^\]i\jZhh!i]Z[^ghiineZ# :VX]hZXi^dc^hYZeZcYZcidci]ZhiZehjcYZgiV`Zc^ci]ZegZXZY^c\hZXi^dc#
First: The Basics I]ZWVh^XXdc[^\jgVi^dcl^aaVaadlVeea^XVi^dchidWZgZhiVgiZYV[iZgV[V^adkZg]VhdXXjggZYVcY l^aa]VkZi]ZVeea^XVi^dcXdccZXi^dchXdggZXian[^cYi]ZcZleg^bVgn#I]ZVeea^XVi^dcXdccZXi^dch h]djaYfj^X`anWneVhhVcndaYeg^bVgn]dhih!l]^X]bVnWZjcVkV^aVWaZdgbVn]VkZadhicZildg` XdccZXi^k^in#
Client-side Configuration 1. I]ZXa^ZciXdc[^\jgVi^dch]djaY^cXajYZVXdccZXiYZhXg^eidgi]Vi^cXajYZhVaaediZci^Va eg^bVgn]dhih^cVcADDRESS_LISTVcYh]djaY]VkZXdccZXii^bZ[V^adkZgZcVWaZY#>c VYY^i^dc!i]^hXdccZXiYZhXg^eidgh]djaYWZXdccZXi^c\idi]ZYViVWVhZjh^c\VYViVWVhZ hZgk^XZ^ci]ZCONNECT_DATAedgi^dc^chiZVYd[VH>9Zcign#=ZgZ¼hVcZmVbeaZ/ SALES = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL (ADDRESS = (PROTOCOL (ADDRESS = (PROTOCOL (ADDRESS = (PROTOCOL (LOAD_BALANCE = yes) ) (CONNECT_DATA= (SERVICE_NAME=SALES) ) )
= = = =
TCP)(HOST TCP)(HOST TCP)(HOST TCP)(HOST
= = = =
MATRIX1)(PORT = 1521)) MATRIX2)(PORT = 1521)) MATRIX_DR01)(PORT = 1521)) MATRIX_DR02)(PORT = 1521))
2. L]Zci]ZVeea^XVi^dcXdccZXi^dchVgZWZ^c\bVYZ!^[i]Znh]djaY]VeeZcidViiZbeiid XdccZXiidVcdaYeg^bVgn]dhii]Vi^hjcVkV^aVWaZ!i]ZXdccZXi^dcViiZbeiidi]Vi]dhi h]djaYaVhicdadc\Zgi]Vc(hZXdcYh#I]^hVaadlh[dgXdccZXi^dcViiZbeihid\Zii]gdj\] i]ZADDRESS_LISTfj^X`anjci^aVcZleg^bVgn]dhi^h[djcY#;dgVcD8>Xa^Zci!hZii]Z [daadl^c\^ci]ZhfacZi#dgV[^aZ/ SQLNET.OUTBOUND_CONNECT_TIMEOUT=3
;dg?978i]^X`VcYi]^cXa^Zcih!Xdc[^\jgZi]Z[daadl^c\egdeZgindci]Z9ViVHdjgXZ l]ViV?978Veea^XVi^dcjhZhidYZ[^cZi]ZXdccZXi^dcidi]ZYViVWVhZ/ SQLnetDef.TCP_CONNTIMEOUT_STR=3000
390
DgVXaZ9ViV<jVgY&&g=VcYWdd`
Database Configuration 1. Dci]Zeg^bVgnYViVWVhZ!XgZViZi]ZYViVWVhZhZgk^XZi]Vii]ZVeea^XVi^dcl^aajhZid XdccZXiidi]ZYViVWVhZ#I]ZhZgk^XZXVcWZXgZViZYjh^c\i]ZDBMS_SERVICEEA$HFA eVX`V\Zdgk^Vi]ZhgkXia8ajhiZglVgZji^a^in/ exec DBMS_SERVICE.CREATE_SERVICE ( service_name => 'sales', network_name => 'sales');
CdiZi]Vindjh]djaYcdi^cXajYZi]ZhZgk^XZcVbZ^ci]ZSERVICE_NAMESeVgVbZiZg# >chiZVY!ndjh]djaYVaadli]Zig^\\ZgYZhXg^WZY^ci]ZcZmihiZeidbVcV\Zi]ZhiVgi^c\ VcYhidee^c\d[i]ZhZgk^XZ# 2. ;dggZVhdcha^hiZY^ci]Z¹C^iin
CdiZi]Vi^[ndjVgZjh^c\Vad\^XVahiVcYWn!ndjh]djaYVahdXgZViZi]ZhVbZig^\\ZgVgdjcY i]ZDB_ROLE_CHANGEhnhiZbZkZci#6ad\^XVahiVcYWnVeea^ZhX]Vc\Zhl]^aZ^i^hdeZc# 6i[V^adkZgi^bZ!i]Zad\^XVa^hXdckZgiZYidVeg^bVgnl^i]djii]ZcZZYidgZhiVgii]Z ^chiVcXZ!l]^X]bZVchi]Zafter startup on databaseig^\\Zgl^aacdi[^gZ#H^cXZ i]ZDB_ROLE_CHANGEig^\\Zgl^aa[^gZVi[V^adkZgi^bZ[dgVad\^XVa!ndjXVcjhZ^iidhiVgi i]ZhZgk^XZVi[V^adkZgi^bZVcYYZeZcYdci]Zafter startup on databaseig^\\Zgid hiVgi^ijedchjWhZfjZcigZhiVgih#
Second: Stepping It Up a Notch I]ZcZmihiZeje^cVXa^Zci[V^adkZgXdc[^\jgVi^dc^hid]VkZi]ZYViVWVhZVcYXa^ZciXdccZXi^dch [V^adkZgVjidbVi^XVaan#CZlVcYZm^hi^c\XdccZXi^dchh]djaYWZXdggZXiangdjiZYidi]ZcZleg^bVgn YViVWVhZ#I]^hXdc[^\jgVi^dcVahdVXXdjcih[dgVeea^XVi^dchi]ViXVccdibV`ZjhZd[;6CbZhhV\^c\# 6hbZci^dcZYZVga^Zg!i]ZhiZeh[dgi]^hXdc[^\jgVi^dcWj^aYjedci]ZegZXZY^c\ZmVbeaZ#
Client-side Configuration 1. H^cXZi]ZXa^ZciVeea^XVi^dccZZYhid[V^adkZg^ihXdccZXi^dcVjidbVi^XVaanVcYi]Z Veea^XVi^dcYdZhc¼ibZZii]ZgZfj^gZbZcih[dg;6CbZhhV\^c\!ndjbjhiXdc[^\jgZi]Z Xa^ZcideZgVi^c\hnhiZbI8Ei^bZdjih#I]ZI8Ei^bZdjihh]djaYWZhZiidi]ZVbdjci d[i^bZ^iiV`Zh[dgi]ZYViVWVhZaVnZgid[V^adkZgVcYi]ZVeea^XVi^dchZgk^XZhidWZ hiVgiZY#6hY^[[ZgZcideZgVi^c\hnhiZbh]VkZY^[[ZgZciYZ[VjaikVajZhVcYY^[[ZgZciI8E ^beaZbZciVi^dch!^i^hWZhiidXdchjaindjgdeZgVi^c\hnhiZbbVcjVah[dg]dlidXdc[^\jgZ
8]VeiZg&%/ 6jidbVi^c\H^iZVcY8a^Zci;V^adkZg
391
I8Ei^bZdjiegdeZgan#;V^a^c\idXdc[^\jgZi]ZhZi^bZdjihl^aagZhjai^cndjgVeea^XVi^dch ]Vc\^c\[dgi]Zi^bZdjieZg^dYWZ[dgZi]Znl^aa[V^adkZg# 2. DcXZi]ZZm^hi^c\Veea^XVi^dcXdccZXi^dchgZXZ^kZVcZmXZei^dc!i]ZVeea^XVi^dch]djaY WZXdYZYidVjidbVi^XVaangZign#;dgD8>Veea^XVi^dchVcY?978i]^X`Veea^XVi^dch!ndj XVcjhZI6;idVjidbViZi]^hgZign#;dgVeea^XVi^dchi]ViXVccdibV`ZjhZd[I6;?978 i]^cVeea^XVi^dch!gZignad\^Xh]djaYWZWj^ai^cidi]ZVeea^XVi^dc#;dgZmVbeaZ!l]Zc VhZhh^dc[gdbi]ZXdccZXi^dceddagZXZ^kZhVcnZmXZei^dci]VigZhjaih^cVY^hXdccZXi hjX]VhVcDG6"(&&(Zggdg!i]ZVeea^XVi^dch]djaYVjidbVi^XVaanViiZbeiidgZXdccZXi i]VihZhh^dc#I]ZgZXdccZXi^dcViiZbeihh]djaYWZXdc[^\jgZYhdi]Vii]Znl^aaXdci^cjZ [dgi]ZaZc\i]d[i^bZi]Vi^iiV`Zhid[V^adkZgi]ZYViVWVhZaVnZgVcYWg^c\i]ZVeea^XVi^dc hZgk^XZhdca^cZ#
Database Configuration IdVjidbViZi]ZgZXdccZXi^dcd[Zm^hi^c\hZhh^dch[dgD8> Veea^XVi^dch!hZgkZg"h^YZI6;h]djaYWZXdc[^\jgZYdci]ZYViVWVhZ[dgi]ZhZgk^XZi]Vii]Z Veea^XVi^dcjhZhidXdccZXiidi]ZYViVWVhZ#=ZgZ¼hVcZmVbeaZ/ exec DBMS_SERVICE.MODIFY_SERVICE( service_name => 'SALES', failover_method => 'BASIC', failover_type => 'SELECT', failover_retries => 180, failover_delay => 1);
Third: Ultimate Client Failover >ci]^hXa^Zci[V^adkZgXdc[^\jgVi^dc!i]ZYViVWVhZVcYi]ZVeea^XVi^dcXdccZXi^dchVgZ[V^aZYdkZg VjidbVi^XVaan#L]Zci]Z[V^adkZg]VhXdbeaZiZY!i]ZVeea^XVi^dch]djaYWZcdi^[^ZYk^V;6C bZhhV\Zhi]Vii]ZdaYeg^bVgn^hjcVkV^aVWaZVcYi]ZVeea^XVi^dch]djaYXdccZXiidi]ZcZl eg^bVgnYViVWVhZ#
Client-side Configuration ;dgD8>Veea^XVi^dch!i]Z[daadl^c\gZfj^gZbZcihbjhiWZbZi^cdgYZgidgZXZ^kZ;6CD8> bZhhV\Zh/ 1. :cVWaZi]ZOCI_EVENTSVii]ZZck^gdcbZciXgZVi^dci^bZdci]ZXa^ZciVh[daadlh/ ( OCIEnvCreate(...) )
2. D8>Veea^XVi^dcbjhiWZa^c`ZYl^i]i]ZXa^Zcii]gZVYdgdeZgVi^c\hnhiZba^WgVgn# ?978Veea^XVi^dchh]djaYWZXdc[^\jgZY[dg;Vhi8dccZXi^dc;V^adkZg#>cVYY^i^dc!?978 Veea^XVi^dchh]djaYbZZii]Z;8;gZfj^gZbZcihi]VilZgZY^hXjhhZY^ci]Z¹C^iin
392
DgVXaZ9ViV<jVgY&&g=VcYWdd` ods.setUser("hr"); ods.setPassword("hr"); ods.setConnectionCachingEnabled(True); ods.setFastConnectionFailoverEnabled(True); ods.setConnectionCacheName("MyCache"); ods.setConnectionCacheProperties(cp);
2. 8dc[^\jgZi]Z?978Veea^XVi^dcidhjWhXg^WZidgZbdiZDCHYVZbdchi]ViZm^hidci]Z eg^bVgnVcYhiVcYWn]dhih#>[i]Zeg^bVgnVcYhiVcYWn]VkZDgVXaZ8ajhiZglVgZ^chiVaaZY! i]ZhZDCHYVZbdchh]djaYVagZVYnZm^hi#>[i]Zeg^bVgnVcYhiVcYWn]dhihVgZcdieVgi d[VXajhiZg!i]ZDCHYVZbdchdcZVX]]dhicZZYidWZXgZViZY#IdXgZViZVcYhiVgii]Z DCHYVZbdch!jhZVcDCHXdc[^\jgVi^dc[^aZidXdc[^\jgZDCH#I]^h[^aZh]djaYZm^hi^c i]ZDG68A:T=DB:$debc$Xdc[Y^gZXidgnV[iZg^chiVaaVi^dcd[i]ZDgVXaZhd[ilVgZhiVX`# >ih]djaYWZXdc[^\jgZYh^b^aVgidi]Z[daadl^c\/ localport=6100 remoteport=4200 loglevel=3 nodes=halinux03:6200,halinux04:6200
>ci]^hZmVbeaZ!i]ZnodeseVgVbZiZged^cihidi]Zeg^bVgnVcYhiVcYWn]dhih[daadlZY Wni]ZgZbdiZedgi[dgi]ZDCHYVZbdcgjcc^c\dci]Viedgi#DcXZi]ZXdc[^\jgVi^dc[^aZ ]VhWZZcXgZViZY!ndjXVchiVgii]ZDCHYVZbdcdci]Zb^YYaZi^ZgdgXa^ZcicdYZhWn ^hhj^c\i]Z[daadl^c\XdbbVcY/ $onsctl start
3. 6[iZgi]ZDCHYVZbdch]VkZWZZcXgZViZYVcYhiVgiZY!Xdc[^\jgZi]Z?978Veea^XVi^dcid gZbdiZanhjWhXg^WZidi]dhZYVZbdch/ ods.setONSConfiguration("halinux03:6200,halinux04:6200");
Database Configuration I]Z\ddYcZlh[dgi]dhZd[ndjl^i]D8>Veea^XVi^dch^hi]VindjVgZ egZiinbjX]YdcZVii]^hed^ci#L]Zci]ZD8>Veea^XVi^dcXdccZXihidi]ZYViVWVhZ!VaacZXZhhVgn ^c[dgbVi^dcidXdchigjXii]Z;6CbZhhV\ZVhlZaaVh]dlidXdciVXii]ZXa^Zci^heaVXZY^cidi]Z reg$iVWaZ#L]ZcV9ViV<jVgY[V^adkZg^heZg[dgbZYjh^c\i]Z9ViV<jVgY7gd`Zg!i]Z;6CD8> ZkZci^hVjidbVi^XVaanXgZViZYVcYhZciidi]ZVeea^XVi^dc# ;dgi]dhZd[ndjl^i]?978Veea^XVi^dch!ndj]VkZhdbZldg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QUE_NAME
Eg^bVgn
]Vhjc%&
BVig^m&
BVig^m
Eg^bVgn
]Vhjc%'
BVig^m'
BVig^m
HiVcYWn
]Vhjc)'
BVig^mT9G%
BVig^mT9G%
I]Z[daadl^c\ZmVbeaZh]dli]Z;6CDCHXdc[^\jgVi^dc[^aZXdc[^\jgZYjh^c\i]ZkVajZh h]dlc^ci]ZiVWaZ/ Matrix peer=Matrix_DR0 Matrix_DR0 peer=Matrix Matrix service=SALES location=hasun01,Matrix1:hasun02,Matrix2 Matrix_DR0 service=SALES location=hasun42,Matrix_DR0
2. L]ZcXVaa^c\VcZmiZgcVaegd\gVb[gdbi]ZYViVWVhZ!ndjcZZYideVhhi]Zegd\gVbi]Z Veegdeg^ViZZck^gdcbZcikVg^VWaZhhjX]VhORACLE_HOME!ORACLE_SID!VcYhddc#>i^h d[iZcZVh^ZgidYdi]^hWnWj^aY^c\VlgVeeZghXg^eiVgdjcYi]ZZmiZgcVaegd\gVbi]Vindj VgZXVaa^c\VcYhZii]ZkVg^VWaZh^ci]ZlgVeeZghXg^ei#L]ZcXVaa^c\i]ZDCHejWa^h]Zg! ndjldjaYjhZVlgVeeZghXg^eih^b^aVgidi]Z[daadl^c\/ # /bin/ksh export TZ=PST8PDT export ORACLE_SID=sales export ORACLE_HOME=/u01/app/oracle/product/10.2.0 export LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/lib export PATH=/u01/app/oracle/product/10.2.0/bin:$PATH /u01/app/oracle/product/10.2.0/bin/cfo r
>ci]^hlgVeeZghXg^ei¼haVhia^cZ!i]ZDCHejWa^h]Zg^hXVaaZYl^i]i]Zrdei^dc!l]^X] ^cY^XViZhi]Vi^ih]djaYWZZmZXjiZYVcYi]ZZkZcihejWa^h]ZY#CdiZi]Vil]ZcXdc[^\jg^c\ i]ZejWa^h]ZgdcVG68!i]ZORA_CRS_HOMEkVg^VWaZbjhiWZhZihdi]Vii]ZejWa^h]Zgl^aa jhZi]ZDCHYVZbdch^ci]ZDgVXaZ8GH]dbZ^chiZVYd[i]ZDCHYVZbdch^ci]ZDgVXaZ YViVWVhZ]dbZ# 3. CdlndjVgZgZVYnidXdc[^\jgZi]ZYViVWVhZidXVaai]ZDCHejWa^h]Zgl]ZcZkZgV [V^adkZg]VhdXXjggZY#JhZi]ZDB_ROLE_CHANGEhnhiZbZkZciid[^gZi]^hig^\\Zg#Dci]Z eg^bVgnYViVWVhZ!XgZViZi]ZgdaZ"X]Vc\Zig^\\Zgi]Vil^aa\ZcZgViZi]ZgZYdi]Vil^aa jeYViZi]ZhiVcYWn#>ci]Z[daadl^c\ZmVbeaZ!Vig^\\ZgXVaaZYons_publish^hegdk^YZY idhZcYZkZcihl]ZcVYViVWVhZgdaZX]Vc\Zh/ CREATE OR REPLACE TRIGGER ons_publish AFTER DB_ROLE_CHANGE ON DATABASE BEGIN dbms_scheduler.create_ ob( ob_name=>'publish_events',
394
DgVXaZ9ViV<jVgY&&g=VcYWdd` ob_type=>'executable', ob_action=>'/u01/oracle/product/10.2.0/db_1/bin/cfo.sh', enabled=>TRUE ); END;
DcXZi]Zig^\\Zg99A]VhWZZcgZXdkZgZYdci]ZhiVcYWn!ndjgXa^ZcihVgZ[jaanegZeVgZY [dgVjidbVi^XVcYhZVbaZhhgZXdccZXi^dc^ci]ZZkZcid[V[V^adkZg#
Conclusion 6hndj]VkZhZZc![V^a^c\dkZgndjgYViVWVhZl^i]DgVXaZ9ViV<jVgYXVcWZYdcZZVh^anVcY fj^X`an#>i¼hVahd^bedgiVciidYZkdiZXdch^YZgVWaZZ[[dgiidVhhjg^c\i]VindjgVeea^XVi^dc XdccZXi^dch!Wdi]cZlVcYZm^hi^c\!XVcVahd[V^adkZgZVh^anVcYfj^X`an#8dc[^\jg^c\[dgegdeZg Veea^XVi^dc[V^adkZgXVc\gZViangZYjXZndjgdkZgVaaYdlci^bZVcY]ZaendjbZZiZkZci]Zbdhi hig^c\ZcihZgk^XZaZkZaV\gZZbZcih#=deZ[jaan!i]^hX]VeiZg]Vh]ZaeZYndjjcYZghiVcYi]ZkVg^djh DgVXaZiZX]cdad\^ZhVhhdX^ViZYl^i]Veea^XVi^dc[V^adkZgVhlZaaVh]dlidXdc[^\jgZi]ZbidXgV[i VXdbeaZiZhdaji^dc#
CHAPTER
11 B^c^b^o^c\EaVccZY 9dlci^bZJh^c\9ViV <jVgYHl^iX]dkZg (.*
396
DgVXaZ9ViV<jVgY&&g=VcYWdd`
]^hX]VeiZgY^hXjhhZh]dl9ViV<jVgYXVcWZaZkZgV\ZY^cXVhZhd[eaVccZY b^\gVi^dch#I]Z[^ghieVgid[i]^hX]VeiZgXdkZghjhZXVhZZmVbeaZhd[b^\gVi^dcidV cZlhnhiZbXdc[^\jgVi^dcjh^c\9ViV<jVgYhl^iX]dkZg#I]ZhZXdcYeVgiXdkZgh YViVWVhZgdaa^c\je\gVYZh#I]ZegZXZY^c\X]VeiZghd[i]^hWdd`]VkZVagZVYn XdkZgZYi]ZbZX]Vc^Xhd[9ViV<jVgYXdc[^\jgVi^dcVcYhl^iX]dkZg!hdlZYgVl dci]dhZeVgihd[i]ZWdd`id]ZaeZmeaV^ci]ZXdcXZeihegZhZciZY]ZgZ#
t
Overview of Planned Migration 6hZmeaV^cZY^cZVga^ZgX]VeiZgh!ndjXVcaZkZgV\Z9ViV<jVgYidegdk^YZ]^\]VkV^aVW^a^in[dg eaVccZYVhlZaaVhjceaVccZYdjiV\Zh#=dlZkZg!9ViV<jVgYXVcVahdWZjhZY^ceaVccZY b^\gVi^dchigViZ\^ZhhjX]Vhi]Z[daadl^c\/ N Data Center migration 8gZViZVhiVcYWnVii]ZcZlYViVXZciZgVcYi]Zchl^iX]dkZg# N Migrating to Automatic Storage Management (ASM) and/or Real Application Clusters (RAC) 8gZViZVc6HBhiVcYWn[gdbVcdc"6HBeg^bVgnVcYi]Zchl^iX]dkZg#6h^b^aVg hXZcVg^dXVcWZaZkZgV\ZY[dgb^\gVi^dcidG68# N Refreshing technology stack 8gZViZVhiVcYWnYViVWVhZdccZlhZgkZghVcY$dghidgV\Z VcYi]Zchl^iX]dkZg# N Implementing database changes in a rolling fashion—for example,Automatic Segment Space Management (ASSM), ra , and oc 7j^aYVad\^XVahiVcYWn YViVWVhZ!^beaZbZcii]ZgZfj^gZYYViVWVhZX]Vc\Zh!VcYi]Zchl^iX]dkZg# N Upgrading database release JhZVigVch^Zciad\^XVahiVcYWnYViVWVhZ[dggdaa^c\ YViVWVhZje\gVYZh#I]^h^hi]Z[dXjhd[i]ZhZXdcYhZXi^dcd[i]^hX]VeiZg# N Migrating to a different OS/platform JhZVe]nh^XVahiVcYWn[dgeaVi[dgbb^\gVi^dch# 8jggZciani]^h^hhjeedgiZYdcanl^i]i]Z[daadl^c\/L^cYdlhidA^cjm!('"W^iid+)" W^i!=ZlaZiiEVX`VgYJc^m=E"JMidVgZYjXZY^chigjXi^dchZiXdbejiZgG>H8#HZZ BZiVA^c`CdiZ)&()-)#&[dgbdgZYZiV^ah# NOTE The standby and primary servers of a Data Guard environment do not have to match from a configuration perspective—for example, the size of the servers, number of CPUs, or number of RAC nodes. However, the OS, platform, and database software version need to be same. As we discussed earlier in this book, there are some exceptions to this rule. Although the configuration between the primary and standby systems can differ, it is important to keep in mind that the standby should have enough overall capacity to handle the production workload in the case of a switchover or failover.
8]VeiZg&&/ B^c^b^o^c\EaVccZY9dlci^bZJh^c\9ViV<jVgYHl^iX]dkZg
397
Leveraging Data Guard Switchover for Planned Migration AZkZgV\^c\9ViV<jVgY^ceaVccZYb^\gVi^dchXZcVg^dhaZihndjcdidcanhl^iX]dkZgidi]ZcZl Xdc[^\jgVi^dcl^i]kZgna^iiaZYdlci^bZ!WjiVahdaZihndjhigZVba^cZ[V^aWVX`^cXVhZd[Vc ZbZg\ZcXn#I]^hhZXi^dcVYYgZhhZhVXdjeaZd[eaVccZYb^\gVi^dchXZcVg^dh!hjX]VhYViVXZciZg bdkZh!iZX]cdad\nhiVX`X]Vc\Zh!dgb^\gVi^dcid6HB$G68#AZi¼hiV`ZVYZ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jgVi^dc#:chjgZi]Vi [aVh]WVX`ad\\^c\^hZcVWaZYdci]Zeg^bVgnVcYhiVcYWn#>[^i^hcdiZcVWaZY!^il^aa gZfj^gZVhbVaadjiV\ZYViVWVhZh]jiYdlcVcYhiVgijebdjciidZcVWaZ^i/ SHUTDOWN IMMEDIATE - Note, for Oracle RAC environments this needs to be performed on all instances STARTUP MOUNT ALTER DATABASE FLASHBACK ON ALTER DATABASE OPEN
2. 9ViV<jVgY7gd`ZgXdc[^\jgVi^dchVgZcdihjeedgiZY^ci]^hgdaa^c\je\gVYZbZi]dYdad\n# >[i]Z7gd`Zg^hWZ^c\jhZY!i]Z7gd`ZgbjhiWZY^hVWaZYdcWdi]i]Zeg^bVgnVcYhiVcYWn YViVWVhZh/ ALTER SYSTEM SET DG_BROKER_START=FALSE SCOPE=BOTH;
I]Z9ViV<jVgY7gd`ZgXVcWZgZ"ZcVWaZYV[iZgi]ZXdbeaZi^dcd[i]Zgdaa^c\je\gVYZ# 3. I]Z9ViV<jVgYegdiZXi^dcbdYZbjhiWZhZiidZ^i]ZgBVm^bjb6kV^aVW^a^indg BVm^bjbEZg[dgbVcXZ/ SELECT PROTECTION_MODE FROM V$DATABASE;
4. IdZchjgZi]Vii]Zeg^bVgnYViVWVhZXVcegdXZZYl]^aZi]Zad\^XVahiVcYWnYViVWVhZ^h WZ^c\je\gVYZY!i]ZLOG_ARCHIVE_DEST_n ^c^i#dgVeVgVbZiZged^ci^c\idi]Zad\^XVa hiVcYWnYViVWVhZYZhi^cVi^dcbjhiWZhZiidOPTIONAL^[^ilVhhZiidMANDATORY# 5. I]ZCOMPATIBLE^c^i#dgVeVgVbZiZgbjhibViX]i]Zhd[ilVgZgZaZVhZeg^dgidi]Z je\gVYZ¸[dgZmVbeaZ!^[je\gVY^c\[gdb&%#+id&%#,!hZii]ZCOMPATIBLE eVgVbZiZgid&%#+#CdiZi]VidcXZi]ZCOMPATIBLEeVgVbZiZg^hjeYViZYidi]Z iVg\ZiYViVWVh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]ZDgVXaZ"egdk^YZYXadc^c\ji^a^inidjeYViZi]ZDgVXaZHd[ilVgZ>ckZcidgnl^i] i]ZcZlDG68A:T=DB:adXVi^dc/ /u01/app/oracle/product/11.1.0.7/clone/bin/clone.pl ORACLE_HOME=/u01/app/oracle/product/11.1.0.7 ORACLE_HOME_NAME=11gR1d07 'O"CLUSTER_NODES={node1,node2}"' '-O"LOCAL_NODE=node1"'
8. 6hgddijhZg!gjc$j%&$Vee$dgVXaZ$egdYjXi$&%#,$gddi#h]# 9. Cdlje\gVYZi]ZcZlDG68A:T=DB:id&%#,jh^c\DgVXaZJc^kZghVa>chiVaaZgid Veeani]ZeViX]hZi# 10. 6heVgid[i]ZegZ"je\gVYZegdXZhh!hidegZYdigVchedgiidi]ZhiVcYWn/ ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=DEFER SCOPE=MEMORY
11. EZg[dgbegZ"je\gVYZhiZehdci]Zad\^XVahiVcYWn/ >i^hVahdgZXdbbZcYZYi]VindjXgZViZV
12. Je\gVYZi]ZDG68A:T=DB:hd[ilVgZdci]Zad\^XVahiVcYWnhnhiZb#CdiZi]Vi^[i]Z hiVcYWnYViVWVhZ^hXdc[^\jgZY^cVG68Zck^gdcbZci!i]Zci]ZDgVXaZ8ajhiZglVgZ ]VhidWZVii]Z]^\]ZhikZgh^dc¸^ci]^hZmVbeaZ!&%#,#:chjgZi]Vii]ZDgVXaZ 8ajhiZglVgZ^hVii]Z]^\]ZhiVcYhVbZgZaZVhZVXgdhhVaacdYZhd[i]ZXajhiZgWZ[dgZ hiVgi^c\i]ZYViVWVhZgdaa^c\je\gVYZ#>[i]ZDgVXaZ8ajhiZglVgZcZZYhidWZje\gVYZY! ^iXVcWZje\gVYZY^cVgdaa^c\je\gVYZ[Vh]^dcVhlZaa#9jg^c\i]Z8ajhiZglVgZgdaa^c\ je\gVYZ!i]Z6HBVcYhiVcYWn^chiVcXZdci]ZcdYZWZ^c\je\gVYZYl^aacZZYidWZ Ydlc# DcXZi]Z8ajhiZglVgZ^hje\gVYZYid&%#,!ndjXVcdei^dcVaani]dj\]]^\]an gZXdbbZcYZYje\gVYZ6HBid&%#,VhlZaa#6HB^hVahdgdaa^c\je\gVYZVWaZ^c DgVXaZ9ViVWVhZ&&g¸i]Vi^h!gdaa^c\je\gVYZXVcWZjhZYidje\gVYZ[gdb&%#+id &%#,# 13. I]Zje\gVYZl^aaWZeZg[dgbZYdci]Zad\^XVahiVcYWnYViVWVhZ0i]jhndjl^aacZZYid hideHFA6eean/ ALTER DATABASE STOP LOGICAL STANDBY APPLY;
14. H]jiYdlci]Zad\^XVahiVcYWnYViVWVhZ# 15. HZii]ZORACLE_HOMEZck^gdcbZcikVg^VWaZidi]ZcZlhd[ilVgZadXVi^dc!VcYhiVgijei]Z ad\^XVahiVcYWnjh^c\i]^hcZlje\gVYZYDG68A:T=DB:# 16. :mZXjiZi]Z9ViVWVhZJe\gVYZ6hh^hiVci97J6ji^a^in[gdbi]ZcZlDG68A:T=DB:#>i ^h]^\]angZXdbbZcYZYi]VindjjhZi]Z97J6ji^a^in[dgVaaje\gVYZhXZcVg^dh!hjX]Vh [gdb&%gG'id&&gje\gVYZh!WZXVjhZ^iegZkZcihZggdghVcY]VcYaZhhZkZgVaedhi"je\gVYZ
8]VeiZg&&/ B^c^b^o^c\EaVccZY9dlci^bZJh^c\9ViV<jVgYHl^iX]dkZg
401
iVh`hhjX]Vh8ajhiZglVgZD8GjeYViZhVhlZaaVhoratabX]Vc\Zh#;dgVcDgVXaZ eViX]hZiVeean!hjX]Vh&%#,!jhZi]ZDgVXaZJc^kZghVa>chiVaaZg# 17. JeYViZi]ZD8Gl^i]i]ZcZlDG68A:T=DB:adXVi^dc[dgi]^had\^XVahiVcYWnYViVWVhZ hgkXiabdY^[nYViVWVhZ"YB6IG>M"%/u01/app/oracle/product/11.1.0.7# 18. >[VcVgX]^kZYgZYdad\gZedh^idgnlVhjhZY^chiZe+!ndjXVcjhZi]ZRMAN CATALOG XdbbVcYidXViVad\i]ZVgX]^kZYgZYdad\gZedh^idgnYZhi^cVi^dcidVkd^YgZhZcY^c\ i]dhZad\h/ RMAN> CATALOG START WITH '+FRA/Matrix_DR1/ARCHIVELOG/';
19. GZhiVgii]Zad\^XVahiVcYWnYViVWVhZ/ STARTUP MOUNT; ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE;
20. NdjXVccdlgZhiVgii]ZigVchedgihZgk^XZh[dggZYdidi]Zad\^XVahiVcYWn[gdbi]Zeg^bVgn YViVWVhZ/ ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE SCOPE=MEMORY
6ii]^hed^ci!i]Zeg^bVgn^hgjcc^c\i]ZadlZgkZgh^dcd[i]Zhd[ilVgZVcYi]Zad\^XVa hiVcYWn^hgjcc^c\i]Zje\gVYZhd[ilVgZkZgh^dc#Id[^c^h]jei]Zgdaa^c\je\gVYZegdXZhh! ndjh]djaYje\gVYZ$eViX]i]Zeg^bVgnYViVWVhZ#6hl^iX]dkZgl^aaWZeZg[dgbZYid X]Vc\Zi]Zeg^bVgnYViVWVhZgdaZidi]Zad\^XVahiVcYWngdaZ!VcYl^aa\di]gdj\]i]Z hVbZje\gVYZegdXZhh# 21. Dci]ZXjggZcieg^bVgn!WZ[dgZegdXZZY^c\l^i]i]Zhl^iX]dkZg!fjZgni]ZVDATABASE k^Zl[dgi]ZSWITCHOVER_STATUS#>[i]ZhiVijh^cY^XViZhTO STANDBY!i]Zc^i^hhV[Zid egdXZZY#Di]Zgl^hZ!hl^iX]dkZgl^i]SESSION DISCONNECT/ SELECT SWITCHOVER_STATUS FROM V$DATABASE; ALTER DATABASE COMMIT TO SWITCHOVER TO LOGICAL STANDBY;
22. H^b^aVgan!dci]Zad\^XVahiVcYWn!WZ[dgZegdXZZY^c\l^i]i]Zhl^iX]dkZg!fjZgni]Z VDATABASEk^Zl[dgi]ZSWITCHOVER_STATUS#>[i]ZhiVijh^cY^XViZhTOPRIMARY! i]Zc^i^hhV[Z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YhideZg[dgbZYdci]Z eg^bVgnVcYhiVcYWnYViVWVhZh/ ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;
Rolling Upgrades Using Transient Logical Standby >ci]^hbZi]dY!Vgdaa^c\je\gVYZ^heZg[dgbZYjh^c\Ve]nh^XVahiVcYWnYViVWVhZi]Vi^h iZbedgVg^anXdckZgiZYidVad\^XVahiVcYWn#I]Zad\^XVahiVcYWnYViVWVhZ^hje\gVYZY!VcYl]Zc i]Zhl^iX]dkZg]VhdXXjggZY!i]Zad\^XVahiVcYWn^hgZkZgiZYWVX`idWZ^c\i]Ze]nh^XVahiVcYWn# I]Zgdaa^c\YViVWVhZje\gVYZegdXZhhjh^c\i]ZigVch^Zciad\^XVahiVcYWn^h^aajhigViZY^c ;^\jgZ&&" I]^hbZi]dY^hVeea^XVWaZ^cDgVXaZ9ViVWVhZ&%gG'VcY&&gG&hiVcYWnYViVWVhZZck^gdcbZcih# I]ZcdiVWaZY^[[ZgZcXZWZilZZci]ZDgVXaZ9ViVWVhZ&%gG'VcY&&gG&^hi]VicZlhnciVm^h ^cXajYZYid[VX^a^iViZi]^hXdckZgh^dcVcYbVcn[ZlZghiZehVgZgZfj^gZYidVXXdbea^h]i]^h^c&&g#
Preparation Preparation
1
Guaranteed Restore Point
Matrix (Prod)
MatrixDR Physical 2
Keep Identity
MatrixDR Logical
Synchronize
Upgrade
LogMiner Build Synchronize Flashback
5
Database to GSP
MatrixDR Logical
Switchover
MatrixDR Physical
Synchronize
Matrix (Prod)
4
Guaranteed Restore Point New $ORACLE_HOME Convert to Physical
6
7
Matrix (Prod)
FIGURE 11-1.
Switchover
8
Matrix (Prod)
9
MatrixDR Physical
Rolling database upgrade with transient logical standby
3
8]VeiZg&&/ B^c^b^o^c\EaVccZY9dlci^bZJh^c\9ViV<jVgYHl^iX]dkZg
403
HdbZY^[[ZgZcXZhVahdZm^hiWZilZZci]ZDgVXaZ9ViVWVhZ&&gVcY&%gG'egdXZhh[adll^i] gZ\VgYidG68Xdc[^\jgVi^dch/hZZDgVXaZBZiVA^c` CdiZ(%%),.#&'[dgbdgZYZiV^ah# EZg[dgb^c\Vgdaa^c\je\gVYZjh^c\VigVch^Zciad\^XVahiVcYWn^hh^b^aVgidi]ZhiVcYVgYHFA 6eeangdaa^c\je\gVYZegdXZhh!YZhXg^WZYZVga^Zg!l^i]i]Z[daadl^c\Y^[[ZgZcXZh/ N 6