{"id":5204,"date":"2021-06-04T07:36:23","date_gmt":"2021-06-04T07:36:23","guid":{"rendered":"https:\/\/swiv.com.br\/converting-a-snapshot-database-into-a-physical-standby-database-using-data-broker\/"},"modified":"2026-05-27T20:02:31","modified_gmt":"2026-05-27T19:02:31","slug":"converting-a-snapshot-database-into-a-physical-standby-database-using-data-broker","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/06\/04\/converting-a-snapshot-database-into-a-physical-standby-database-using-data-broker\/","title":{"rendered":"Converting a Snapshot Database into a Physical Standby Database (using Data Broker)"},"content":{"rendered":"\n<p>A convers\u00e3o em quest\u00e3o \u00e9 extremamente simples, uma vez que todos os Redos enviados pelo primary estejam j\u00e1 no ambiente Standby. Assim, durante o processo, o GRP ser\u00e1 usado e os Redos, aplicados.<\/p>\n\n\n\n<p>Validando ambientes que ser\u00e3o usados neste artigo:<\/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:20:57 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 - Snapshot standby database\n \nFast-Start Failover:  Disabled\n \nConfiguration Status:\nSUCCESS   (status updated 60 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:               SNAPSHOT STANDBY\n  Transport Lag:      0 seconds (computed 1 second ago)\n  Apply Lag:          15 minutes 39 seconds (computed 1 second ago)\n  Instance(s):\n    CORTEXDR\n \nDatabase Status:\nSUCCESS\n<\/pre><\/div>\n\n\n<p>Montando o 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=\"\">\n&#x5B;oracle@fornix2 ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Fri Jun 4 04:22:27 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; SHU IMMEDIATE;\nDatabase closed.\nDatabase dismounted.\nORACLE instance shut down.\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.\n<\/pre><\/div>\n\n\n<p>Emitindo comando para a convers\u00e3o:<\/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 as sysdba\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Fri Jun 4 04:25:39 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; CONVERT DATABASE &#039;cortexDR&#039; TO PHYSICAL STANDBY;\nConverting database &quot;cortexDR&quot; to a Physical Standby database, please wait...\nOperation requires a connection to database &quot;cortex&quot;\nConnecting ...\nConnected to &quot;cortex&quot;\nConnected as SYSDBA.\nDatabase &quot;cortexDR&quot; converted successfully\n<\/pre><\/div>\n\n\n<p>O alert nos reporta informa\u00e7\u00f5es interessantes sobre o processo em si:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n2021-06-04 04:25:54.706000 -03:00\nalter database convert to physical standby\nALTER DATABASE CONVERT TO PHYSICAL STANDBY (CORTEXDR)\nRSM0 (PID:5835): Killing 2 processes (PIDS:5766,5770) (all RFS) in order to disallow current and future RFS connections. Requested by OS process 5835\nProcess termination requested for pid 5766 &#x5B;source = rdbms], &#x5B;info = 2] &#x5B;request issued by pid: 5835, uid: 54321]\nProcess termination requested for pid 5770 &#x5B;source = rdbms], &#x5B;info = 2] &#x5B;request issued by pid: 5835, uid: 54321]\n2021-06-04 04:25:57.083000 -03:00\nFlashback Restore Start\n2021-06-04 04:25:58.266000 -03:00\nFlashback Restore Complete\nDrop guaranteed restore point\nGuaranteed restore point  dropped\nRSM0 (PID:5835): Database role cleared from SNAPSHOT STANDBY &#x5B;kcvs.c:8837]\nClearing standby activation ID 584229166 (0x22d2a12e)\nThe primary database controlfile was created using the\n&#039;MAXLOGFILES 16&#039; clause.\nThere is space for up to 13 standby redo logfiles\nUse the following SQL commands on the standby database to create\nstandby redo logfiles that match the primary database:\nALTER DATABASE ADD STANDBY LOGFILE &#039;srl1.f&#039; SIZE 209715200;\nALTER DATABASE ADD STANDBY LOGFILE &#039;srl2.f&#039; SIZE 209715200;\nALTER DATABASE ADD STANDBY LOGFILE &#039;srl3.f&#039; SIZE 209715200;\nALTER DATABASE ADD STANDBY LOGFILE &#039;srl4.f&#039; SIZE 209715200;\nRSM0 (PID:5835): Database role changed from PRIMARY to PHYSICAL STANDBY &#x5B;kcvs.c:8842]\nRSM0 (PID:5835): Waiting for all non-current ORLs to be archived\nRSM0 (PID:5835): All non-current ORLs have been archived\nRSM0 (PID:5835): Clearing online redo logfile 1 +DG_FRA\/CORTEXDR\/ONLINELOG\/group_1.261.1066479861\nRSM0 (PID:5835): Clearing online redo logfile 2 +DG_FRA\/CORTEXDR\/ONLINELOG\/group_2.262.1066479871\nClearing online log 1 of thread 1 sequence number 1\nClearing online log 2 of thread 1 sequence number 2\n2021-06-04 04:26:18.290000 -03:00\nRSM0 (PID:5835): Clearing online redo logfile 1 complete\nRSM0 (PID:5835): Clearing online redo logfile 2 complete\nRSM0 (PID:5835): RT: Role transition work is not done\nRSM0 (PID:5835): Redo network throttle feature is disabled at mount time\nPhysical Standby Database mounted.\nIn-memory operation on ADG is currently only supported on Engineered systems and PaaS.\ninmemory_adg_enabled is turned off automatically.\nPlease contact our support team for EXADATA solutions\nCONVERT TO PHYSICAL STANDBY: Complete - Database mounted as physical standby\nCompleted: alter database convert to physical standby\n<\/pre><\/div>\n\n\n<p>Valida\u00e7\u00e3o condi\u00e7\u00e3o 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=\"\">\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 60 seconds ago)\n<\/pre><\/div>\n\n\n<p>No primary, gerando um novo Redo e checando a sua sequence:<\/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 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; 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             80\n<\/pre><\/div>\n\n\n<p>No standby, j\u00e1 \u00e9 poss\u00edvel ver o reflexo da convers\u00e3o:<\/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 PROCESS,STATUS,SEQUENCE# FROM V$MANAGED_STANDBY;\n \nPROCESS   STATUS        SEQUENCE#\n--------- ------------ ----------\nARCH      CLOSING              78\nDGRD      ALLOCATED             0\nDGRD      ALLOCATED             0\nARCH      CLOSING              77\nARCH      CONNECTED             0\nARCH      CLOSING              79\nMRP0      APPLYING_LOG         80\nRFS       IDLE                  0\nRFS       IDLE                 80\n \n9 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>A convers\u00e3o em quest\u00e3o \u00e9 extremamente simples, uma vez que todos os Redos enviados pelo primary estejam j\u00e1 no ambiente Standby. Assim, durante o processo, o GRP ser\u00e1 usado e os Redos, aplicados. Validando ambientes que ser\u00e3o usados neste artigo: Montando o Snapshot Database: Emitindo comando para a convers\u00e3o: O alert nos reporta informa\u00e7\u00f5es interessantes [&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-5204","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\/5204","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=5204"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5204\/revisions"}],"predecessor-version":[{"id":9110,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5204\/revisions\/9110"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=5204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=5204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=5204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}