 |
|
Data Guard Broker switchover Tips
Oracle Database Tips by Donald BurlesonDecember 9, 2015
|
Oracle Data Guard Broker
Role Transition using Data
Guard Broker
Role transition is a
complicated activity in a Data Guard environment. Data Guard broker
has significantly simplified the task of switchover and failover by
internally combining the steps required to transition a standby
database into the primary role. Role transition management using
Data Guard manager's CLI interface is identical in both Oracle9i and
Oracle10g. This section will present the switchover and failover
operation using CLI commands.
Data Guard Broker
Switchover Operation
In order to switchover a
Oracle instance
to the primary role and vice-versa, the following
pre-requisites should be met before issuing the SWITCHOVER
command:
-
The intended state of
the primary database should be READ-WRITE-XPTON for Oracle9i and
ONLINE for Oracle10g.
-
The intended state of
the target physical Oracle instance
should be
PHYSICAL-APPLY-ON for Oracle9i, and
ONLINE for Oracle10g.
-
If the target standby
database is a logical standby database, its intended state
should be LOGICAL-APPLY-ON for
Oracle9i, and ONLINE for Oracle10g.
-
There should be no
blocking error on the participating standby database. Usually,
the blocking issues are any error in log management services or
data file identifications. If the broker finds any blocking
issues, it terminates the switchover operation leaving the
primary and standby databases in their original state.
These pre-requisites are no
different than the requirements for manually switching over a
standby and primary database.
To switchover a standby
database into the primary role, execute the following statement. It
can be executed in the CLI environment after connecting to the
primary database or the target Oracle instance
using an account
having SYSDBA privilege.
SWITCHOVER TO 'stdbydb';
Broker
Switchover Operation
The broker will restart the
primary and Oracle instance
after the switchover. In some cases,
usually due to privilege or incorrect setting of initialization
parameters, the broker may not be able to restart the databases. In
those circumstances, the database needs to be manually started after
the switchover operation is complete. Then, run the SHOW SITE
command to verify the state and role of the databases after the
switchover operation.
Failover
Operation
The first step in a failover
operation is to evaluate the best available Oracle instance
for
failover. This is explained in Chapter 6, "Switchover and Failover".
The FAILOVER command should be executed on
the Oracle instance
that is selected for the failover operation.
The GRACEFUL or FORCED
keyword can be used with the FAILOVER
command. GRACEFUL failover is always
preferred in order to minimize any data loss.
FAILOVER TO 'stdbydb' GRACEFUL;
Data Guard broker will
restart the new primary database. After the failover, the
appropriate SHOW commands should be
executed in order to validate the failover operation.
Managing Data
Protection Modes
From previous chapters, a
Data Guard configuration must have a defined protection mode. By
default, the protection mode of a configuration is MAXIMUM
PERFORMANCE. In order to change the protection
mode of a configuration, execute the following steps:
|