Thursday, January 12, 2017

Invalid Archivelog deletion policy




 Data Guard Physical Standby - RMAN configure archivelog deletion policy reports RMAN-08591 (Doc ID 1984064.1)



When attempting to configure the RMAN archivelog deletion policy in a Data Guard environment RMAN reports the following warning:
RMAN> configure archivelog deletion policy to applied on standby;

new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored
RMAN-08591: WARNING: invalid archived log deletion policy
 
 

Cause:

o eliminate the RMAN warning message when setting the deletion policy for archivelogs, at least one archive destination must be set as a mandatory destination.

As there is a broker configuration in place this MUST be performed through the broker.

The following process details this:

1. Log in to the broker command line utility
[oracle@grid2vm1 ~]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production

Copyright (c) 2000, 2013, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
 dgmgrl sys/welcome1
DGMGRL for Linux: Version 11.2.0.4.0 - 64bit Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> show configuration

Configuration - AWDB_PRIMARY

  Protection Mode: MaxPerformance
  Databases:
    AWDB    - Primary database
    AWCTGFO - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> show database verbose ORCL
Object "awdb" was not found
DGMGRL> show database verbose ORCLSTBY
Object "awctgfo" was not found
DGMGRL> show database verbose awctgfo
Object "awctgfo" was not found
DGMGRL> show database verbose "ORCLSTBY"

Database - ORCLSTBY

  Role:            PHYSICAL STANDBY
  Intended State:  APPLY-ON
  Transport Lag:   0 seconds (computed 0 seconds ago)
  Apply Lag:       0 seconds (computed 0 seconds ago)
  Apply Rate:      630.00 KByte/s
  Real Time Query: ON
  Instance(s):
    awctgfo1
    awctgfo2 (apply instance)

  Properties:
    DGConnectIdentifier             = 'awctgfo_dg'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '10'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO                                                                                        _DRAW'
    LogFileNameConvert              = '+DATA_DCAW, +DATA_DRAW, +RECO_DCAW, +RECO                                                                                        _DRAW'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    SidName(*)
    StaticConnectIdentifier(*)
    StandbyArchiveLocation(*)
    AlternateLocation(*)
    LogArchiveTrace(*)
    LogArchiveFormat(*)
    TopWaitEvents(*)
    (*) - Please check specific instance for the property value

Database Status:
SUCCESS



















. Locate the name of the standby site you want to set as a mandatory destination
2 . 
 
DGMGRL> show configuration;

Configuration - dg_db121

  Protection Mode: MaxPerformance
  Members:
  db121    - Primary database
    db121stb - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   (status updated 39 seconds ago)
 
3. For the standby site locate the "Binding" property in the sites broker configuration
DGMGRL> show database verbose db121stb

Database - db121stb

  Role:               PHYSICAL STANDBY
  Intended State:     APPLY-ON
  Transport Lag:      0 seconds (computed 0 seconds ago)
  Apply Lag:          0 seconds (computed 0 seconds ago)
  Average Apply Rate: 14.00 KByte/s
  Active Apply Rate:  594.00 KByte/s
  Maximum Apply Rate: 5.06 MByte/s
  Real Time Query:    OFF
  Instance(s):
    db1211 (apply instance)
    db1212

  Properties:
    DGConnectIdentifier             = 'db121_stb'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    RedoRoutes                      = ''
    DelayMins                       = '0'
    Binding                         = 'optional'     ****** controls whether the destination is mandatory or not
..
.

Database Status:
SUCCESS
 

Also, you can verify BINDING column of the V$ARCHIVE_DEST view of the database or far sync instance that is sending redo data using SQLPLUS by running below script
SQL > select binding from v$archive_dest;

4. Set the "Binding" property to MANDATORY

DGMGRL> edit database db121stb set property Binding='mandatory';
Property "binding" updated
DGMGRL> exit
OR using SQLPLUS
SQL>alter system set log_archive_dest_2='service=ORACLE MANDATORY lgwr async affirm valid_for=(online_logfiles,primary_role) db_unique_name=LARRY';


5. Once the broker configuration has set a standby site as a mandatory destination, the RMAN configuration can be altered to set the archivelog deletion policy to applied on standby.
[oracle@grid2vm1 ~]$ rman target /

Recovery Manager: Release 12.1.0.2.0 - Production on Thu Feb 26 17:43:27 2015

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DB121 (DBID=120781903)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name DB121 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
..
.
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0/dbhome_1/dbs/snapcf_db1211.f'; # default

RMAN> configure archivelog deletion policy to applied on standby;

old RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;
new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
new RMAN configuration parameters are successfully stored
 





No comments:

Post a Comment