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

In primary DATABASE:-
Primary DB:- orclcdb
Standby DB:- orclstd


oracle@primary flashback]$ dgmgrl sys/admin123#@orclcdb
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Mon Apr 13 19:05:31 2020
Version 19.3.0.0.0

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

Welcome to DGMGRL, type "help" for information.
Connected to "orclcdb"
Connected as SYSDBA.

DGMGRL> CREATE CONFIGURATION my_dg_config AS PRIMARY DATABASE IS orclcdb CONNECT IDENTIFIER IS orclcdb;

DGMGRL>ADD DATABASE orclstd AS CONNECT IDENTIFIER IS orclstd MAINTAINED AS PHYSICAL;
Error: ORA-16698: member has a LOG_ARCHIVE_DEST_n parameter with SERVICE attribute set


Solution:-

Step 1.Remove the DG Broker configuration .This can be done from primary/standby database server.

DGMGRL> remove configuration;
Removed configuration
DGMGRL>

Step 2. Disable log_archive_dest_2

On Primary:-
SQL> show parameter log_archive_dest_2

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      service="orclstd", ASYNC NOAFF
                                                 IRM delay=0 optional compressi
                                                 on=disable max_failure=0 reope
                                                 n=300 db_unique_name="orclstd"
                                                  net_timeout=30, valid_for=(on
                                                 line_logfile,all_roles)

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


On Standby:-
SQL> show parameter log_archive_dest_2
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2                   string      service="orclstd", ASYNC NOAFF
                                                 IRM delay=0 optional compressi
                                                 on=disable max_failure=0 reope
                                                 n=300 db_unique_name="orclstd"
                                                  net_timeout=30, valid_for=(on
                                                 line_logfile,all_roles)
 
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


Step 3. Disable / Enable DG Broker in primary & standby DB

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

System altered.

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

System altered.


Now start registering the primary and standby database again using data guard broker.
In primary DATABASE:-


.moracle@primary flashback]$ dgmgrl sys/admin123#@orclcdb
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Mon Apr 13 19:05:31 2020
Version 19.3.0.0.0

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

Welcome to DGMGRL, type "help" for information.
Connected to "orclcdb"
Connected as SYSDBA.

DGMGRL> CREATE CONFIGURATION my_dg_config AS PRIMARY DATABASE IS orclcdb CONNECT IDENTIFIER IS orclcdb;

DGMGRL>ADD DATABASE orclstd AS CONNECT IDENTIFIER IS orclstd MAINTAINED AS PHYSICAL;



Step 5. Enbale LOG_ARCHIVE_DEST_2

On Primary DB:-

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

On Standby DB:-

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


Step 6. Finally Enable DG Broker Configuration

DGMGRL> enable configuration;

No comments:

Post a Comment