{"id":54,"date":"2009-02-06T13:27:51","date_gmt":"2009-02-06T11:27:51","guid":{"rendered":"http:\/\/www.ludovicocaldara.net\/dba\/?p=54"},"modified":"2020-08-18T17:00:47","modified_gmt":"2020-08-18T15:00:47","slug":"more-about-dataguard-and-how-to-check-it","status":"publish","type":"post","link":"https:\/\/www.ludovicocaldara.net\/dba\/more-about-dataguard-and-how-to-check-it\/","title":{"rendered":"More about Dataguard and how to check it"},"content":{"rendered":"<p>After my post <a href=\"https:\/\/www.ludovicocaldara.net\/dba\/quick-oracle-dataguard-check-script\/\">Quick Oracle Dataguard check script<\/a> I have some considerations to add:<br \/>\nto check the gap of applied log stream by <strong>MRP0<\/strong> process it&#8217;s sufficient to replace this query in the perl script I posted:<\/p>\n<pre lang=\"sql\">\r\n select SEQUENCE#, BLOCK# from v\\$managed_standby\r\n        where process='RFS' and client_process='LGWR'\r\n<\/pre>\n<p>with this new one:<\/p>\n<pre lang=\"sql\">\r\n select SEQUENCE#, BLOCK# from v\\$managed_standby\r\n        where process='MRP0'\r\n<\/pre>\n<p>To check this you have to meet the following condition: You should have real-time apply enabled (and possibly NODELAY clause specified in your recover statement). Check it with this query:<\/p>\n<pre lang=\"sql\">\r\nSELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;\r\n<\/pre>\n<p>It should be &#8220;MANAGED REAL TIME APPLY&#8221;.<br \/>\nIf not using realtime apply your MRP0 process will wait until you have a new archive, so even if you have redo transport mode set to LGWR you&#8217;ll wait for standby log completion. Your gap of applied redo stream will be at least one sequence#.<\/p>\n<p>With transport mode set to LGWR and real-time apply the output of the perl script is similar to this one:<\/p>\n<pre>\r\n# .\/checkDataGuard.sh\r\nPROD   :       1230      20631\r\nSTANDBY:       1230      20613\r\n18         blocks gap\r\n<\/pre>\n<p>The whole gap between your primary and standby database should be LOW.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After my post Quick Oracle Dataguard check script I have some considerations to add: to check the gap of applied log stream by MRP0 process it&#8217;s sufficient to replace this query in the perl script I posted: select SEQUENCE#, BLOCK# &hellip; <a href=\"https:\/\/www.ludovicocaldara.net\/dba\/more-about-dataguard-and-how-to-check-it\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[326,329,3],"tags":[32,29,33,31],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-oracle","category-oracle-dg","category-oracledb","tag-mrp0","tag-oracle-dataguard","tag-real-time-apply","tag-standby"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":2,"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":1993,"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/posts\/54\/revisions\/1993"}],"wp:attachment":[{"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ludovicocaldara.net\/dba\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}