{
  "date": "2015-08-23T14:26:34",
  "slug": "dataguard-broker-properties-part-ii-log-shipping-parameters",
  "link": "https://www.dbi-services.com/blog/dataguard-broker-properties-part-ii-log-shipping-parameters/",
  "title": {
    "rendered": "DataGuard broker properties – Part II: log shipping parameters"
  },
  "content": {
    "rendered": "<h2>By Franck Pachot</h2>\n<p>.<br />\nIn the <a href=\"http://dbi-services.com/blog/dataguard-broker-properties-part-i-imported-parameters/\" title=\"DataGuard broker properties – Part I: imported parameters\">part I</a> we have seen the properties that are imported when you add a database to the configuration, and which are then managed by the broker. Now we will list the properties that are managed by the broker, but whose default value is not imported from the instance parameters.<br />\n<!--more--></p>\n<h1>LogXpt properties</h1>\n<p>Here are the properties from primary database where I removed those we have seen in previous Part I:</p>\n<pre><code>\nDGMGRL&gt; show database verbose demo11;\n...\n  Properties:\n...\n    DGConnectIdentifier             = '//vm112/DEMO12'\n    LogXptMode                      = 'ASYNC'\n    RedoRoutes                      = ''\n    DelayMins                       = '0'\n    Binding                         = 'optional'\n    MaxFailure                      = '0'\n    ReopenSecs                      = '300'\n    NetTimeout                      = '30'\n    RedoCompression                 = 'DISABLE'\n    LogShipping                     = 'ON'\n    InconsistentLogXptProps         = '(monitor)'\n    StandbyArchiveLocation          = 'USE_DB_RECOVERY_FILE_DEST'\n    AlternateLocation               = ''\n...\n</code></pre>\n<p>They are related with log shipping destination. When I enabled the configuration, the LOG_ARCHIVE_DEST have been set with those values:</p>\n<pre><code>\nSQL&gt; show parameter log_archive_dest_1\n&nbsp;\nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nlog_archive_dest_1                   string      location=USE_DB_RECOVERY_FILE_\n                                                 DEST, valid_for=(ALL_LOGFILES,\n                                                  ALL_ROLES)\nlog_archive_dest_2                   string      service=\"//vm112/DEMO12\", ASYN\n                                                 C NOAFFIRM delay=0 optional co\n                                                 mpression=disable max_failure=\n                                                 0 max_connections=1 reopen=300\n                                                  db_unique_name=\"demo12\" net_t\n                                                 imeout=30, valid_for=(online_l\n                                                 ogfile,all_roles)\nlog_archive_dest_state_1             string      enable\nlog_archive_dest_state_2             string      enable\n</code></pre>\n<p>Now, I manage them from the Data Guard broker:</p>\n<pre><code>\nDGMGRL&gt; edit database demo12 set property LogXptMode='SYNC';\nProperty \"logxptmode\" updated\n</code></pre>\n<p>which has run the following ALTER SYSTEM:</p>\n<pre><code>\nALTER SYSTEM SET log_archive_dest_2='service=\"//vm112/DEMO12\"','SYNC AFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name=\"demo12\" net_timeout=30','valid_for=(online_logfile,all_roles)' SCOPE=BOTH;\n</code></pre>\n<p>When we go to SYNC, the destination is set to SYNC (wait for log shipping) and AFFIRM (wait for log write)</p>\n<h1>Properties &#8211; LOG_ARCHIVE_DEST attributes</h1>\n<p>Here is the correspondence. The properties change the LOG_ARCHIVE_DEST attributes to set log shipping.</p>\n<table style=\"width:50%\">\n<thead>\n<tr>\n<th>Broker property</th>\n<th>LOG_ARCHIVE_DEST</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;background-color:white\">RedoRoutes</td>\n<td style=\"text-align: left;background-color:white\">LOG_ARCHIVE_DEST_n</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">DGConnectIdentifier</td>\n<td style=\"text-align: left;background-color:white\">service=</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">LogXptMode</td>\n<td style=\"text-align: left;background-color:white\">SYNC/ASYNC,AFFIRM/NOAFFIRM</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">DelayMins</td>\n<td style=\"text-align: left;background-color:white\">delay=</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">Binding</td>\n<td style=\"text-align: left;background-color:white\">MANDATORY/OPTIONAL</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">MaxFailure</td>\n<td style=\"text-align: left;background-color:white\">max_failure=</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">ReopenSecs</td>\n<td style=\"text-align: left;background-color:white\">reopen=</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">NetTimeout</td>\n<td style=\"text-align: left;background-color:white\">net_timeout=</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">RedoCompression</td>\n<td style=\"text-align: left;background-color:white\">compression=</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">LogShipping</td>\n<td style=\"text-align: left;background-color:white\">LOG_ARCHIVE_DEST_STATE_n</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">StandbyArchiveLocation</td>\n<td style=\"text-align: left;background-color:white\">location=</td>\n</tr>\n<tr>\n<td style=\"text-align: left;background-color:white\">AlternateLocation</td>\n<td style=\"text-align: left;background-color:white\">location=</td>\n</tr>\n</tbody>\n</table>\n<h1>Not imported</h1>\n<p>I&#8217;ll show that those parameters are <strong>not</strong> imported when we create a configuration. Here I remove and re-create the configuration and I still have the LOG_ARCHIVE_DEST as SYNC.</p>\n<pre><code>\nDGMGRL&gt; REMOVE CONFIGURATION;\nRemoved configuration\nDGMGRL&gt; CREATE CONFIGURATION demo11 AS PRIMARY DATABASE IS demo11 CONNECT IDENTIFIER IS '//vm111/DEMO11';\nConfiguration \"demo11\" created with primary database \"demo11\"\nDGMGRL&gt; ADD DATABASE demo12 AS CONNECT IDENTIFIER IS '//vm112/DEMO12';\nDatabase \"demo12\" added\nDGMGRL&gt; ENABLE CONFIGURATION demo11;\nEnabled.\n</code></pre>\n<p>But:</p>\n<pre><code>\nSQL&gt; show parameter log_archive_dest_2\n\nNAME                                 TYPE        VALUE\n------------------------------------ ----------- ------------------------------\nlog_archive_dest_2                   string      service=\"//vm112/DEMO12\", ASYN\n                                                 C NOAFFIRM delay=0 optional co\n                                                 mpression=disable max_failure=\n                                                 0 max_connections=1 reopen=300\n                                                  db_unique_name=\"demo12\" net_t\n                                                 imeout=30, valid_for=(online_l\n                                                 ogfile,all_roles)\n</code></pre>\n<p>The log shipping attributes have been set to the broker properties defaults. This is the main difference from the properties we have seen in Part I.<br />\nNever change the LOG_ARCHIVE_DEST with ALTER SYSTEM. they are managed by the broker. And don&#8217;t forget to set those properties if you re-create the broker configuration.</p>\n",
    "protected": false
  }
}
