{"id":4061,"date":"2021-04-25T09:33:27","date_gmt":"2021-04-25T09:33:27","guid":{"rendered":"https:\/\/swiv.com.br\/configuring-and-enabling-fsfo-fast-start-failover-operation\/"},"modified":"2026-05-27T20:02:32","modified_gmt":"2026-05-27T19:02:32","slug":"configuring-and-enabling-fsfo-fast-start-failover-operation","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/04\/25\/configuring-and-enabling-fsfo-fast-start-failover-operation\/","title":{"rendered":"Configuring and enabling FSFO (Fast-Start Failover Operation)"},"content":{"rendered":"\n<p>Nos artigos anteriores, pudemos explorar um pouco sobre a opera\u00e7\u00e3o de Failover em um ambiente Data Guard, de forma manual. Para facilitar o trabalho e potencializar os recursos de alta disponibilidade, a Oracle disponibiliza o FSFO, que em resumo seria a op\u00e7\u00e3o de Failover de forma autom\u00e1tica, respeitando regras e par\u00e2metros definidos de forma premeditada e antecipada. Aqui vamos explorar um pouco sobre essa importante op\u00e7\u00e3o.<\/p>\n\n\n\n<p>O FSFO nada mais seria que um OCI client constru\u00eddo dentro do utilit\u00e1rio DGMGRL, que invoca de forma autom\u00e1tica o Failover de um ambiente, al\u00e9m de tamb\u00e9m conseguir realizar o &#8220;reinstate&#8221; do ambiente primary com falha (ap\u00f3s sua disponilidade). Em termos de infraestrutura, exige a cria\u00e7\u00e3o de uma entidade chamada \\&#8221;Observer\\&#8221;, que verifica de forma peri\u00f3dica as condi\u00e7\u00f5es dos membros do Data Guard. Um ponto importante \u00e9 que o Observer deve ser criado em um servidor\/estrutura separado dos demais membros, j\u00e1 que ele fica como um ponto de falha \u00fanico nessa estrutura (caso o mesmo fique fora, o ambiente como um todo ficar\u00e1 travado\/congelado):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-234.png\" alt=\"\" class=\"wp-image-7875\"\/><figcaption>Fonte:\u00a0<a href=\"https:\/\/docs.oracle.com\/database\/121\/DGBKR\/sofo.htm#DGBKR390\">https:\/\/docs.oracle.com\/database\/121\/DGBKR\/sofo.htm#DGBKR390<\/a><\/figcaption><\/figure>\n\n\n\n<p>Alguns dos pr\u00e9-requisitos seriam a configura\u00e7\u00e3o do Data Broker, Flashback Database habilitado em todos os membros, Standby Redo Log files criados em todos os membros, instalar o utilit\u00e1rio DGMGRL na m\u00e1quina onde o Observer ir\u00e1 rodar (em nosso artigo, como \u00e9 apenas um laborat\u00f3rio, criarei o Observer em uma m\u00e1quina j\u00e1 existente) e configura\u00e7\u00e3o do tnsnames para comunica\u00e7\u00e3o entre os ambientes.<\/p>\n\n\n\n<p>Os crit\u00e9rios para iniciar o FSFO podem incluir: problemas de conectividade ao primary atrav\u00e9s do standby ou observer, datafile offline, control file corrompido, dicion\u00e1rio corrompido, redo log inacess\u00edveis, congelamento por esgotamento da \u00e1rea de archives, erros com prefixo &#8220;ORA-&#8221; ou por defini\u00e7\u00e3o da aplica\u00e7\u00e3o (como se fosse o start do FSFO por API).<\/p>\n\n\n\n<p>Checando condi\u00e7\u00f5es do ambiente em que vamos utilizar:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@fornix1 ~]$ dgmgrl sys\/oracle@CORTEX\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Apr 25 05:35:38 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nWelcome to DGMGRL, type &quot;help&quot; for information.\nConnected to &quot;cortex&quot;\nConnected as SYSDBA.\nDGMGRL&gt; SHOW CONFIGURATION;\n \nConfiguration - cortex\n \n  Protection Mode: MaxPerformance\n  Members:\n  cortex   - Primary database\n    cortexdr - Physical standby database\n \nFast-Start Failover:  Disabled\n \nConfiguration Status:\nSUCCESS   (status updated 58 seconds ago)\n \nDGMGRL&gt; SHOW DATABASE CORTEX;\n \nDatabase - cortex\n \n  Role:               PRIMARY\n  Intended State:     TRANSPORT-ON\n  Instance(s):\n    cortex\n \nDatabase Status:\nSUCCESS\n \nDGMGRL&gt; SHOW DATABASE CORTEXDR;\n \nDatabase - cortexdr\n \n  Role:               PHYSICAL STANDBY\n  Intended State:     APPLY-ON\n  Transport Lag:      0 seconds (computed 1 second ago)\n  Apply Lag:          0 seconds (computed 1 second ago)\n  Average Apply Rate: 18.00 KByte\/s\n  Real Time Query:    OFF\n  Instance(s):\n    CORTEXDR\n \nDatabase Status:\nSUCCESS\n<\/pre><\/div>\n\n\n<p>Conforme Oracle Note &#8220;Doc ID 1387859.1&#8221;, \u00e9 importante nos certificarmos que o par\u00e2metro &#8220;StaticConnectIdentifier&#8221; esteja devidamente preenchido em todos os membros para o pleno funcionamento do FSFO. O mesmo \u00e9 usado pelo Broker para realizar a conex\u00e3o remota aos bancos de dados. O atributo HOST \u00e9 definido automaticamente pelo Broker,   a partir do que est\u00e1 definido no par\u00e2metro LOCAL_LISTENER:<\/p>\n\n\n\n<p>Prim\u00e1rio preenchido de forma correta:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; SHOW DATABASE CORTEX StaticConnectIdentifier;\n  StaticConnectIdentifier = &#039;(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.109)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=cortex_DGMGRL.localdomain)(INSTANCE_NAME=cortex)(SERVER=DEDICATED)))&#039;\nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Standby tamb\u00e9m:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; SHOW DATABASE CORTEXDR StaticConnectIdentifier;\n  StaticConnectIdentifier = &#039;(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.110)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=cortexDR_DGMGRL.localdomain)(INSTANCE_NAME=CORTEXDR)(SERVER=DEDICATED)))&#039;\nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Caso fosse necess\u00e1rio alterar o valor do par\u00e2metro, a ordem correta \u00e9 ajustar o HOST do LOCAL_LISTENER, reiniciar o listener, e realizar o &#8220;reset&#8221; do par\u00e2metro dentro do Broker, para que o mesmo consiga coletar o novo valor definido (EDIT DATABASE **** RESET PROPERTY StaticConnectIdentifier;) e por \u00faltimo reiniciar o processo de MRP.<\/p>\n\n\n\n<p>Checando que o recurso de FSFO est\u00e1 desabilitado:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; SHOW FAST_START FAILOVER;\n \nFast-Start Failover:  Disabled\n \n  Protection Mode:    MaxPerformance\n  Lag Limit:          30 seconds\n \n  Threshold:          30 seconds\n  Active Target:      (none)\n  Potential Targets:  (none)\n  Observer:           (none)\n  Shutdown Primary:   TRUE\n  Auto-reinstate:     TRUE\n  Observer Reconnect: (none)\n  Observer Override:  FALSE\n \nConfigurable Failover Conditions\n  Health Conditions:\n    Corrupted Controlfile          YES\n    Corrupted Dictionary           YES\n    Inaccessible Logfile            NO\n    Stuck Archiver                  NO\n    Datafile Write Errors          YES\n \n  Oracle Error Conditions:\n    (none)\n<\/pre><\/div>\n\n\n<p>Definindo o target standby de cada banco de dados pelo FSFO:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; EDIT DATABASE CORTEX SET PROPERTY FastStartFailoverTarget = &#039;CORTEXDR&#039;;\nProperty &quot;faststartfailovertarget&quot; updated\nDGMGRL&gt; EDIT DATABASE CORTEXDR SET PROPERTY FastStartFailoverTarget = &#039;CORTEX&#039;;\nProperty &quot;faststartfailovertarget&quot; updated\nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Definindo o valor em 45 segundos do FSFO Threshold (que seria o tempo em que o prim\u00e1rio passasse inacess\u00edvel pelo Observer\/Standby e que disparasse o processo de Failover):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; EDIT CONFIGURATION SET PROPERTY FastStartFailoverThreshold=45;\nProperty &quot;faststartfailoverthreshold&quot; updated\n<\/pre><\/div>\n\n\n<p>Podemos definir tamb\u00e9m o tempo (em segundos) do Redo Apply Lag entre o standby e primary (o valor padr\u00e3o deste par\u00e2metro \u00e9 30, e o menor valor aceit\u00e1vel \u00e9 10 segundos):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; EDIT CONFIGURATION SET PROPERTY FastStartFailoverLagLimit = 120;\nProperty &quot;faststartfailoverlaglimit&quot; updated\n<\/pre><\/div>\n\n\n<p>Verificando que o par\u00e2metro &#8220;FastStartFailoverPmyShutdown&#8221; est\u00e1 definido como TRUE:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; SHOW CONFIGURATION FastStartFailoverPmyShutdown\n  FastStartFailoverPmyShutdown = &#039;TRUE&#039;\nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Mesma coisa para o par\u00e2metro &#8220;FastStartFailoverAutoReinstate&#8221;:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; SHOW CONFIGURATION FastStartFailoverAutoReinstate;\n  FastStartFailoverAutoReinstate = &#039;TRUE&#039;\nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Para habilitar o FSFO, basta rodar o comando abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; ENABLE FAST_START FAILOVER;\nEnabled in Potential Data Loss Mode.\nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Iniciando o Observer na m\u00e1quina do Standby (para ambientes corporativos, nunca fa\u00e7a isso, crie-o em uma m\u00e1quina separada de todos os membros):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@fornix2 trace]$ dgmgrl sys\/oracle@CORTEXDR;\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Apr 25 05:59:41 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nWelcome to DGMGRL, type &quot;help&quot; for information.\nConnected to &quot;cortexDR&quot;\nConnected as SYSDBA.\nDGMGRL&gt; START OBSERVER FILE=&#039;\/home\/oracle\/CORTEXFSFO.dat&#039;;\n&#x5B;W000 2021-04-25T05:59:46.156-03:00] FSFO target standby is cortexdr\nObserver &#039;fornix2&#039; started\n&#x5B;W000 2021-04-25T05:59:46.226-03:00] Observer trace level is set to USER\n&#x5B;W000 2021-04-25T05:59:46.226-03:00] Try to connect to the primary.\n&#x5B;W000 2021-04-25T05:59:46.226-03:00] Try to connect to the primary cortex.\n&#x5B;W000 2021-04-25T05:59:46.282-03:00] The standby cortexdr is ready to be a FSFO target\n&#x5B;W000 2021-04-25T05:59:46.282-03:00] Connection to the primary restored!\n&#x5B;W000 2021-04-25T05:59:48.283-03:00] Disconnecting from database cortex.\n<\/pre><\/div>\n\n\n<p>J\u00e1 podemos ver o reflexo da nova configura\u00e7\u00e3o no primary:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; SHOW CONFIGURATION\n \nConfiguration - cortex\n \n  Protection Mode: MaxPerformance\n  Members:\n  cortex   - Primary database\n    cortexdr - (*) Physical standby database\n \nFast-Start Failover: Enabled in Potential Data Loss Mode\n \nConfiguration Status:\nSUCCESS   (status updated 41 seconds ago)\n \nDGMGRL&gt; SHOW FAST_START FAILOVER\n \nFast-Start Failover: Enabled in Potential Data Loss Mode\n \n  Protection Mode:    MaxPerformance\n  Lag Limit:          120 seconds\n \n  Threshold:          45 seconds\n  Active Target:      cortexdr\n  Potential Targets:  &quot;CORTEXDR&quot;\n    cortexdr   valid\n  Observer:           fornix2\n  Shutdown Primary:   TRUE\n  Auto-reinstate:     TRUE\n  Observer Reconnect: (none)\n  Observer Override:  FALSE\n \nConfigurable Failover Conditions\n  Health Conditions:\n    Corrupted Controlfile          YES\n    Corrupted Dictionary           YES\n    Inaccessible Logfile            NO\n    Stuck Archiver                  NO\n    Datafile Write Errors          YES\n \n  Oracle Error Conditions:\n    (none)\n \nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Vendo o FSFO em a\u00e7\u00e3o ao indisponibilizar o primary:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@fornix1 ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 25 06:15:45 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle.  All rights reserved.\n \n \nConnected to:\nOracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production\nVersion 19.3.0.0.0\n \nSQL&gt; SELECT DB_UNIQUE_NAME,DATABASE_ROLE,OPEN_MODE FROM V$DATABASE;\n \nDB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE\n------------------------------ ---------------- --------------------\ncortex                         PRIMARY          READ WRITE\n \nSQL&gt; SHU ABORT;\nORACLE instance shut down.\nSQL&gt; !ps -ef | grep pmon\ngrid      3308     1  0 04:56 ?        00:00:00 asm_pmon_+ASM\noracle    9057  9035  0 06:16 pts\/0    00:00:00 \/bin\/bash -c ps -ef | grep pmon\noracle    9059  9057  0 06:16 pts\/0    00:00:00 grep pmon\n \nSQL&gt;\n<\/pre><\/div>\n\n\n<p>Analisando comportamento do Observer:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;W000 2021-04-25T05:59:46.282-03:00] Connection to the primary restored!\n&#x5B;W000 2021-04-25T05:59:48.283-03:00] Disconnecting from database cortex.\n&#x5B;W000 2021-04-25T06:15:55.144-03:00] Primary database cannot be reached.\n&#x5B;W000 2021-04-25T06:15:55.144-03:00] Fast-Start Failover threshold has not exceeded. Retry for the next 45 seconds\n&#x5B;W000 2021-04-25T06:15:56.144-03:00] Try to connect to the primary.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:15:56.355-03:00] Primary database cannot be reached.\n&#x5B;W000 2021-04-25T06:15:57.355-03:00] Try to connect to the primary.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:15:57.360-03:00] Primary database cannot be reached.\n&#x5B;W000 2021-04-25T06:15:58.360-03:00] Try to connect to the primary.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:15:58.366-03:00] Primary database cannot be reached.\n&#x5B;W000 2021-04-25T06:15:59.366-03:00] Try to connect to the primary.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:16:37.653-03:00] Primary database cannot be reached.\n&#x5B;W000 2021-04-25T06:16:37.653-03:00] Fast-Start Failover threshold has not exceeded. Retry for the next 3 seconds\n&#x5B;W000 2021-04-25T06:16:38.653-03:00] Try to connect to the primary.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:16:38.659-03:00] Primary database cannot be reached.\n&#x5B;W000 2021-04-25T06:16:38.659-03:00] Fast-Start Failover threshold has not exceeded. Retry for the next 2 seconds\n&#x5B;W000 2021-04-25T06:16:39.659-03:00] Try to connect to the primary.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:16:39.664-03:00] Primary database cannot be reached.\n&#x5B;W000 2021-04-25T06:16:39.664-03:00] Fast-Start Failover threshold has not exceeded. Retry for the next 1 second\n&#x5B;W000 2021-04-25T06:16:40.664-03:00] Try to connect to the primary.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:16:40.671-03:00] Primary database cannot be reached.\n&#x5B;W000 2021-04-25T06:16:40.671-03:00] Fast-Start Failover threshold has expired.\n&#x5B;W000 2021-04-25T06:16:40.671-03:00] Try to connect to the standby.\n&#x5B;W000 2021-04-25T06:16:40.671-03:00] Making a last connection attempt to primary database before proceeding with Fast-Start Failover.\n&#x5B;W000 2021-04-25T06:16:40.671-03:00] Check if the standby is ready for failover.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;S002 2021-04-25T06:16:40.781-03:00] Fast-Start Failover started...\n \n2021-04-25T06:16:40.781-03:00\nInitiating Fast-Start Failover to database &quot;cortexdr&quot;...\n&#x5B;S002 2021-04-25T06:16:40.781-03:00] Initiating Fast-start Failover.\nPerforming failover NOW, please wait...\nFailover succeeded, new primary is &quot;cortexdr&quot;\n2021-04-25T06:17:21.360-03:00\n&#x5B;S002 2021-04-25T06:17:21.360-03:00] Fast-Start Failover finished...\n&#x5B;W000 2021-04-25T06:17:21.360-03:00] Failover succeeded. Restart pinging.\n&#x5B;W000 2021-04-25T06:17:21.684-03:00] Primary database has changed to cortexdr.\n&#x5B;W000 2021-04-25T06:17:21.686-03:00] Try to connect to the primary.\n&#x5B;W000 2021-04-25T06:17:21.686-03:00] Try to connect to the primary cortexdr.\n&#x5B;W000 2021-04-25T06:17:22.073-03:00] The standby cortex needs to be reinstated\n&#x5B;W000 2021-04-25T06:17:22.073-03:00] Try to connect to the new standby cortex.\n&#x5B;W000 2021-04-25T06:17:22.073-03:00] Connection to the primary restored!\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:17:24.075-03:00] Disconnecting from database cortexdr.\n&#x5B;W000 2021-04-25T06:17:52.119-03:00] Try to connect to the new standby cortex.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:18:22.162-03:00] Try to connect to the new standby cortex.\nORA-12514: TNS:listener does not currently know of service requested in connect descriptor\n \nUnable to connect to database using cortex\n<\/pre><\/div>\n\n\n<p>Podemos observar que o Failover foi realizado com \u00eaxito, e \u00e9 refletido na configura\u00e7\u00e3o do Data Guard. O que nos chama a aten\u00e7\u00e3o tamb\u00e9m sobre o log acima \u00e9 que al\u00e9m do failover, ele continua tentando conex\u00e3o com o novo standby, para poder realizar o reinstate do mesmo.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@fornix1 ~]$ dgmgrl sys\/oracle@CORTEXDR\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Apr 25 06:19:40 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nWelcome to DGMGRL, type &quot;help&quot; for information.\nConnected to &quot;CORTEXDR&quot;\nConnected as SYSDBA.\nDGMGRL&gt; SHOW CONFIGURATION;\n \nConfiguration - cortex\n \n  Protection Mode: MaxPerformance\n  Members:\n  cortexdr - Primary database\n    Warning: ORA-16824: multiple warnings, including fast-start failover-related warnings, detected for the database\n \n    cortex   - (*) Physical standby database (disabled)\n      ORA-16661: the standby database needs to be reinstated\n \nFast-Start Failover: Enabled in Potential Data Loss Mode\n \nConfiguration Status:\nWARNING   (status updated 22 seconds ago)\n \nDGMGRL&gt; SHOW DATABASE CORTEXDR;\n \nDatabase - cortexdr\n \n  Role:               PRIMARY\n  Intended State:     TRANSPORT-ON\n  Instance(s):\n    CORTEXDR\n \n  Database Warning(s):\n    ORA-16829: fast-start failover configuration is lagging\n    ORA-16869: fast-start failover target not initialized\n \nDatabase Status:\nWARNING\n \nDGMGRL&gt; SHOW DATABASE CORTEX;\n \nDatabase - cortex\n \n  Role:               PHYSICAL STANDBY\n  Intended State:     APPLY-ON\n  Transport Lag:      (unknown)\n  Apply Lag:          (unknown)\n  Average Apply Rate: (unknown)\n  Real Time Query:    OFF\n  Instance(s):\n    cortex\n \nDatabase Status:\nDISABLED - ORA-16661: the standby database needs to be reinstated\n<\/pre><\/div>\n\n\n<p>Montando o novo standby, de modo que o Observer o reconhecer\u00e1 e proceder\u00e1 com o reinstate:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@fornix1 ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Sun Apr 25 06:22:39 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle.  All rights reserved.\n \nConnected to an idle instance.\n \nSQL&gt; STARTUP MOUNT;\nORACLE instance started.\n \nTotal System Global Area 2583690520 bytes\nFixed Size                  8899864 bytes\nVariable Size             553648128 bytes\nDatabase Buffers         2013265920 bytes\nRedo Buffers                7876608 bytes\nDatabase mounted.\nSQL&gt;\n<\/pre><\/div>\n\n\n<p>Reinstate realizado:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:22:52.556-03:00] Try to connect to the new standby cortex.\nORA-12528: TNS:listener: all appropriate instances are blocking new connections\n \nUnable to connect to database using cortex\n&#x5B;W000 2021-04-25T06:23:22.593-03:00] Try to connect to the new standby cortex.\n&#x5B;W000 2021-04-25T06:23:23.598-03:00] Connection to the new standby restored!\n&#x5B;W000 2021-04-25T06:23:25.599-03:00] Try to connect to the primary cortexdr.\n&#x5B;W000 2021-04-25T06:23:26.603-03:00] Connection to the primary restored!\n&#x5B;W000 2021-04-25T06:23:27.604-03:00] Wait for new primary to be ready to reinstate.\n&#x5B;W000 2021-04-25T06:23:28.604-03:00] New primary is now ready to reinstate.\n&#x5B;W000 2021-04-25T06:23:28.604-03:00] Issuing REINSTATE command.\n \n2021-04-25T06:23:28.605-03:00\nInitiating reinstatement for database &quot;cortex&quot;...\nReinstating database &quot;cortex&quot;, please wait...\n&#x5B;W000 2021-04-25T06:24:16.671-03:00] The standby cortex is ready to be a FSFO target\nReinstatement of database &quot;cortex&quot; succeeded\n2021-04-25T06:24:50.108-03:00\n&#x5B;W000 2021-04-25T06:24:50.713-03:00] Successfully reinstated database cortex.\n<\/pre><\/div>\n\n\n<p>Configura\u00e7\u00e3o do Data Guard atualizada:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@fornix1 ~]$ dgmgrl sys\/oracle@CORTEX\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Apr 25 06:26:11 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nWelcome to DGMGRL, type &quot;help&quot; for information.\nConnected to &quot;cortex&quot;\nConnected as SYSDBA.\nDGMGRL&gt; SHOW CONFIGURATION;\n \nConfiguration - cortex\n \n  Protection Mode: MaxPerformance\n  Members:\n  cortexdr - Primary database\n    cortex   - (*) Physical standby database\n \nFast-Start Failover: Enabled in Potential Data Loss Mode\n \nConfiguration Status:\nSUCCESS   (status updated 47 seconds ago)\n<\/pre><\/div>\n\n\n<p>Realizando um switchover para o prim\u00e1rio original:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@fornix1 ~]$ dgmgrl sys\/oracle@CORTEXDR\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Apr 25 06:27:43 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nWelcome to DGMGRL, type &quot;help&quot; for information.\nConnected to &quot;CORTEXDR&quot;\nConnected as SYSDBA.\nDGMGRL&gt; SWITCHOVER TO CORTEX;\nPerforming switchover NOW, please wait...\nOperation requires a connection to database &quot;cortex&quot;\nConnecting ...\nConnected to &quot;cortex&quot;\nConnected as SYSDBA.\nNew primary database &quot;cortex&quot; is opening...\nOracle Clusterware is restarting database &quot;cortexdr&quot; ...\nConnected to an idle instance.\nConnected to an idle instance.\nConnected to &quot;cortexDR&quot;\nConnected to &quot;cortexDR&quot;\nSwitchover succeeded, new primary is &quot;cortex&quot;\nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Opera\u00e7\u00e3o pela perspectiva do Observer:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n2021-04-25T06:24:50.108-03:00\n&#x5B;W000 2021-04-25T06:24:50.713-03:00] Successfully reinstated database cortex.\n&#x5B;W000 2021-04-25T06:28:09.118-03:00] Primary database has changed to cortex.\n&#x5B;W000 2021-04-25T06:28:09.121-03:00] Try to connect to the primary.\n&#x5B;W000 2021-04-25T06:28:09.121-03:00] Try to connect to the primary cortex.\n&#x5B;W000 2021-04-25T06:28:09.642-03:00] Connection to the primary restored!\n&#x5B;W000 2021-04-25T06:28:10.643-03:00] Disconnecting from database cortex.\n&#x5B;W000 2021-04-25T06:28:27.249-03:00] Standby database has changed to cortexdr.\n&#x5B;W000 2021-04-25T06:28:27.250-03:00] Try to connect to the primary.\n&#x5B;W000 2021-04-25T06:28:27.250-03:00] Try to connect to the primary cortex.\n&#x5B;W000 2021-04-25T06:28:28.910-03:00] Connection to the primary restored!\n&#x5B;W000 2021-04-25T06:28:30.911-03:00] Disconnecting from database cortex.\n&#x5B;W000 2021-04-25T06:28:54.953-03:00] The standby cortexdr is ready to be a FSFO target\n<\/pre><\/div>\n\n\n<p>Nova configura\u00e7\u00e3o do Data Guard:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@fornix1 ~]$ dgmgrl sys\/oracle@CORTEX\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Apr 25 06:30:01 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nWelcome to DGMGRL, type &quot;help&quot; for information.\nConnected to &quot;cortex&quot;\nConnected as SYSDBA.\nDGMGRL&gt; SHOW CONFIGURATION;\n \nConfiguration - cortex\n \n  Protection Mode: MaxPerformance\n  Members:\n  cortex   - Primary database\n    cortexdr - (*) Physical standby database\n \nFast-Start Failover: Enabled in Potential Data Loss Mode\n \nConfiguration Status:\nSUCCESS   (status updated 25 seconds ago)\n<\/pre><\/div>\n\n\n<p>Para parar o Observer:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@fornix1 ~]$ dgmgrl sys\/oracle@CORTEXDR\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Apr 25 06:31:07 2021\nVersion 19.3.0.0.0\n \nCopyright (c) 1982, 2019, Oracle and\/or its affiliates.  All rights reserved.\n \nWelcome to DGMGRL, type &quot;help&quot; for information.\nConnected to &quot;cortexDR&quot;\nConnected as SYSDBA.\nDGMGRL&gt; STOP OBSERVER;\nObserver stopped.\nDGMGRL&gt;\n<\/pre><\/div>\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;W000 2021-04-25T06:28:28.910-03:00] Connection to the primary restored!\n&#x5B;W000 2021-04-25T06:28:30.911-03:00] Disconnecting from database cortex.\n&#x5B;W000 2021-04-25T06:28:54.953-03:00] The standby cortexdr is ready to be a FSFO target\n2021-04-25T06:31:16.233-03:00\nObserver &#039;fornix2&#039; stopped\n&#x5B;oracle@fornix2 trace]$\n<\/pre><\/div>\n\n\n<p>Por fim, para desabitilarmos o recurso do FSFO:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nDGMGRL&gt; DISABLE FAST_START FAILOVER;\nDisabled.\n<\/pre><\/div>\n\n\n<p>Obs: Este procedimento foi criado pelo senhor Ahmed Baraka (www.ahmedbaraka.com) e foi apenas reproduzido por mim em um laborat\u00f3rio pessoal para fins de aprendizado.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Nos artigos anteriores, pudemos explorar um pouco sobre a opera\u00e7\u00e3o de Failover em um ambiente Data Guard, de forma manual. Para facilitar o trabalho e potencializar os recursos de alta disponibilidade, a Oracle disponibiliza o FSFO, que em resumo seria a op\u00e7\u00e3o de Failover de forma autom\u00e1tica, respeitando regras e par\u00e2metros definidos de forma premeditada [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-4061","post","type-post","status-publish","format-standard","hentry","category-high-availability"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/4061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=4061"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/4061\/revisions"}],"predecessor-version":[{"id":9159,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/4061\/revisions\/9159"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=4061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=4061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=4061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}