By Franck Pachot
.
In the part I 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.
LogXpt properties
Here are the properties from primary database where I removed those we have seen in previous Part I:
DGMGRL> show database verbose demo11;
...
Properties:
...
DGConnectIdentifier = '//vm112/DEMO12'
LogXptMode = 'ASYNC'
RedoRoutes = ''
DelayMins = '0'
Binding = 'optional'
MaxFailure = '0'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
InconsistentLogXptProps = '(monitor)'
StandbyArchiveLocation = 'USE_DB_RECOVERY_FILE_DEST'
AlternateLocation = ''
...
They are related with log shipping destination. When I enabled the configuration, the LOG_ARCHIVE_DEST have been set with those values:
SQL> show parameter log_archive_dest_1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string location=USE_DB_RECOVERY_FILE_
DEST, valid_for=(ALL_LOGFILES,
ALL_ROLES)
log_archive_dest_2 string service="//vm112/DEMO12", ASYN
C NOAFFIRM delay=0 optional co
mpression=disable max_failure=
0 max_connections=1 reopen=300
db_unique_name="demo12" net_t
imeout=30, valid_for=(online_l
ogfile,all_roles)
log_archive_dest_state_1 string enable
log_archive_dest_state_2 string enable
Now, I manage them from the Data Guard broker:
DGMGRL> edit database demo12 set property LogXptMode='SYNC';
Property "logxptmode" updated
which has run the following ALTER SYSTEM:
ALTER 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;
When we go to SYNC, the destination is set to SYNC (wait for log shipping) and AFFIRM (wait for log write)
Properties – LOG_ARCHIVE_DEST attributes
Here is the correspondence. The properties change the LOG_ARCHIVE_DEST attributes to set log shipping.
Broker property | LOG_ARCHIVE_DEST |
---|---|
RedoRoutes | LOG_ARCHIVE_DEST_n |
DGConnectIdentifier | service= |
LogXptMode | SYNC/ASYNC,AFFIRM/NOAFFIRM |
DelayMins | delay= |
Binding | MANDATORY/OPTIONAL |
MaxFailure | max_failure= |
ReopenSecs | reopen= |
NetTimeout | net_timeout= |
RedoCompression | compression= |
LogShipping | LOG_ARCHIVE_DEST_STATE_n |
StandbyArchiveLocation | location= |
AlternateLocation | location= |
Not imported
I’ll show that those parameters are not imported when we create a configuration. Here I remove and re-create the configuration and I still have the LOG_ARCHIVE_DEST as SYNC.
DGMGRL> REMOVE CONFIGURATION;
Removed configuration
DGMGRL> CREATE CONFIGURATION demo11 AS PRIMARY DATABASE IS demo11 CONNECT IDENTIFIER IS '//vm111/DEMO11';
Configuration "demo11" created with primary database "demo11"
DGMGRL> ADD DATABASE demo12 AS CONNECT IDENTIFIER IS '//vm112/DEMO12';
Database "demo12" added
DGMGRL> ENABLE CONFIGURATION demo11;
Enabled.
But:
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service="//vm112/DEMO12", ASYN
C NOAFFIRM delay=0 optional co
mpression=disable max_failure=
0 max_connections=1 reopen=300
db_unique_name="demo12" net_t
imeout=30, valid_for=(online_l
ogfile,all_roles)
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.
Never change the LOG_ARCHIVE_DEST with ALTER SYSTEM. they are managed by the broker. And don’t forget to set those properties if you re-create the broker configuration.