
{"id":517,"date":"2021-09-11T15:51:22","date_gmt":"2021-09-11T07:51:22","guid":{"rendered":"http:\/\/dba.qishuo.xin\/?p=517"},"modified":"2022-04-23T22:10:23","modified_gmt":"2022-04-23T14:10:23","slug":"oracle-dataguard-%e5%bd%92%e6%a1%a3%e6%97%a5%e5%bf%97%e5%88%97%e8%a1%a8%e5%9c%a8%e5%a4%87%e5%ba%93%e4%b8%8a%e4%b8%ba0","status":"publish","type":"post","link":"http:\/\/dba.qishuo.xin\/?p=517","title":{"rendered":"Oracle DataGuard \u5f52\u6863\u65e5\u5fd7\u5217\u8868\u5728\u5907\u5e93\u4e0a\u4e3a0"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-69f4620ca7494\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f4620ca7494\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/dba.qishuo.xin\/?p=517\/#1_%E6%95%85%E9%9A%9C%E7%8E%B0%E8%B1%A1%EF%BC%88SYMPTOMS%EF%BC%89\" >1. \u6545\u969c\u73b0\u8c61\uff08SYMPTOMS\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/dba.qishuo.xin\/?p=517\/#2_%E5%8F%98%E5%8C%96%EF%BC%88CHANGES%EF%BC%89\" >2. \u53d8\u5316\uff08CHANGES\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/dba.qishuo.xin\/?p=517\/#3_%E6%95%85%E9%9A%9C%E5%8E%9F%E5%9B%A0%EF%BC%88CAUSE%EF%BC%89\" >3. \u6545\u969c\u539f\u56e0\uff08CAUSE\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/dba.qishuo.xin\/?p=517\/#4_%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%88SOLUTION%EF%BC%89\" >4. \u89e3\u51b3\u65b9\u6848\uff08SOLUTION\uff09<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/dba.qishuo.xin\/?p=517\/#5_%E6%80%BB%E7%BB%93%EF%BC%88SUMMARY%EF%BC%89\" >5. \u603b\u7ed3\uff08SUMMARY\uff09<\/a><\/li><\/ul><\/nav><\/div>\n<p>\u53c2\u89c1\uff1aDoc ID 2041137.1\uff1a<br \/>\n<a target=\"_blank\" href=\"https:\/\/support.oracle.com\/epmos\/faces\/SearchDocDisplay?_adf.ctrl-state=1apbrsg4u5_4&amp;_afrLoop=527169096727071\">https:\/\/support.oracle.com\/epmos\/faces\/SearchDocDisplay?_adf.ctrl-state=1apbrsg4u5_4&amp;_afrLoop=527169096727071<\/a><\/p>\n<h4><span class=\"ez-toc-section\" id=\"1_%E6%95%85%E9%9A%9C%E7%8E%B0%E8%B1%A1%EF%BC%88SYMPTOMS%EF%BC%89\"><\/span>1. \u6545\u969c\u73b0\u8c61\uff08SYMPTOMS\uff09<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u6570\u636e\u5e93\u7248\u672c\uff1aOracle 18c<br \/>\n\u6545\u969c\u73b0\u8c61\uff1aARCHIVE LOG LIST \u547d\u4ee4\u5728\u5907\u5e93\u4e0a\u663e\u793a 0\uff0c\u4f46\u5907\u5e93\u4e0e\u4e3b\u5e93\u5b8c\u5168\u540c\u6b65\u3002<br \/>\n<a href=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2021\/09\/wp_editor_md_5d9041961ca1ab685174a7270713612d.jpg\" data-fancybox=\"images\" data-fancybox=\"images\"><img decoding=\"async\" src=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2021\/09\/wp_editor_md_5d9041961ca1ab685174a7270713612d.jpg\" alt=\"\" \/><\/a><\/p>\n<h4><span class=\"ez-toc-section\" id=\"2_%E5%8F%98%E5%8C%96%EF%BC%88CHANGES%EF%BC%89\"><\/span>2. \u53d8\u5316\uff08CHANGES\uff09<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>Upgraded to 12.1.0.2<\/p>\n<h4><span class=\"ez-toc-section\" id=\"3_%E6%95%85%E9%9A%9C%E5%8E%9F%E5%9B%A0%EF%BC%88CAUSE%EF%BC%89\"><\/span>3. \u6545\u969c\u539f\u56e0\uff08CAUSE\uff09<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>On a standby database:<br \/>\n########### 11gR2:<\/p>\n<pre><code class=\"language-sql\">SQL&gt; SELECT group#,status FROM v$log;\n\nGROUP# STATUS\n---------- ----------------\n1 CLEARING\n2 CLEARING_CURRENT\n3 CLEARING\n8 CLEARING\n5 CLEARING\n6 CLEARING\n7 CLEARING\n4 CLEARING<\/code><\/pre>\n<p>################In 12cR1: Status is UNUSED<\/p>\n<pre><code class=\"language-sql\">SQL&gt; SELECT group#,status FROM v$log;\n\nGROUP# STATUS\n---------- ----------------\n1 UNUSED\n2 UNUSED\n3 UNUSED\n8 UNUSED\n5 UNUSED\n6 UNUSED\n7 UNUSED\n4 UNUSED<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"4_%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88%EF%BC%88SOLUTION%EF%BC%89\"><\/span>4. \u89e3\u51b3\u65b9\u6848\uff08SOLUTION\uff09<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u4e0d\u8981\u5728\u5907\u7528\u7aef\u4f7f\u7528 <code>ARCHIVE LOG LIST<\/code>\u3002<br \/>\n\u4f7f\u7528\u4e0b\u9762\u7684\u67e5\u8be2\u6765\u786e\u5b9a\u6570\u636e\u5e93\u662f\u5426\u540c\u6b65<\/p>\n<pre><code class=\"language-sql\">Primary: SQL&gt;\nSELECT thread#, max(sequence#) &quot;Last Primary Seq Generated&quot;\n  FROM v$archived_log val, v$database vdb\n WHERE val.resetlogs_change# = vdb.resetlogs_change#\n GROUP BY thread#\n ORDER BY 1;\n\nPhyStdby:SQL&gt;\nSELECT thread#, max(sequence#) &quot;Last Standby Seq Received&quot;\n  FROM v$archived_log val, v$database vdb\n WHERE val.resetlogs_change# = vdb.resetlogs_change#\n GROUP BY thread#\n ORDER BY 1;\n\nPhyStdby:SQL&gt;\nSELECT thread#, max(sequence#) &quot;Last Standby Seq Applied&quot;\n  FROM v$archived_log val, v$database vdb\n WHERE val.resetlogs_change# = vdb.resetlogs_change#\n   AND val.applied in (&#039;YES&#039;,&#039;IN-MEMORY&#039;)\n GROUP BY thread#\n ORDER BY 1;<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"5_%E6%80%BB%E7%BB%93%EF%BC%88SUMMARY%EF%BC%89\"><\/span>5. \u603b\u7ed3\uff08SUMMARY\uff09<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u9a8c\u8bc1\u6700\u540e\u4e00\u4e2a\u5e8f\u5217\u662f\u5426\u5df2\u63a5\u6536\uff0c\u6700\u540e\u4e00\u4e2a\u5e8f\u5217\u662f\u5426\u5e94\u7528\u4e8e\u5907\u7528\u6570\u636e\u5e93\uff1a<\/p>\n<pre><code class=\"language-sql\">SELECT x.thread#,\n       x.last_seq_recieved,\n       y.last_seq_applied\n  FROM (SELECT al.thread#,\n               MAX(al.sequence#) AS last_seq_recieved\n         FROM v$archived_log al\n        GROUP BY al.thread# ) x\n  LEFT JOIN\n       (SELECT lh.thread#,\n               MAX(lh.sequence#) AS last_seq_applied\n          FROM v$log_history lh\n         GROUP BY lh.thread#) y\n    ON x.thread# = y.thread#;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u53c2\u89c1\uff1aDoc ID 2041137.1\uff1a http&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,2],"tags":[68,16,69],"class_list":{"0":"post-517","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-oracle","8":"tag-dataguard","9":"tag-oracle","10":"tag-69"},"_links":{"self":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=517"}],"version-history":[{"count":6,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/517\/revisions"}],"predecessor-version":[{"id":1551,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/517\/revisions\/1551"}],"wp:attachment":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=517"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}