{"id":856,"date":"2023-09-07T10:22:00","date_gmt":"2023-09-07T08:22:00","guid":{"rendered":"https:\/\/anjo.pt\/keyword-oracle\/?p=856"},"modified":"2023-09-07T10:23:42","modified_gmt":"2023-09-07T08:23:42","slug":"get-history-of-switchover-and-failover-of-an-oracle-database","status":"publish","type":"post","link":"https:\/\/anjo.pt\/keyword-oracle\/2023\/09\/07\/get-history-of-switchover-and-failover-of-an-oracle-database\/","title":{"rendered":"Get history of Switchover and Failover of an Oracle database"},"content":{"rendered":"\n<p>For physical standbys, there is no DBA_* view that I know which tracks the history of switchover and failover. For Logical standby there is DBA_LOGSTDBY_HISTORY.<\/p>\n\n\n\n<p>Ways to find the information are the Dataguard Broker log &#8211; when Broker is in use -, or using the database alert log and the following grep command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ grep -EB1 &#039;^ALTER DATABASE (SWITCHOVER|FAILOVER) TO&#039; alert_*.log\n\n2023-03-06T14:12:38.905705+01:00\nALTER DATABASE SWITCHOVER TO &#039;mydb2&#039;\n--\n2023-03-06T14:37:43.209653+01:00\nALTER DATABASE FAILOVER TO MYDB1\n--\n2023-03-06T14:38:03.352141+01:00\nALTER DATABASE SWITCHOVER TO PRIMARY (MYDB1)\n--\n2023-03-11T16:00:22.224218+01:00\nALTER DATABASE SWITCHOVER TO &#039;mydb2&#039;\n<\/pre><\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For physical standbys, there is no DBA_* view that I know which tracks the history of switchover and failover. For Logical standby there is DBA_LOGSTDBY_HISTORY. Ways to find the information are the Dataguard Broker log &#8211; when Broker is in use -, or using the database alert log and the following grep command:<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32,6],"tags":[],"class_list":{"0":"post-856","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-audit","7":"category-oracle","8":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/comments?post=856"}],"version-history":[{"count":3,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/856\/revisions"}],"predecessor-version":[{"id":859,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/856\/revisions\/859"}],"wp:attachment":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/media?parent=856"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/categories?post=856"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/tags?post=856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}