ORA-16698: member has a LOG_ARCHIVE_DEST_n parameter with SERVICE attribute set


Error:

[oracle@fundb ~]$ dgmgrl
DGMGRL for Linux: Release 12.2.0.1.0 - Production on Sat Jul 19 18:03:42 2019

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

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect /
Connected to "PRIM_CL"
Connected as SYSDG.
DGMGRL>
DGMGRL> create configuration 'PRIM_CL' as primary database is 'PRIM_CL' connect identifier is PRIM_CL;
Configuration "PRIM_CL" created with primary database "PRIM_CL"
DGMGRL>
DGMGRL> add database 'STAN_CL' as connect identifier is STAN_CL maintained as physical;
Error: ORA-16698: member has a LOG_ARCHIVE_DEST_n parameter with SERVICE attribute set

Failed.
DGMGRL>
DGMGRL> exit


Solution:

1. Remove the DG Broker configuration

DGMGRL> remove configuration;
Removed configuration
DGMGRL>

2. Disable log_archive_dest_2

On Primary

SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------
log_archive_dest_2                   string      SERVICE=STAN_CL LGWR ASYNC VAL
                                                 ID_FOR=(ONLINE_LOGFILES,PRIMAR
                                                 Y_ROLE) DB_UNIQUE_NAME=STAN_CL

SQL>

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='' scope=both;

System altered.

SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------
log_archive_dest_2                   string

SQL>

On Standby

SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------
log_archive_dest_2                   string      SERVICE=PRIM_CL LGWR ASYNC VALID_
                                                 FOR=(ONLINE_LOGFILES,PRIMARY_R
                                                 OLE) DB_UNIQUE_NAME=PRIM_CL
SQL>

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='' scope=both;

System altered.

SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------
log_archive_dest_2                   string

SQL>

3. Disable / Enable DG Broker

On Primary

SQL> show parameter dg_broker_start

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------
dg_broker_start                      boolean     TRUE
SQL>
SQL> alter system set dg_broker_start=false scope=both;

System altered.

SQL> alter system set dg_broker_start=true scope=both;

System altered.

SQL>  show parameter dg_broker_start

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------
dg_broker_start                      boolean     TRUE

SQL>

On Standby

SQL> show parameter dg_broker_start

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------
dg_broker_start                      boolean     TRUE

SQL>
SQL> alter system set dg_broker_start=false scope=both;

System altered.

SQL> alter system set dg_broker_start=true scope=both;

System altered.

SQL> show parameter dg_broker_start

NAME                                 TYPE        VALUE
------------------------------------ ----------- ----------------------dg_broker_start                      boolean     TRUE

SQL>

4. Configure DG Broker

On Primary

[oracle@fundb ~]$ dgmgrl
DGMGRL for Linux: Release 12.2.0.1.0 - Production on Sat Jul 19 18:25:13 2019

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

Welcome to DGMGRL, type "help" for information.
DGMGRL> connect /
Connected to "PRIM_CL"
Connected as SYSDG.
DGMGRL> create configuration 'PRIM_CL' as primary database is 'PRIM_CL' connect identifier is PRIM_CL;
Configuration "PRIM_CL" created with primary database "PRIM_CL"
DGMGRL>
DGMGRL> add database 'STAN_CL' as connect identifier is STAN_CL maintained as physical;
Database "STAN_CL" added
DGMGRL>
DGMGRL> show configuration;

Configuration - PRIM_CL

  Protection Mode: MaxPerformance
  Members:
  PRIM_CL    - Primary database
    STAN_CL - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
DISABLED

DGMGRL>

5. Enbale LOG_ARCHIVE_DEST_2

On Primary

SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIM_CL,STAN_CL)' scope=both;

System altered.

SQL>

SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=STAN_CL LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=STAN_CL' scope=both;

System altered.

SQL>

On Standby

SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(PRIM_CL,STAN_CL)' scope=both;

System altered.

SQL>


SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=PRIM_CL LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=PRIM_CL' scope=both;

System altered.

SQL>

6. Enable DG Broker Configuration

DGMGRL> enable configuration;
Enabled.
DGMGRL>

DGMGRL> show configuration;

Configuration - PRIM_CL

  Protection Mode: MaxPerformance
  Members:
  PRIM_CL    - Primary database
    STAN_CL - Physical standby database (disabled)

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS   




Please do like and subscribe to my youtube channel: https://www.youtube.com/@foalabs If you like this post please follow,share and comment