Performing Failover to Standby Using DataGuard Broker
Step0> Set correct environment
$export ORACLE_OHOME=/u01/app/oracle/product/12.1.0.2/dbhome_2
$export ORACLE_SID=APX1TS
$export ORACLE_OHOME=/u01/app/oracle/product/12.1.0.2/dbhome_2
$export ORACLE_SID=APX1TS
Step1> Connect as sys over tns to the standby database using dgmgrl
$ dgmgrl
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production
$ dgmgrl
DGMGRL for Linux: Version 12.1.0.2.0 - 64bit Production
Copyright (c) 2000, 2013, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL> connect sys@APX1TS
Password:
Connected as SYSDBA.
Step1> Perform Failover
Connect to the target standby database and issue the FAILOVER command to perform a failover, specifying the name of the standby database that you want to become the primary database
Note: must connect as sys as shown in Step1
DGMGRL> connect sys@APX1TS
Password:
Connected as SYSDBA.
Step1> Perform Failover
Connect to the target standby database and issue the FAILOVER command to perform a failover, specifying the name of the standby database that you want to become the primary database
Note: must connect as sys as shown in Step1
DGMGRL> failover to APX1TS;
Performing failover NOW, please wait...
Failover succeeded, new primary is "APX1TS"
Performing failover NOW, please wait...
Failover succeeded, new primary is "APX1TS"
DGMGRL> show configuration;
Configuration - apx1t_dg
Protection Mode: MaxAvailability
Members:
APX1TS - Primary database
Warning: ORA-16629: database reports a different protection level from the protection mode
Members:
APX1TS - Primary database
Warning: ORA-16629: database reports a different protection level from the protection mode
APX1TP - Physical standby database (disabled)
ORA-16661: the standby database needs to be reinstated
ORA-16661: the standby database needs to be reinstated
Fast-Start Failover: DISABLED
Configuration Status:WARNING (status updated 5 seconds ago)
Failover and Protection Mode
If the protection mode was at maximum protection, it is reset to maximum performance. You can upgrade the protection mode later, if necessary
If the protection mode was at maximum availability or maximum performance, it remains unchanged.
Comments
Post a Comment