Sunday, June 29, 2014

ORA-16698: LOG_ARCHIVE_DEST_n parameter set for object to be added


1.Adding a database in dgmgrl fails with error ora-16698
DGMGRL> add database
> dbrac2 as
> connect identifier is dbrac2;
Error: ORA-16698: LOG_ARCHIVE_DEST_n parameter set for object to be added

dgmgrl alert log file with the  message.
=========================================
06/30/2014 09:54:05
ADD DATABASE
dbrac1 already has log_archive_dest_2 for the object to be added

2.Remove the entry in the log_archive_dest_2 of the primary database and retry adding the database using the dgmgrl CLI

SQL> alter system set log_archive_dest_2='' scope=both;

System altered.

3.Add the database
DGMGRL> add database dbrac2
> as
> connect identifier is dbrac2;
Database "dbrac2" added
Alter log with error message.
=============================================
ADD DATABASE
06/30/2014 10:00:08
Cannot find destination to match the site.

4.Set the protection mode to maximum performance if not set to default
DGMGRL> show configuration

Configuration - dgmgrl1

  Protection Mode: MaxAvailability
  Databases:
  dbrac1 - Primary database
    dbrac2 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL> edit configuration set protection mode as maxperformance;
Succeeded.

DGMGRL> show configuration;

Configuration - dgmgrl1

  Protection Mode: MaxPerformance
  Databases:
  dbrac1 - Primary database
    dbrac2 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

5.Enable the configuration
DGMGRL> enable configuration;
Enabled.
DGMGRL> show configuration

Configuration - dgmgrl1

  Protection Mode: MaxPerformance
  Databases:
  dbrac1 - Primary database
    dbrac2 - Physical standby database
      Error: ORA-16810: multiple errors or warnings detected f                                                                        or the database

Fast-Start Failover: DISABLED

Configuration Status:
ERROR


6.Show the database statusreport,check the errors message
DGMGRL> show database 'dbrac2' 'statusReport';
STATUS REPORT
       INSTANCE_NAME   SEVERITY ERROR_TEXT
       new12cdb_rac2    WARNING ORA-16714: the value of property ArchiveLagTarget is inconsistent with the database setting
       new12cdb_rac2    WARNING ORA-16714: the value of property LogArchiveMaxProcesses is inconsistent with the database setting
       new12cdb_rac2    WARNING ORA-16714: the value of property LogArchiveMinSucceedDest is inconsistent with the database setting
       new12cdb_rac2    WARNING ORA-16714: the value of property LogArchiveTrace is inconsistent with the database setting
       new12cdb_rac2    WARNING ORA-16675: database instance restart required for property value modification to take effect
       new12cdb_rac2    WARNING ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting
                   *      ERROR ORA-16766: Redo Apply is stopped


7.Check the database with inconsistentProperties
DGMGRL> show database verbose dbrac2

Database - dbrac2

  Role:              PHYSICAL STANDBY
  Intended State:    APPLY-ON
  Transport Lag:     0 seconds (computed 0 seconds ago)
  Apply Lag:         (unknown)
  Apply Rate:        (unknown)
  Real Time Query:   OFF
  Instance(s):
    new12cdb_rac2
      Warning: ORA-16714: the value of property ArchiveLagTarget is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveMaxProcesses is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveMinSucceedDest is inconsistent with the database setting
      Warning: ORA-16714: the value of property LogArchiveTrace is inconsistent with the database setting
      Warning: ORA-16675: database instance restart required for property value modification to take effect
      Warning: ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting

  Database Error(s):
    ORA-16766: Redo Apply is stopped

  Properties:
    DGConnectIdentifier             = 'dbrac2'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    RedoRoutes                      = ''
    DelayMins                       = '0'
    Binding                         = 'optional'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '30'
    RedoCompression                 = 'DISABLE'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyLagThreshold               = '0'
    TransportLagThreshold           = '0'
    TransportDisconnectedThreshold  = '30'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'AUTO'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '4'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '/u03/oradata/new12cdb, /u04/oradata/new12cdb'
    LogFileNameConvert              = '/u04/fra/NEW12CDB/onlinelog, /u03/fra/NEW12CDB/onlinelog'
    FastStartFailoverTarget         = ''
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    StaticConnectIdentifier         = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ol6-112-rac2.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBRAC2_DGMGRL)(INSTANCE_NAME=new12cdb_rac2)(SERVER=DEDICATED)))'
    StandbyArchiveLocation          = '/u03/fra'
    AlternateLocation               = ''
    LogArchiveTrace                 = '0'
    LogArchiveFormat                = '%t_%s_%r.dbf'
    TopWaitEvents                   = '(monitor)'

Database Status:
ERROR


DGMGRL> show database dbrac2 InconsistentProperties;
INCONSISTENT PROPERTIES
   INSTANCE_NAME        PROPERTY_NAME         MEMORY_VALUE         SPFILE_VALUE         BROKER_VALUE
   new12cdb_rac2     ArchiveLagTarget                    0                                         0
   new12cdb_rac2 LogArchiveMaxProcesses                    4                                         4
   new12cdb_rac2 LogArchiveMinSucceedDest                    1                                         1
   new12cdb_rac2      LogArchiveTrace                    0            (missing)                    0
   new12cdb_rac2     LogArchiveFormat         %t_%s_%r.dbf            (missing)         %t_%s_%r.dbf


8.Change the inconsistent properites in the standby database
DGMGRL for Linux: Version 12.1.0.1.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys/sys123@dbrac2
Connected as SYSDBA.
DGMGRL>
DGMGRL> show database verbose dbrac2

Database - dbrac2

  Role:              PHYSICAL STANDBY
  Intended State:    APPLY-ON
  Transport Lag:     0 seconds (computed 0 seconds ago)
..................
DGMGRL> sql "alter system set archive_lag_target=0 scope=both sid='*'";
Succeeded.
DGMGRL> sql "alter system set Log_archive_max_processes=4 scope=both sid='*'";
Succeeded.
DGMGRL> sql "alter system set log_archive_min_succeed_dest=1 scope=both sid='*'";
Succeeded.
DGMGRL> sql "alter system set log_archive_trace=0 scope=both sid='*'";
Succeeded.
DGMGRL> sql "alter system set log_archive_format='%t_%s_%r.dbf' scope=spfile sid='*'";
Succeeded.
DGMGRL> show database dbrac2

Database - dbrac2

  Role:              PHYSICAL STANDBY
  Intended State:    APPLY-ON
  Transport Lag:     0 seconds (computed 1 second ago)
  Apply Lag:         (unknown)
  Apply Rate:        (unknown)
  Real Time Query:   OFF
  Instance(s):
    new12cdb_rac2
      Warning: ORA-16714: the value of property LogArchiveTrace is inconsistent with the database setting
      Warning: ORA-16675: database instance restart required for property value modification to take effect
      Warning: ORA-16714: the value of property LogArchiveFormat is inconsistent with the database setting

  Database Error(s):
    ORA-16766: Redo Apply is stopped

Database Status:
ERROR

9.Logging into the standby database server and Bounce the standby database using the dgmgrl cli
[oracle@ol6-112-rac2 ~]$ dgmgrl
DGMGRL for Linux: Version 12.1.0.1.0 - 64bit Production

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

Welcome to DGMGRL, type "help" for information.
DGMGRL>
DGMGRL>
DGMGRL> conn sys/sys123@dbrac2
Unrecognized command "conn", try "help"
DGMGRL> connect sys/sys123@dbrac2
Connected as SYSDBA.
DGMGRL> shutdown immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
DGMGRL> startup mount
ORACLE instance started.
Database mounted.
DGMGRL> show database dbrac2

Database - dbrac2

  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:        525.00 KByte/s
  Real Time Query:   OFF
  Instance(s):
    new12cdb_rac2

Database Status:
SUCCESS

10.Enable configuartion
DGMGRL> enable configuration
Enabled.
DGMGRL> show configuration

Configuration - dgmgrl1

  Protection Mode: MaxPerformance
  Databases:
  dbrac1 - Primary database
    dbrac2 - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS


No comments: