You invoke a failover operation in response to an
emergency situation, usually when the primary database cannot be accessed or is
unavailable.
See before you fail over to decide which standby
database should be the target of the failover. The following scenario describes
a failover to the remote database called DR_Sales.
Note:
If fast-start failover is enabled, you can perform
a manual failover only to the standby database that was specified as the target
of a fast-start failover and only when the observer is running.
If you want to perform a manual failover to a
standby database that is not the fast-start failover target standby database,
you must first disable fast-start failover using the FORCE option on the
standby database you want to fail over. See Section 5.5.5, "Disabling
Fast-Start Failover" for more information about the FORCE option.
Step 1
Connect to the target standby database.
To perform the failover operation, you must
connect to the standby database to which you want to fail over to as a user
that has the SYSDBA privilege. For example:
DGMGRL> CONNECT
sys@DR_Sales.foo.com;
Password: password
Connected.
Step 2
Issue the failover command.
Now you can issue the failover command to make the
target standby database the new primary database for the configuration. Note
that after the failover completes, the original primary database cannot be used
as a standby database of the new primary database unless it is reenabled (as
described in Section 5.4.3).
Step 3
Show the configuration.
Issue the SHOW CONFIGURATION command to verify the
failover.
DGMGRL> SHOW
CONFIGURATION;
Configuration
Name: DRSolution
Enabled: YES
Protection
Mode: MaxAvailability
Databases:
DR_Sales - Primary database
North_Sales - Physical standby
database (disabled)
Fast-Start Failover: DISABLED
Current status for "DRSolution":
Warning: ORA-16608: one or more databases have
warnings
Note that in this example, the configuration was
operating in maximum availability mode. The protection mode was preserved after
the failover. The configuration also has a warning status. If you show the
StatusReport monitorable database property of the new primary, you will see
that the warning is the result of not having an enabled physical standby
database. As a result, the warning status indicates that the protection level
of the configuration is not the same as the configured mode.
Step 4
Show StatusReport property of the new primary database.
DGMGRL> SHOW DATABASE
'DR_Sales' StatusReport;
STATUS REPORT
INSTANCE_NAME SEVERITY
ERROR_TEXT
* WARNING ORA-16629: database
reports a different protection level from the protection mode
Step 5
Show the database.
Issue the SHOW DATABASE command to see that the
former (failed) primary database was disabled by the broker as a consequence of
the failover. It must be reenabled (as described in Section 5.4.3).
DGMGRL> SHOW DATABASE
'North_Sales';
Database
Name: North_Sales
Role: PHYSICAL STANDBY
Enabled: NO
Intended
State: APPLY-ON
Instance(s):
sales1
Current status for "North_Sales":
Error: ORA-16661: the standby database needs to be
reinstated
No comments:
Post a Comment