{"id":5194,"date":"2021-06-04T07:18:22","date_gmt":"2021-06-04T07:18:22","guid":{"rendered":"https:\/\/swiv.com.br\/converting-the-physical-standby-database-to-snapshot-database-using-data-broker\/"},"modified":"2026-05-27T20:02:31","modified_gmt":"2026-05-27T19:02:31","slug":"converting-the-physical-standby-database-to-snapshot-database-using-data-broker","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/06\/04\/converting-the-physical-standby-database-to-snapshot-database-using-data-broker\/","title":{"rendered":"Converting the Physical Standby Database to Snapshot Database (using Data Broker)"},"content":{"rendered":"\n<p>Neste artigo, vamos explorar a convers\u00e3o de um Standby para Snapshot Database, usando o utilit\u00e1rio Data DGMGRL (Data Broker).<\/p>\n\n\n\n<p>Analisando condi\u00e7\u00e3o atual do ambiente:<\/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\/CORTEX\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Jun 4 04:00:17 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 61 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 0 seconds ago)\n  Apply Lag:          0 seconds (computed 0 seconds ago)\n  Average Apply Rate: 8.00 KByte\/s\n  Real Time Query:    OFF\n  Instance(s):\n    CORTEXDR\n \nDatabase Status:\nSUCCESS\n<\/pre><\/div>\n\n\n<p>Podemos parar o processo de Redo Apply no 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 ~]$ dgmgrl sys\/CORTEXDR\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Jun 4 04:05:34 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-OFF;\nSucceeded.\nDGMGRL&gt; SHOW DATABASE CORTEXDR;\n \nDatabase - cortexdr\n \n  Role:               PHYSICAL STANDBY\n  Intended State:     APPLY-OFF\n  Transport Lag:      0 seconds (computed 1 second ago)\n  Apply Lag:          0 seconds (computed 1 second ago)\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>Como nosso banco Standby est\u00e1 em MOUNT, podemos disparar o comando de convers\u00e3o para Snapshot:<\/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; CONVERT DATABASE &#039;cortexdr&#039; TO SNAPSHOT STANDBY;\nConverting database &quot;cortexdr&quot; to a Snapshot Standby database, please wait...\nDatabase &quot;cortexdr&quot; converted successfully\n<\/pre><\/div>\n\n\n<p>Validando nova condi\u00e7\u00e3o do banco:<\/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 Fri Jun 4 04:08:10 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 DATABASE_ROLE, OPEN_MODE, FLASHBACK_ON FROM V$DATABASE;\n \nDATABASE_ROLE    OPEN_MODE            FLASHBACK_ON\n---------------- -------------------- ------------------\nSNAPSHOT STANDBY READ WRITE           YES\n<\/pre><\/div>\n\n\n<p>Realizando opera\u00e7\u00f5es de DDL e DML no Snapshot Database:<\/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; CREATE TABLE SOE.TESTE2 (DESCRICAO VARCHAR2(50));\n \nTable created.\n \nSQL&gt; INSERT INTO SOE.TESTE2 (DESCRICAO) VALUES (&#039;SNAP DATABASE&#039;);\n \n1 row created.\n \nSQL&gt; COMMIT;\n \nCommit complete.\n \nSQL&gt; SELECT * FROM SOE.TESTE2;\n \nDESCRICAO\n--------------------------------------------------\nSNAP DATABASE\n<\/pre><\/div>\n\n\n<p>Podemos observar que os Redos provenientes do Primary ainda s\u00e3o endere\u00e7ados para o Standby, mas n\u00e3o s\u00e3o aplicados:<\/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 Fri Jun 4 04:11:20 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; ALTER SYSTEM SWITCH LOGFILE ;\n \nSystem altered.\n \nSQL&gt; SELECT THREAD#, MAX(SEQUENCE#) FROM V$LOG GROUP BY THREAD# ;\n \n   THREAD# MAX(SEQUENCE#)\n---------- --------------\n         1             77\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;oracle@fornix2 ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Fri Jun 4 04:11:57 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 PROCESS,STATUS,SEQUENCE# FROM V$MANAGED_STANDBY;\n \nPROCESS   STATUS        SEQUENCE#\n--------- ------------ ----------\nDGRD      ALLOCATED             0\nARCH      CONNECTED             0\nDGRD      ALLOCATED             0\nARCH      CONNECTED             0\nARCH      CLOSING              75\nARCH      CLOSING              76\nDGRD      ALLOCATED             0\nRFS       IDLE                  0\nRFS       IDLE                 77\nRFS       IDLE                  0\n \n10 rows selected.\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 a convers\u00e3o de um Standby para Snapshot Database, usando o utilit\u00e1rio Data DGMGRL (Data Broker). Analisando condi\u00e7\u00e3o atual do ambiente: Podemos parar o processo de Redo Apply no Standby: Como nosso banco Standby est\u00e1 em MOUNT, podemos disparar o comando de convers\u00e3o para Snapshot: Validando nova condi\u00e7\u00e3o do banco: Realizando opera\u00e7\u00f5es [&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-5194","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\/5194","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=5194"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5194\/revisions"}],"predecessor-version":[{"id":9111,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5194\/revisions\/9111"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=5194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=5194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=5194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}