{"id":5148,"date":"2021-06-02T09:38:37","date_gmt":"2021-06-02T09:38:37","guid":{"rendered":"https:\/\/swiv.com.br\/enabling-active-data-guard-option-using-data-broker\/"},"modified":"2026-05-27T20:02:31","modified_gmt":"2026-05-27T19:02:31","slug":"enabling-active-data-guard-option-using-data-broker","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/06\/02\/enabling-active-data-guard-option-using-data-broker\/","title":{"rendered":"Enabling Active Data Guard Option (using Data Broker)"},"content":{"rendered":"\n<p>Neste artigo, vamos explorar como habilitar o Active Data Guard usando o utilit\u00e1rio DGMGRL (Data Broker). Lembrando que utilizar este recurso exige uma licen\u00e7a espec\u00edfica que deve ser considerada antes.<\/p>\n\n\n\n<p>Checando os bancos de dados envolvidos:<\/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 Wed Jun 2 06:26:32 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 10 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-OFF\n  Transport Lag:      0 seconds (computed 0 seconds ago)\n  Apply Lag:          (unknown)\n  Average Apply Rate: (unknown)\n  Real Time Query:    OFF\n  Instance(s):\n    CORTEXDR\n \nDatabase Status:\nSUCCESS\n<\/pre><\/div>\n\n\n<p>Considerando que o banco Standby est\u00e1 em MOUNT, e que o processo de Redo Apply est\u00e1 parado, podemos abrir o banco de dados standby:<\/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 ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Wed Jun 2 06:28:13 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 NAME,OPEN_MODE,DATABASE_ROLE FROM V$DATABASE;\n \nNAME      OPEN_MODE            DATABASE_ROLE\n--------- -------------------- ----------------\nCORTEX    MOUNTED              PHYSICAL STANDBY\n \nSQL&gt; ALTER DATABASE OPEN;\n \nDatabase altered.\n<\/pre><\/div>\n\n\n<p>Iniciando processo de Redo Apply:<\/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 ~]$ dgmgrl sys\/oracle@CORTEXDR\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Wed Jun 2 06:30:10 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; EDIT DATABASE CORTEXDR SET STATE=APPLY-ON;\n<\/pre><\/div>\n\n\n<p>Para realizar um teste, vamos criar uma tabela com 1 registro 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=\"\">\n&#x5B;oracle@fornix1 ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Wed Jun 2 06:33:29 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; CREATE TABLE SOE.TESTE1 (DESCRICAO VARCHAR2(20));\n \nTable created.\n \nSQL&gt; INSERT INTO SOE.TESTE1 (DESCRICAO) VALUES (&#039;ACTIVE DATA GUARD&#039;);\n \n1 row created.\n \nSQL&gt; COMMIT;\n \nCommit complete.\n<\/pre><\/div>\n\n\n<p>No standby, podemos validar que n\u00e3o h\u00e1 Apply Lag, o que nos permite j\u00e1 consultar a tabela nova:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSQL&gt; SELECT value &quot;Lag&quot;, datum_time &quot;Received Time&quot;, Time_Computed &quot;Time Computed &quot; FROM V$DATAGUARD_STATS WHERE name like &#039;apply lag&#039;;\n \nLag\n----------------------------------------------------------------\nReceived Time                  Time Computed\n------------------------------ ------------------------------\n+00 00:00:00\n06\/02\/2021 06:36:26            06\/02\/2021 06:36:26\n \n \nSQL&gt; SELECT * FROM SOE.TESTE1;\n \nDESCRICAO\n--------------------\nACTIVE DATA GUARD\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>Neste artigo, vamos explorar como habilitar o Active Data Guard usando o utilit\u00e1rio DGMGRL (Data Broker). Lembrando que utilizar este recurso exige uma licen\u00e7a espec\u00edfica que deve ser considerada antes. Checando os bancos de dados envolvidos: Considerando que o banco Standby est\u00e1 em MOUNT, e que o processo de Redo Apply est\u00e1 parado, podemos abrir [&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-5148","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\/5148","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=5148"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5148\/revisions"}],"predecessor-version":[{"id":9115,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5148\/revisions\/9115"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=5148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=5148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=5148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}