Professional Documents
Culture Documents
Document 1578787.1
Document 1578787.1
Document 1578787.1
Dashboard Knowledge Service Requests Patches & Updates
Give Feedback...
Copyright (c) 2023, Oracle. All rights reserved. Oracle Confidential.
12c Data guard Switchover Best Practices using SQLPLUS (Doc ID 1578787.1) To Bottom
Goal Yes
No
*** Reviewed for Relevance 16-Jul-2015 ***
This Document describes step by step method to perform switchover on Physical Standby Environment using SQLPLUS.
Document Details
Solution
I. Pre-Switchover check Type:
Verify that the target standby is ready for switchover. Status: HOWTO
Last Major PUBLISHED
Checks ORL status on target standby. Update: 28-Oct-2019
What to do? Last 30-Jan-2022
Update: English
Verify Primary and Standby tempfiles match Language:
NOTE : For multiple Standby environment make sure all the standby in SYNC with primary.
APPLIES TO:
GOAL
This Document describes step by step method to perform switchover on Physical Standby Environment using
SQLPLUS.
SOLUTION
NOTE: In the images and/or the document content below, the user information and environment data used
represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle
database product or other training material. Any similarity to actual environments, actual persons, living or
dead, is purely coincidental and not intended in any manner.
For the purposes of this document, the following fictitious environment is used as an example to describe the
procedure:
I. Pre-Switchover check
Verify that the target standby is synchronous with primary and Redo shipping working fine from primary.
c. Standby MRP recovery running and its synchronous with primary, else it will through below error in SQLPROMPT and alert log
as well.
For example,
ERROR at line 1:
ORA-16475: succeeded with warnings, check alert log for more details
SWITCHOVER VERIFY WARNING: switchover target has dirty online redo logfiles that require clearing.
It takes time to clear online redo logfiles. This may slow down switchover process.
What to do?
NOTE: If not set set the value for example if directory structure changing only in db_unique_name. for example,
2. Restart the standby and start the MRP. When you restart standby and start MRP then it clears all the ORLs at standby
provided log_file_name_convert set properly.
Database altered.
Tempfiles created after standby creation will not be propagated to standby. Check the TEMP files using below query and add
new TEMP files at standby is required.
NOTE : For multiple Standby environment make sure all the standby in SYNC with primary.
SWITCHOVER VERIFY command returns ORA-16475 when log_archive_dest_n is not set on Standby as follows.
Enable tracing on both primary and standby to diagnose in case of any issue.
* NOTE : In RAC environment no need to shutdown all instances apart from one instanc. Switchover(SQLPLUS) comand
itself shutdown all the nodes.
Primary-Boston,
Database altered.
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY [Process Id: 3340] (boston)
Switchover End-Of-Redo Log thread 1 sequence 11 has been fixed <---------Sequence 11 is End-Of-Redo
SWITCHOVER: received request 'ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY' from primary database.
NOTE: At standby side we wait only for 15 minutes for the standby to synchronous with primary.
SQL>shut abort
SQL>startup
The scenario worked, but after switchover completed, the Database Role in the OCR is not changed automatically.
We need use [srvctl modify database] to change Database Role in the OCR according to real database role.
#sqlplus / as sysdba
SQL> select DB_UNIQUE_NAME,DATABASE_ROLE from v$database;
DB_UNIQUE_NAME DATABASE_ROLE
------------------------------
chicago PRIMARY
#sqlplus / as sysdba
SQL> select DB_UNIQUE_NAME,DATABASE_ROLE from v$database;
DB_UNIQUE_NAME DATABASE_ROLE
------------------------------
boston PHYSICAL STANDBY
System altered.
Verify that the new primary shipping logs to standby and standby is applying.
@primary,
@standby,
NOTE : For Oracle version 12.2 use v$dataguard_process instead of v$managed_standby which is deprecated in Oracle 12.2
Didn't find what you are looking for? Ask in Community...
Related
Products
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Exadata Service > Oracle Database Cloud Exadata Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Cloud Schema Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Exadata Express Cloud Service
Oracle Cloud > Oracle Platform Cloud > Oracle Database Cloud Service > Oracle Database Cloud Service
Oracle Database Products > Oracle Database Suite > Oracle Database > Oracle Database - Enterprise Edition > Oracle Data Guard > Switchover
Oracle Cloud > Oracle Platform Cloud > Oracle Database Backup Service > Oracle Database Backup Service
Oracle Cloud > Oracle Infrastructure Cloud > Oracle Cloud at Customer > Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine)
Oracle Cloud > Oracle Platform Cloud > Oracle Cloud Infrastructure - Database Service > Oracle Cloud Infrastructure - Database Service
Keywords
12C; DATA GUARD; DATAGUARD; PHYSICAL STANDBY; STANDBY; SWITCHOVER
Errors
ORA-16470; ORA-16475
Translations
Back to Top
Copyright (c) 2023, Oracle. All rights reserved. Legal Notices and Terms of Use Privacy Statement