Yann Neuhaus Blog

All around High Availability (Open Source and Oracle)

Change archivelog destination in a Data Guard environment

The purpose of this small post is to explain a smooth way to change the archivelog destination within a running Data Guard environment. Such an operation is not so complex, however the goal will be to keep everything online and avoid the creation of unnecessary parameters...

Let's consider that Fast Start Failover is activated.

The Data Guard configuration is DB10TST2 and the two databases are DB10TST2_SITE1 and DB10TST2_SITE2. Currently the archive destination is /u90/archive/DB10TST2, it should be changed to /app/oracle/admin/DB10TST2/arch. This directory is the default archive log destination on primary but also the reception directory on the standby side.

Let's start the procedure.

First of all change the log_archive_dest_1 to the new destination on both the primary and standby databases. To make sure that the parameter is really considered, we change it for the instance "DB10TST2" and for "*".

ALTER SYSTEM SET log_archive_dest_1='location="/app/oracle/admin/DB10TST2/arch", valid_for=(ONLINE_LOGFILE,ALL_ROLES)' scope=both sid='*';
ALTER SYSTEM SET log_archive_dest_1='location="/app/oracle/admin/DB10TST2/arch", valid_for=(ONLINE_LOGFILE,ALL_ROLES)' scope=both sid='DB10TST2';

As we can see, the parameter log_archive_dest_1 can be changed online into the running instances. This change must be performed BEFORE the changes of the Data Guard property StandbyArchiveLocation. If not, log_archive_dest_1 and StandbyArchiveLocation will differ and the Data Guard broker will automatically create a parameter log_archive_dest_2 which is of course not wished.

Therefore in a second step, change the StandbyArchiveLocation for the both sites with dgmgrl:

edit database 'DB10TST2_SITE1' set property StandbyArchiveLocation = '/app/oracle/admin/DB10TST2/arch';
edit database 'DB10TST2_SITE2' set property StandbyArchiveLocation = '/app/oracle/admin/DB10TST2/arch';

Verify that all is OK and that no log_archive_dest2 appeared on the standby side, by checking the alert.log file of the both instances.

To be sure that Data Guard reacts correctly to this new configuration, it is possible to disable and enable the configuation :

DGMGRL> disable fast_start failover;
Disabled.

DGMGRL> disable configuration;
Disabled.

DGMGRL> enable configuration;
Enabled. 

DGMGRL> enable fast_start failover;
Enabled. 

DGMGRL> start observer;

Have fun with Data Guard.

 

Kommentare

Keine Kommentare

Kommentar abgeben

(verpflichtend) 

(verpflichtend) 

(optional)

(verpflichtend)