{"id":2974,"date":"2021-03-21T22:52:12","date_gmt":"2021-03-21T22:52:12","guid":{"rendered":"https:\/\/swiv.com.br\/creating-a-data-broker-configuration\/"},"modified":"2026-05-27T20:02:50","modified_gmt":"2026-05-27T19:02:50","slug":"creating-a-data-broker-configuration","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/03\/21\/creating-a-data-broker-configuration\/","title":{"rendered":"Creating a Data Broker Configuration"},"content":{"rendered":"\n<p>Realizando um teste de conex\u00e3o do ambiente primary para o standby e o inverso 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=\"\">\n&#x5B;oracle@fornix1 admin]$ sqlplus sys\/oracle@CORTEXDR as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Sun Mar 21 18:21:03 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;\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 sys\/oracle@CORTEX as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Sun Mar 21 18:21:54 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;\n<\/pre><\/div>\n\n\n<p>A configura\u00e7\u00e3o do Broker pressup\u00f5e a exist\u00eancia de um arquivo (multiplexado) com extens\u00e3o &#8220;.dat&#8221;. Desse modo, farei a cria\u00e7\u00e3o do diret\u00f3rio dentro do ASM para abrig\u00e1-lo (tamb\u00e9m \u00e9 suportado a cria\u00e7\u00e3o em FS):<\/p>\n\n\n\n<p>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;grid@fornix1 ~]$ asmcmd lsdg\nState    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name\nMOUNTED  EXTERN  N         512             512   4096  4194304     30716    27216                0           27216              0             N  DG_DATA\/\nMOUNTED  EXTERN  N         512             512   4096  4194304     20476    18480                0           18480              0             N  DG_FRA\/\nMOUNTED  EXTERN  N         512             512   4096  4194304     10236    10136                0           10136              0             N  DG_GRID\/\nMOUNTED  EXTERN  N         512             512   4096  4194304     10236     8980                0            8980              0             N  DG_RECO\/\n&#x5B;grid@fornix1 ~]$ asmcmd\nASMCMD&gt; cd DG_DATA\/CORTEX\nASMCMD&gt; mkdir BROKER\nASMCMD&gt; cd +DG_FRA\/CORTEX\nASMCMD&gt; mkdir BROKER\n<\/pre><\/div>\n\n\n<p>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;grid@fornix2 admin]$ asmcmd lsdg\nState    Type    Rebal  Sector  Logical_Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name\nMOUNTED  EXTERN  N         512             512   4096  4194304     30716    27268                0           27268              0             N  DG_DATA\/\nMOUNTED  EXTERN  N         512             512   4096  4194304     20476    17892                0           17892              0             N  DG_FRA\/\nMOUNTED  EXTERN  N         512             512   4096  4194304     10236    10136                0           10136              0             N  DG_GRID\/\nMOUNTED  EXTERN  N         512             512   4096  4194304     10236     9052                0            9052              0             N  DG_RECO\/\n&#x5B;grid@fornix2 admin]$ asmcmd\nASMCMD&gt; cd DG_DATA\/CORTEXDR\nASMCMD&gt; mkdir BROKER\nASMCMD&gt; cd +DG_FRA\/CORTEXDR\nASMCMD&gt; mkdir BROKER\n<\/pre><\/div>\n\n\n<p>Definindo nos 2 ambientes os arquivos de configura\u00e7\u00e3o do Broker:<\/p>\n\n\n\n<p>Primary:<\/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; ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1=&#039;+DG_DATA\/CORTEX\/BROKER\/dr1CORTEX.dat&#039;;\n \nSystem altered.\n \nSQL&gt; ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2=&#039;+DG_FRA\/CORTEX\/BROKER\/dr2CORTEX.dat&#039;;\n \nSystem altered.\n<\/pre><\/div>\n\n\n<p>Standby:<\/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; ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1=&#039;+DG_DATA\/CORTEXDR\/BROKER\/dr1CORTEXDR.dat&#039;;\n \nSystem altered.\n \nSQL&gt; ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2=&#039;+DG_FRA\/CORTEXDR\/BROKER\/dr2CORTEXDR.dat&#039;;\n \nSystem altered.\n<\/pre><\/div>\n\n\n<p>O listener de cada ambiente deve ter um registro de servi\u00e7o est\u00e1tico, seguindo o formato DB_UNIQUE_NAME_DGMGRL.domain. Fazendo configura\u00e7\u00e3o no primary e depois realizar restart do listener:<\/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;grid@fornix1 admin]$ cd $ORACLE_HOME\/network\/admin\n&#x5B;grid@fornix1 admin]$ cat listener.ora\n#Backup file is  \/grid\/19.3.0\/base\/crsdata\/fornix1\/output\/listener.ora.bak.fornix1.grid line added by Agent\n#LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))           # line added by Agent\nENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent\nVALID_NODE_CHECKING_REGISTRATION_LISTENER=ON            # line added by Agent\n \nLISTENER =\n  (DESCRIPTION_LIST =\n   (DESCRIPTION =\n    (ADDRESS = (PROTOCOL = TCP) (HOST = fornix1.localdomain) (PORT = 1521))\n     (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1522))\n    )\n   )\n \nSID_LIST_LISTENER =\n (SID_LIST =\n  (SID_DESC =\n        (GLOBAL_DBNAME = CORTEX_DGMGRL.localdomain)\n        (ORACLE_HOME = \/grid\/19.3.0\/product)\n        (SID_NAME = CORTEX)\n   )\n)\n&#x5B;grid@fornix1 admin]$ lsnrctl stop LISTENER\n \nLSNRCTL for Linux: Version 19.0.0.0.0 - Production on 21-MAR-2021 19:08:34\n \nCopyright (c) 1991, 2019, Oracle.  All rights reserved.\n \nConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fornix1.localdomain)(PORT=1521)))\nThe command completed successfully\n&#x5B;grid@fornix1 admin]$ lsnrctl start LISTENER\n \nLSNRCTL for Linux: Version 19.0.0.0.0 - Production on 21-MAR-2021 19:08:38\n \nCopyright (c) 1991, 2019, Oracle.  All rights reserved.\n \nStarting \/grid\/19.3.0\/product\/bin\/tnslsnr: please wait...\n \nTNSLSNR for Linux: Version 19.0.0.0.0 - Production\nSystem parameter file is \/grid\/19.3.0\/product\/network\/admin\/listener.ora\nLog messages written to \/grid\/19.3.0\/base\/diag\/tnslsnr\/fornix1\/listener\/alert\/log.xml\nListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fornix1.localdomain)(PORT=1521)))\nListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))\n \nConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fornix1.localdomain)(PORT=1521)))\nSTATUS of the LISTENER\n------------------------\nAlias                     LISTENER\nVersion                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production\nStart Date                21-MAR-2021 19:08:38\nUptime                    0 days 0 hr. 0 min. 0 sec\nTrace Level               off\nSecurity                  ON: Local OS Authentication\nSNMP                      OFF\nListener Parameter File   \/grid\/19.3.0\/product\/network\/admin\/listener.ora\nListener Log File         \/grid\/19.3.0\/base\/diag\/tnslsnr\/fornix1\/listener\/alert\/log.xml\nListening Endpoints Summary...\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fornix1.localdomain)(PORT=1521)))\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))\nServices Summary...\nService &quot;CORTEX_DGMGRL.localdomain&quot; has 1 instance(s).\n  Instance &quot;CORTEX&quot;, status UNKNOWN, has 1 handler(s) for this service...\nThe command completed successfully\n&#x5B;grid@fornix1 admin]$\n<\/pre><\/div>\n\n\n<p>No standby eu j\u00e1 havia feito um registro est\u00e1tico devido um duplicate, ent\u00e3o apenas adicionei novas informa\u00e7\u00f5es:<\/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;grid@fornix2 admin]$ cat listener.ora\n#Backup file is  \/grid\/19.3.0\/base\/crsdata\/fornix2\/output\/listener.ora.bak.fornix2.grid line added by Agent\nLISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER))))            # line added by Agent\nENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON              # line added by Agent\nVALID_NODE_CHECKING_REGISTRATION_LISTENER=ON            # line added by Agent\n \nLISTENERDR =\n  (DESCRIPTION_LIST =\n   (DESCRIPTION =\n    (ADDRESS = (PROTOCOL = TCP) (HOST = fornix2.localdomain) (PORT = 1522))\n     (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1522))\n    )\n   )\n \nSID_LIST_LISTENERDR=\n   (SID_LIST=\n     (SID_DESC=\n        (GLOBAL_DBNAME=CORTEXDR.localdomain)\n        (SID_NAME=CORTEXDR)\n        (ORACLE_HOME=\/oracle\/19.3.0\/product)\n     )\n    ( SID_DESC=\n        (GLOBAL_DBNAME=CORTEXDR_DGMGRL.localdomain)\n        (ORACLE_HOME=\/grid\/19.3.0\/product)\n        (SID_NAME=CORTEXDR)\n     )\n   )\n&#x5B;grid@fornix2 admin]$ lsnrctl stop LISTENERDR\n \nLSNRCTL for Linux: Version 19.0.0.0.0 - Production on 21-MAR-2021 19:09:26\n \nCopyright (c) 1991, 2019, Oracle.  All rights reserved.\n \nConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fornix2.localdomain)(PORT=1522)))\nThe command completed successfully\n&#x5B;grid@fornix2 admin]$ lsnrctl start LISTENERDR\n \nLSNRCTL for Linux: Version 19.0.0.0.0 - Production on 21-MAR-2021 19:09:31\n \nCopyright (c) 1991, 2019, Oracle.  All rights reserved.\n \nStarting \/grid\/19.3.0\/product\/bin\/tnslsnr: please wait...\n \nTNSLSNR for Linux: Version 19.0.0.0.0 - Production\nSystem parameter file is \/grid\/19.3.0\/product\/network\/admin\/listener.ora\nLog messages written to \/grid\/19.3.0\/base\/diag\/tnslsnr\/fornix2\/listenerdr\/alert\/log.xml\nListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fornix2.localdomain)(PORT=1522)))\nListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))\n \nConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fornix2.localdomain)(PORT=1522)))\nSTATUS of the LISTENER\n------------------------\nAlias                     LISTENERDR\nVersion                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production\nStart Date                21-MAR-2021 19:09:31\nUptime                    0 days 0 hr. 0 min. 0 sec\nTrace Level               off\nSecurity                  ON: Local OS Authentication\nSNMP                      OFF\nListener Parameter File   \/grid\/19.3.0\/product\/network\/admin\/listener.ora\nListener Log File         \/grid\/19.3.0\/base\/diag\/tnslsnr\/fornix2\/listenerdr\/alert\/log.xml\nListening Endpoints Summary...\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fornix2.localdomain)(PORT=1522)))\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))\nServices Summary...\nService &quot;CORTEXDR.localdomain&quot; has 1 instance(s).\n  Instance &quot;CORTEXDR&quot;, status UNKNOWN, has 1 handler(s) for this service...\nService &quot;CORTEXDR_DGMGRL.localdomain&quot; has 1 instance(s).\n  Instance &quot;CORTEXDR&quot;, status UNKNOWN, has 1 handler(s) for this service...\nThe command completed successfully\n&#x5B;grid@fornix2 admin]$\n<\/pre><\/div>\n\n\n<p>Definindo o par\u00e2metro respons\u00e1vel por inicializar os processos do Broker. 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=\"\">\nSQL&gt; SHOW PARAMETER DG_BROKER_START\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\ndg_broker_start                      boolean     FALSE\nSQL&gt; ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;\n \nSystem altered.\n<\/pre><\/div>\n\n\n<p>Standby:<\/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; SHOW PARAMETER DG_BROKER_START\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\ndg_broker_start                      boolean     FALSE\nSQL&gt; ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;\n \nSystem altered.\n<\/pre><\/div>\n\n\n<p>A partir daqui, j\u00e1 \u00e9 poss\u00edvel visualizar no primary o &#8220;alert.log&#8221; do Broker, que se chama &#8220;drcDB_UNIQUE_NAME&#8221;:<\/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 trace]$ pwd\n\/oracle\/19.3.0\/base\/diag\/rdbms\/cortex\/cortex\/trace\n&#x5B;oracle@fornix1 trace]$ tail -f drccortex.log\n2021-03-21T19:15:29.335-03:00                      INSV: Uploading persisted FSFO state:\n2021-03-21T19:15:29.335-03:00                             flags=0x00000000, version=0, pstseq=0, target=0, obid=0\n2021-03-21T19:15:29.335-03:00                             envsn=0, ackseq=0, new_target=255, new_obid=0\n2021-03-21T19:15:29.335-03:00                           pmyshut=0, aft=0, laglim=0, obslim=0\n2021-03-21T19:15:29.335-03:00                      INSV: INSV is ready\n2021-03-21T19:15:30.351-03:00                      DMON: rfm_get_chief_lock() called for CTL_BOOTSTRAP, reason BOOTSTRAP, called from rfm_dmon_wakeup_fn\n2021-03-21T19:15:30.351-03:00 7fffffff           0 DMON: start task execution: broker initialization\n2021-03-21T19:15:30.351-03:00                      DMON: Boot configuration (0.0.0), loading from &quot;+DG_DATA\/CORTEX\/BROKER\/dr1CORTEX.dat&quot;\n2021-03-21T19:15:30.355-03:00                      DMON: Configuration does not exist, Data Guard broker ready\n2021-03-21T19:15:30.355-03:00 7fffffff           0 DMON: rfm_release_chief_lock() called for CTL_BOOTSTRAP, called from rfm_bootstrap_config\n<\/pre><\/div>\n\n\n<p>Com a configura\u00e7\u00e3o do Broker, as atividades de administra\u00e7\u00e3o do Dataguard s\u00e3o delegadas ao mesmo, e isso inclui os par\u00e2metros de banco de dados. Desse modo, vou redefinir o LOG_ARCHIVE_DEST_2, que era onde eu havia feito a configura\u00e7\u00e3o do DG:<\/p>\n\n\n\n<p>Primary:<\/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; SHO PARAMETER LOG_ARCHIVE_DEST_2;\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nlog_archive_dest_2                   string      SERVICE=cortexDR ASYNC VALID_F\n                                                 OR=(ONLINE_LOGFILES,PRIMARY_RO\n                                                 LE) DB_UNIQUE_NAME=cortexDR\nlog_archive_dest_20                  string\nlog_archive_dest_21                  string\nlog_archive_dest_22                  string\nlog_archive_dest_23                  string\nlog_archive_dest_24                  string\nlog_archive_dest_25                  string\nlog_archive_dest_26                  string\nlog_archive_dest_27                  string\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nlog_archive_dest_28                  string\nlog_archive_dest_29                  string\nSQL&gt; alter system set LOG_ARCHIVE_DEST_2=&#039;&#039; SCOPE=BOTH;\n \nSystem altered.\n<\/pre><\/div>\n\n\n<p>Standby:<\/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; SHO PARAMETER LOG_ARCHIVE_DEST_2;\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nlog_archive_dest_2                   string      SERVICE=CORTEX ASYNC DB_UNIQUE\n                                                 _NAME=cortex VALID_FOR=(ONLINE\n                                                 _LOGFILE,PRIMARY_ROLE)\nlog_archive_dest_20                  string\nlog_archive_dest_21                  string\nlog_archive_dest_22                  string\nlog_archive_dest_23                  string\nlog_archive_dest_24                  string\nlog_archive_dest_25                  string\nlog_archive_dest_26                  string\nlog_archive_dest_27                  string\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nlog_archive_dest_28                  string\nlog_archive_dest_29                  string\nSQL&gt; alter system set LOG_ARCHIVE_DEST_2=&#039;&#039; SCOPE=BOTH;\n \nSystem altered.\n<\/pre><\/div>\n\n\n<p>Logando no primary utilizando o utilit\u00e1rio DGMGRL:<\/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 trace]$ dgmgrl sys\/oracle@CORTEX\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Mar 21 19:24: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;\n<\/pre><\/div>\n\n\n<p>Definindo o banco CORTEX como 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; CREATE CONFIGURATION CORTEX AS PRIMARY DATABASE IS CORTEX CONNECT IDENTIFIER IS CORTEX;\nConfiguration &quot;cortex&quot; created with primary database &quot;cortex&quot;\nDGMGRL&gt; SHOW CONFIGURATION;\n \nConfiguration - cortex\n \n  Protection Mode: MaxPerformance\n  Members:\n  cortex - Primary database\n \nFast-Start Failover:  Disabled\n \nConfiguration Status:\nDISABLED\n \nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Nesta etapa \u00e9 poss\u00edvel ver que o arquivo foi criado dentro do ASM conforme definido via par\u00e2metro:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nASMCMD&gt; pwd\n+DG_DATA\/CORTEX\/BROKER\nASMCMD&gt; ls\ndr1cortex.dat\nASMCMD&gt; !hostname\nfornix1\n<\/pre><\/div>\n\n\n<p>Ainda logado no primary, vou adicionar o seu membro, que \u00e9 o physical standby (lembrando que isso \u00e9 poss\u00edvel por conta da string de conex\u00e3o do tnsnames.ora, que testamos no primeiro step desse artigo):<\/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; ADD DATABASE CORTEXDR AS CONNECT IDENTIFIER IS CORTEXDR;\nDatabase &quot;cortexdr&quot; added\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:\nDISABLED\n \nDGMGRL&gt;\n<\/pre><\/div>\n\n\n<p>Visualizando as propriedades definidas pelo broker:<\/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 VERBOSE CORTEXDR;\n \nDatabase - cortexdr\n \n  Role:               PHYSICAL STANDBY\n  Intended State:     OFFLINE\n  Transport Lag:      (unknown)\n  Apply Lag:          (unknown)\n  Average Apply Rate: (unknown)\n  Active Apply Rate:  (unknown)\n  Maximum Apply Rate: (unknown)\n  Real Time Query:    OFF\n  Instance(s):\n    CORTEXDR\n \n  Properties:\n    DGConnectIdentifier             = &#039;cortexdr&#039;\n    ObserverConnectIdentifier       = &#039;&#039;\n    FastStartFailoverTarget         = &#039;&#039;\n    PreferredObserverHosts          = &#039;&#039;\n    LogShipping                     = &#039;ON&#039;\n    RedoRoutes                      = &#039;&#039;\n    LogXptMode                      = &#039;ASYNC&#039;\n    DelayMins                       = &#039;0&#039;\n    Binding                         = &#039;optional&#039;\n    MaxFailure                      = &#039;0&#039;\n    ReopenSecs                      = &#039;300&#039;\n    NetTimeout                      = &#039;30&#039;\n    RedoCompression                 = &#039;DISABLE&#039;\n    PreferredApplyInstance          = &#039;&#039;\n    ApplyInstanceTimeout            = &#039;0&#039;\n    ApplyLagThreshold               = &#039;30&#039;\n    TransportLagThreshold           = &#039;30&#039;\n    TransportDisconnectedThreshold  = &#039;30&#039;\n    ApplyParallel                   = &#039;AUTO&#039;\n    ApplyInstances                  = &#039;0&#039;\n    StandbyFileManagement           = &#039;&#039;\n    ArchiveLagTarget                = &#039;0&#039;\n    LogArchiveMaxProcesses          = &#039;0&#039;\n    LogArchiveMinSucceedDest        = &#039;0&#039;\n    DataGuardSyncLatency            = &#039;0&#039;\n    LogArchiveTrace                 = &#039;0&#039;\n    LogArchiveFormat                = &#039;&#039;\n    DbFileNameConvert               = &#039;&#039;\n    LogFileNameConvert              = &#039;&#039;\n    ArchiveLocation                 = &#039;&#039;\n    AlternateLocation               = &#039;&#039;\n    StandbyArchiveLocation          = &#039;&#039;\n    StandbyAlternateLocation        = &#039;&#039;\n    InconsistentProperties          = &#039;(monitor)&#039;\n    InconsistentLogXptProps         = &#039;(monitor)&#039;\n    LogXptStatus                    = &#039;(monitor)&#039;\n    SendQEntries                    = &#039;(monitor)&#039;\n    RecvQEntries                    = &#039;(monitor)&#039;\n    HostName                        = &#039;fornix2&#039;\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;\n    TopWaitEvents                   = &#039;(monitor)&#039;\n    SidName                         = &#039;(monitor)&#039;\n \n  Log file locations:\n    (Unknown)\n \nDatabase Status:\nDISABLED - ORA-16905: The member was not enabled yet.\n<\/pre><\/div>\n\n\n<p>Habilitando configura\u00e7\u00f5es ap\u00f3s confer\u00eancia:<\/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 CONFIGURATION;\nEnabled.\n<\/pre><\/div>\n\n\n<p>J\u00e1 \u00e9 poss\u00edvel ver que o ambiente est\u00e1 devidamente configurado e em opera\u00e7\u00e3o:<\/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 VERBOSE 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: 585.00 KByte\/s\n  Active Apply Rate:  0 Byte\/s\n  Maximum Apply Rate: 0 Byte\/s\n  Real Time Query:    OFF\n  Instance(s):\n    CORTEXDR\n \n  Properties:\n    DGConnectIdentifier             = &#039;cortexdr&#039;\n    ObserverConnectIdentifier       = &#039;&#039;\n    FastStartFailoverTarget         = &#039;&#039;\n    PreferredObserverHosts          = &#039;&#039;\n    LogShipping                     = &#039;ON&#039;\n    RedoRoutes                      = &#039;&#039;\n    LogXptMode                      = &#039;ASYNC&#039;\n    DelayMins                       = &#039;0&#039;\n    Binding                         = &#039;optional&#039;\n    MaxFailure                      = &#039;0&#039;\n    ReopenSecs                      = &#039;300&#039;\n    NetTimeout                      = &#039;30&#039;\n    RedoCompression                 = &#039;DISABLE&#039;\n    PreferredApplyInstance          = &#039;&#039;\n    ApplyInstanceTimeout            = &#039;0&#039;\n    ApplyLagThreshold               = &#039;30&#039;\n    TransportLagThreshold           = &#039;30&#039;\n    TransportDisconnectedThreshold  = &#039;30&#039;\n    ApplyParallel                   = &#039;AUTO&#039;\n    ApplyInstances                  = &#039;0&#039;\n    StandbyFileManagement           = &#039;&#039;\n    ArchiveLagTarget                = &#039;0&#039;\n    LogArchiveMaxProcesses          = &#039;0&#039;\n    LogArchiveMinSucceedDest        = &#039;0&#039;\n    DataGuardSyncLatency            = &#039;0&#039;\n    LogArchiveTrace                 = &#039;0&#039;\n    LogArchiveFormat                = &#039;&#039;\n    DbFileNameConvert               = &#039;&#039;\n    LogFileNameConvert              = &#039;&#039;\n    ArchiveLocation                 = &#039;&#039;\n    AlternateLocation               = &#039;&#039;\n    StandbyArchiveLocation          = &#039;&#039;\n    StandbyAlternateLocation        = &#039;&#039;\n    InconsistentProperties          = &#039;(monitor)&#039;\n    InconsistentLogXptProps         = &#039;(monitor)&#039;\n    LogXptStatus                    = &#039;(monitor)&#039;\n    SendQEntries                    = &#039;(monitor)&#039;\n    RecvQEntries                    = &#039;(monitor)&#039;\n    HostName                        = &#039;fornix2&#039;\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;\n    TopWaitEvents                   = &#039;(monitor)&#039;\n    SidName                         = &#039;(monitor)&#039;\n \n  Log file locations:\n    Alert log               : \/oracle\/19.3.0\/base\/diag\/rdbms\/cortexdr\/CORTEXDR\/trace\/alert_CORTEXDR.log\n    Data Guard Broker log   : \/oracle\/19.3.0\/base\/diag\/rdbms\/cortexdr\/CORTEXDR\/trace\/drcCORTEXDR.log\n \nDatabase Status:\nSUCCESS\n<\/pre><\/div>\n\n\n<p>Um dos processos de background do Broker rodando:<\/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 trace]$ ps -ef | grep dmon\noracle    8607     1  0 19:15 ?        00:00:00 ora_dmon_cortex\noracle   10333  4238  0 19:41 pts\/1    00:00:00 grep --color=auto dmon\n&#x5B;oracle@fornix1 trace]$\n<\/pre><\/div>\n\n\n<p>\u00c9 poss\u00edvel perceber que o pr\u00f3prio broker definiu o valor para o par\u00e2metro que anteriormente limpamos:<\/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; SHO PARAMETER log_archive_dest_2\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nlog_archive_dest_2                   string      service=&quot;cortexdr&quot;, ASYNC NOAF\n                                                 FIRM delay=0 optional compress\n                                                 ion=disable max_failure=0 reop\n                                                 en=300 db_unique_name=&quot;cortexd\n                                                 r&quot; net_timeout=30, valid_for=(\n                                                 online_logfile,all_roles)\nlog_archive_dest_20                  string\nlog_archive_dest_21                  string\nlog_archive_dest_22                  string\nlog_archive_dest_23                  string\nlog_archive_dest_24                  string\n \nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nlog_archive_dest_25                  string\nlog_archive_dest_26                  string\nlog_archive_dest_27                  string\nlog_archive_dest_28                  string\nlog_archive_dest_29                  string\nSQL&gt;\n<\/pre><\/div>\n\n\n<p>Gerando um archive 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=\"\">\nSQL&gt; ALTER SYSTEM SWITCH LOGFILE;\n \nSystem altered.\n<\/pre><\/div>\n\n\n<p>No alert:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n2021-03-21 19:44:11.728000 -03:00\nThread 1 advanced to log sequence 48 (LGWR switch)\n  Current log# 3 seq# 48 mem# 0: +DG_DATA\/CORTEX\/ONLINELOG\/group_3.263.1039033647\n  Current log# 3 seq# 48 mem# 1: +DG_FRA\/CORTEX\/ONLINELOG\/group_3.259.1039033651\nARC0 (PID:3684): Archived Log entry 54 added for T-1.S-47 ID 0x20b8e097 LAD:1\nTT02 (PID:3694): SRL selected for T-1.S-48 for LAD:2\n<\/pre><\/div>\n\n\n<p>Alert 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=\"\">\n2021-03-21 19:44:11.725000 -03:00\n rfs (PID:10386): Primary database is in MAXIMUM PERFORMANCE mode\n rfs (PID:10386): Re-archiving LNO:4 T-1.S-47\nARC0 (PID:4228): Archived Log entry 12 added for T-1.S-47 ID 0x20b8e097 LAD:1\nMRP0 (PID:10069): Media Recovery Waiting for T-1.S-48\n rfs (PID:10386): Selected LNO:4 for T-1.S-48 dbid 548968087 branch 1039033628\n2021-03-21 19:44:12.846000 -03:00\nRecovery of Online Redo Log: Thread 1 Group 4 Seq 48 Reading mem 0\n  Mem# 0: +DG_FRA\/CORTEXDR\/ONLINELOG\/group_4.264.1066479889\n<\/pre><\/div>\n\n\n<p>Por fim, caso queiramos parar a opera\u00e7\u00e3o do broker, basta executar o comando abaixo 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@fornix1 trace]$ dgmgrl sys\/oracle@CORTEXDR\nDGMGRL for Linux: Release 19.0.0.0.0 - Production on Sun Mar 21 19:49:50 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.\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>Realizando um teste de conex\u00e3o do ambiente primary para o standby e o inverso tamb\u00e9m: A configura\u00e7\u00e3o do Broker pressup\u00f5e a exist\u00eancia de um arquivo (multiplexado) com extens\u00e3o &#8220;.dat&#8221;. Desse modo, farei a cria\u00e7\u00e3o do diret\u00f3rio dentro do ASM para abrig\u00e1-lo (tamb\u00e9m \u00e9 suportado a cria\u00e7\u00e3o em FS): Primary: Standby: Definindo nos 2 ambientes os [&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-2974","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\/2974","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=2974"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2974\/revisions"}],"predecessor-version":[{"id":9213,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/2974\/revisions\/9213"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=2974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=2974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=2974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}