2

I have a production Oracle 11gR2 RAC database with a single node physical standby. Now it has become the time to retire the old standby and pass that role to a RAC on fresher hardware.

We don't use Data Guard Broker.

I haven't been able to find much on this particular process, so I figured maybe there wasn't all that much to it. Apparently there is at least a tad more than I have been able to think of.

After stopping the log apply on the old standby, I attempted to simply clear the standby log destination and set a new destination for log shipping. Oracle then complains that the DB_UNQUE_NAME of the new physical standby is not a part of the current Data Guard configuration.

SQL> alter system set log_archive_dest_3='';

System altered.

SQL> alter system checkpoint;

System altered.

SQL> alter system set log_archive_dest_3='SERVICE=PDB10SBY LGWR ASYNC REGISTER VALID_FOR=(online_logfile,primary_role) REOPEN=60 DB_UNIQUE_NAME=PDB11SBY' scope=both sid='*';
alter system set log_archive_dest_3='SERVICE=PDB10SBY LGWR ASYNC REGISTER VALID_FOR=(online_logfile,primary_role) REOPEN=60 DB_UNIQUE_NAME=PDB10SBY' scope=both sid='*'
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-16053: DB_UNIQUE_NAME PDB10SBY is not in the Data Guard Configuration

A quick query to v$dataguard_config confirms that there is an active configuration containing the DB_UNIQUE_NAME of the old standby database.

SQL> select * from
  2  v$dataguard_config;

DB_UNIQUE_NAME
------------------------------
PDB10
PDB10_STBY

So then the question is, what are the steps required to retire an existing Data Guard configuration so that a new physical standby database can be deployed?

2

The unique names of the databases in a Data Guard configuration are listed in the log_archive_config parameter in the following form:

log_archive_config='DG_CONFIG=(PDB10,PDB10_STBY)'

You can remove the old one and add the new one as:

alter system set log_archive_config='DG_CONFIG=(PDB10,PDB10SBY)';

After this, you can set log_archive_dest_N to the new standby.

  • Ah, there's Oracle for you. Hiding stuff away in inconsistent naming conventions where honest working folk won't easily find it. Worked like a charm! – Roy Nov 22 '14 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.