Home
 | 
Articles
 | 
High Availability
 | 
Dataguard Switchover in 12c
 | 
Dataguard Switchover in 12c
 
Last modified: June 2017
Recent Article
All Archives
Topics
Comments 
by ShanNura
»»
Switchover is a two way process in Oracle Dataguard and is a role reversal between the Primary database and one of its Standby databases. This way of role transition where the current Primary database starts behaving as a Physical Standby and on the other hand the current Physical Standby database starts behaving as a Primary database. Bystander standbys will receive redo from the new primary database.
Standby databases not involved in the switchover (known as bystander standby databases) continue operating in the state they were in before the switchover occurred and will automatically begin applying redo data received from the new primary database.
Switchover in 12c is still the same, but new features have been incorporated and the usage of the "switchover commands" have in a great change. A switchover guarantees no data loss and is typically done for planned maintenance of the primary system. During a switchover, the primary database transitions to a standby role, and the standby database transitions to the primary role.
Verify the target is ready for switchover
Oracle has introduced the "verify" functionality which does not perform the switchover but does verify if the switchover can be performed to the target standby database. "verify" does the following:
  • the Redo shipping from the primary to the standby database
  • checks if Managed Recovery Process (MRP) is running on the standby
  • and finally checks if the standby database is in sync with the primary
For example,

SQL> alter database switchover to <db_unique_name_of_target_standby> verify;
SQL>
sys@phoenix> alter database switchover to unicorn verify;    
alter database switchover to unicorn verify
*
ERROR at line 1:
ORA-16470: Redo Apply is not running on switchover target
This indicates that Redo Apply (MRP) is not running on the target standby database ('unicorn'). A copy of the error message will also be written on the alert log file and necessary action can be taken up.
Another example,
SQL>
sys@phoenix> alter database switchover to unicorn verify;    
alter database switchover to unicorn verify
*
ERROR at line 1:
ORA-16467: switchover target is not synchronized
This time, the standby database is not in sync with the primary database for the switchover to take place. So, we must sort out the error(s) before we can execute the actual command to do the switchover. Let's consider, we have fixed all the errors reported by 'verify' command.
Another example,
SQL>
sys@phoenix> alter database switchover to unicorn verify;    
ERROR at line 1:
ORA-16475: succeeded with warnings, check alert log for more details
The warnings indicated by the ORA-16475 error may affect switchover performance. If you check the alert log, you will see messages similar to the following:

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.
You can fix the problems or if switchover performance is not important, those warnings can be ignored. After making any fixes you determine are necessary, issue the following SQL statement again:
SQL>
sys@phoenix> alter database switchover to unicorn verify;    
Database altered.
This time, we are good to proceed with the switchover. The alert log on the primary database would indicate as below:

2017-06-17T22:22:29.991917+02:00
alter database switchover to unicorn verify
2017-06-17T22:22:30.451440+02:00
SWITCHOVER VERIFY: Send VERIFY request to switchover target UNICORN
SWITCHOVER VERIFY COMPLETE: READY FOR SWITCHOVER
Completed: alter database switchover to unicorn verify
Initiate the switchover on the primary database
Until 11.2, the syntax of the switchvoer from the primary to physical standby used to be as "SQL> alter database commit to switchover to physical standby with session shutdown;" and then on the standby server, we had to switchover the physical standby to primary database which required us to execute "SQL> alter database commit to switchover to primary with session shutdown;" commands, but with 12c, it’s a single command that does everything for us.
SQL>
sys@phoenix SQL> alter database switchover to unicorn;
ERROR:
ORA-01034: ORACLE not available
Process ID: 4337
Session ID: 51 Serial number: 8809

Database altered.
Note: The former primary database (phoenix) instance is shutdown automatically.
If an error occurs, mount the old primary database (PHOENIX) and the old standby database (UNICORN). On both databases, query DATABASE_ROLE from V$DATABASE. Possible combinations are:

1. PHOENIX (PRIMARY), UNICORN (STANDBY): 
   switchover failed meaning roles not changed. Check the error and repeat the switchover


2. PHOENIX (STANDBY), UNICORN (STANDBY): 
   UNICORN failed to convert to primary role. Using 'FORCE' to convert either PHOENIX or 
   UNICORN to a primary database, for example:

   In PHOENIX:
   SQL> alter database switchover to phoenix force;

   In UNICORN:
   SQL> alter database switchover to unicorn force;

   If it fails with 'ORA-16473', restart Redo Apply 
   (SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT;), 
   before reissuing SWITCHOVER command.

   
3. PHOENIX (STANDBY), UNICORN (PRIMARY): 
   Databases have successfully switched to their new roles.
This is how the alert log on the primary database would look like. The EOR (End Of Redo) is generated at sequence 69.
$<>  
2017-06-17T22:25:51.185890+02:00
alter database switchover to unicorn
2017-06-17T22:25:51.185938+02:00
The Time Management Interface (TMI) is being enabled for role
transition information.  This will result in messages being
output to the alert log file with the prefix 'TMI: '.  This is
being enabled to make the timing of the various stages of the
role transition available for diagnostic purposes.  This
output will end when the role transition is complete.
TMI: dbsdrv switchover to target BEGIN 2017-06-17 22:25:51.186181
Starting switchover [Process ID: 4337]
TMI: kcv_switchover_to_target convert to physical BEGIN 2017-06-17 22:25:51.546741
2017-06-17T22:25:51.546961+02:00
ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY [Process Id: 4337] (phoenix)
Waiting for target standby to receive all redo
2017-06-17T22:25:51.552279+02:00
Waiting for all non-current ORLs to be archived
2017-06-17T22:25:51.554240+02:00
All non-current ORLs have been archived
2017-06-17T22:25:51.554289+02:00
Waiting for all FAL entries to be archived
2017-06-17T22:25:51.554337+02:00
All FAL entries have been archived
2017-06-17T22:25:51.554394+02:00
Waiting for LAD:2 to become synchronized
2017-06-17T22:25:52.560445+02:00
Active, synchronized Physical Standby switchover target has been identified
Preventing updates and queries at the Primary
2017-06-17T22:25:53.566243+02:00
Generating and shipping final logs to target standby
Switchover End-Of-Redo Log thread 1 sequence 69 has been fixed
Switchover: Primary highest seen SCN set to 0x00000000001aa874
ARCH: Noswitch archival of thread 1, sequence 69
ARCH: End-Of-Redo Branch archival of thread 1 sequence 69
ARCH: LGWR is scheduled to archive to LAD:2 after log switch
ARCH: Standby redo logfile selected for thread 1 sequence 69 for destination LOG_ARCHIVE_DEST_2
ARCH: Archiving is disabled due to current logfile archival
Primary will check for some target standby to have received all redo
Waiting for target standby to apply all redo
Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/phoenix/phoenix/trace/phoenix_ora_4337.trc
Converting the primary database to a new standby database
Clearing standby activation ID 255539112 (0xf3b37a8)
The primary database controlfile was created using the
'MAXLOGFILES 16' clause.
There is space for up to 13 standby redo logfiles
Use the following SQL commands on the standby database to create
standby redo logfiles that match the primary database:
ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 209715200;
ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 209715200;
ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 209715200;
ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 209715200;
Archivelog for thread 1 sequence 69 required for standby recovery
Switchover: Primary controlfile converted to standby controlfile succesfully.
Switchover: Complete - Database shutdown required
TMI: kcv_switchover_to_target convert to physical END 2017-06-17 22:25:54.530023
Sending request(convert to primary database) to switchover target UNICORN
2017-06-17T22:26:01.419244+02:00
Switchover complete. Database shutdown required
USER (ospid: 4337): terminating the instance
2017-06-17T22:26:02.484136+02:00
Instance terminated by USER, pid = 4337
TMI: dbsdrv switchover to target END 2017-06-17 22:26:02.484250
Completed: alter database switchover to unicorn
Shutting down instance (abort) (OS id: 4337)
License high water mark = 8
2017-06-17T22:26:02.712828+02:00
Instance shutdown complete (OS id: 4337)
At the standby end, the alert log would read as:
$<>  
2017-06-17T22:25:55.227817+02:00
RFS[4]: Assigned to RFS process (PID:11078)
RFS[4]: Selected log 5 for T-1.S-69 dbid 255095838 branch 946754787
2017-06-17T22:25:55.540961+02:00
Resetting standby activation ID 255539112 (0xf3b37a8)
2017-06-17T22:25:55.546792+02:00
Media Recovery End-Of-Redo indicator encountered
2017-06-17T22:25:55.546896+02:00
Media Recovery Continuing
2017-06-17T22:25:55.553503+02:00
Archived Log entry 63 added for T-1.S-69 ID 0xf3b37a8 LAD:1
2017-06-17T22:25:55.612009+02:00
Media Recovery Waiting for thread 1 sequence 70
2017-06-17T22:25:55.842872+02:00
The Time Management Interface (TMI) is being enabled for role
transition information.  This will result in messages being
output to the alert log file with the prefix 'TMI: '.  This is
being enabled to make the timing of the various stages of the
role transition available for diagnostic purposes.  This
output will end when the role transition is complete.
SWITCHOVER: received request 'ALTER DTABASE COMMIT TO SWITCHOVER  TO PRIMARY' from primary database.
2017-06-17T22:25:55.846409+02:00
ALTER DATABASE SWITCHOVER TO PRIMARY (unicorn)
Maximum wait for role transition is 15 minutes.
TMI: kcv_commit_to_so_to_primary wait for MRP to finish BEGIN 2017-06-17 22:25:55.847229
Switchover: Media recovery is still active
Role Change: Canceling MRP - no more redo to apply
2017-06-17T22:25:55.880402+02:00
MRP0: Background Media Recovery cancelled with status 16037
2017-06-17T22:25:55.901212+02:00
Errors in file /u01/app/oracle/diag/rdbms/unicorn/unicorn/trace/unicorn_pr00_8060.trc:
ORA-16037: user requested cancel of managed recovery operation
Managed Standby Recovery not using Real Time Apply
Recovery interrupted!
2017-06-17T22:25:56.069369+02:00
Errors in file /u01/app/oracle/diag/rdbms/unicorn/unicorn/trace/unicorn_pr00_8060.trc:
ORA-16037: user requested cancel of managed recovery operation
2017-06-17T22:25:56.171015+02:00
MRP0: Background Media Recovery process shutdown (unicorn)
2017-06-17T22:25:56.863163+02:00
Role Change: Canceled MRP
TMI: kcv_commit_to_so_to_primary wait for MRP to finish END 2017-06-17 22:25:56.864499
TMI: kcv_commit_to_so_to_primary Switchover from physical BEGIN 2017-06-17 22:25:56.867737
Killing 3 processes (PIDS:11066,7640,7647) (all RFS) in order to disallow current and future RFS connections. Requested by OS process 11082
2017-06-17T22:25:57.889054+02:00
Errors in file /u01/app/oracle/diag/rdbms/unicorn/unicorn/trace/unicorn_clmn_7326.trc:
ORA-19816: WARNING: Files may exist in db_recovery_file_dest that are not known to database.
2017-06-17T22:25:57.889467+02:00
*************************************************************
WARNING: A file of type ARCHIVED LOG may exist in
db_recovery_file_dest that is not known to the database.
Use the RMAN command CATALOG RECOVERY AREA to re-catalog
any such files. If files cannot be cataloged, then manually
delete them using OS command. This is most likely the
result of a crash during file creation.
*************************************************************
2017-06-17T22:25:58.882882+02:00
Stopping Emon pool
Dispatchers and shared servers shutdown
CLOSE: killing server sessions.
Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7365 user 'grid' program 'oracle@olinux7302.shannura.com (SVCB)', waiting for 'wait for unread message on broadcast channel'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7365 user 'grid' program 'oracle@olinux7302.shannura.com (SVCB)', waiting for 'wait for unread message on broadcast channel'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7365 user 'grid' program 'oracle@olinux7302.shannura.com (SVCB)', waiting for 'wait for unread message on broadcast channel'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7365 user 'grid' program 'oracle@olinux7302.shannura.com (SVCB)', waiting for 'wait for unread message on broadcast channel'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7365 user 'grid' program 'oracle@olinux7302.shannura.com (SVCB)', waiting for 'wait for unread message on broadcast channel'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7365 user 'grid' program 'oracle@olinux7302.shannura.com (SVCB)', waiting for 'wait for unread message on broadcast channel'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

2017-06-17T22:25:59.939763+02:00
Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7392 user 'grid' program 'oracle@olinux7302.shannura.com (W000)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 7396 user 'grid' program 'oracle@olinux7302.shannura.com (W001)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 8095 user 'grid' program 'oracle@olinux7302.shannura.com (W002)', waiting for 'Space Manager: slave idle wait'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

2017-06-17T22:26:01.030935+02:00
Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

2017-06-17T22:26:02.055406+02:00
Active process 7718 user 'grid' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

Active process 7912 user 'oracle' program 'oracle@olinux7302.shannura.com (TNS V1-V3)', waiting for 'SQL*Net message from client'

CLOSE: all sessions shutdown successfully.
Stopping Emon pool
Backup controlfile written to trace file /u01/app/oracle/diag/rdbms/unicorn/unicorn/trace/unicorn_rmi_11082.trc
SwitchOver after complete recovery through change 1747060
Online logfile pre-clearing operation disabled by switchover
Online log +DATA/UNICORN/ONLINELOG/group_1.263.946760639: Thread 1 Group 1 was previously cleared
Online log +FRA/UNICORN/ONLINELOG/group_1.257.946760641: Thread 1 Group 1 was previously cleared
Online log +DATA/UNICORN/ONLINELOG/group_2.262.946760647: Thread 1 Group 2 was previously cleared
Online log +FRA/UNICORN/ONLINELOG/group_2.314.946760651: Thread 1 Group 2 was previously cleared
Online log +DATA/UNICORN/ONLINELOG/group_3.261.946760655: Thread 1 Group 3 was previously cleared
Online log +FRA/UNICORN/ONLINELOG/group_3.313.946760659: Thread 1 Group 3 was previously cleared
Standby became primary SCN: 1747058
The Time Management Interface (TMI) is being enabled for role
transition information.  This will result in messages being
output to the alert log file with the prefix 'TMI: '.  This is
being enabled to make the timing of the various stages of the
role transition available for diagnostic purposes.  This
output will end when the role transition is complete.
Network throttle feature is disabled as mount time

Switchover: Complete - Database mounted as primary
TMI: kcv_commit_to_so_to_primary Switchover from physical END 2017-06-17 22:26:02.501831
SWITCHOVER: completed request from primary database.
Open the new primary database
With target database now mounted (unicorn), we can open it to serve as new primary.
SQL>
sys@unicorn SQL> alter database open;

Database altered.
Let’s check the status of the databases. The former standby database (unicorn) is now behaving as a Primary database.
SQL><>  
sys@unicorn SQL> select status,instance_name,database_role from v$database,v$instance;

STATUS       INSTANCE_NAME    DATABASE_ROLE
============ ================ ================
OPEN         unicorn          PRIMARY

1 row selected.
Mount or Open (Active Data Guard) the new Standby Database
Former Primary database (phoenix) is now down which we can startup to behave as a Physical standby database.
$
[oracle@olinux7301 scripts]$ srvctl start database -database phoenix
SQL>
sys@phoenix SQL> select status,instance_name,database_role from v$database,v$instance;

STATUS       INSTANCE_NAME    DATABASE_ROLE
------------ ---------------- ----------------
OPEN         phoenix          PHYSICAL STANDBY

1 row selected.
Start Redo Apply on the new physical standby database
Let’s start the MRP on the new standby database.
SQL>
sys@phoenix SQL> recover managed standby database disconnect from session;
Media recovery complete.
SQL>
sys@phoenix SQL> select process,status,sequence# from v$managed_standby;

PROCESS   STATUS        SEQUENCE#
--------- ------------ ----------
ARCH      CONNECTED             0
DGRD      ALLOCATED             0
DGRD      ALLOCATED             0
ARCH      CONNECTED             0
ARCH      CONNECTED             0
ARCH      CONNECTED             0
ARCH      CLOSING              71
ARCH      CONNECTED             0
RFS       RECEIVING            72
ARCH      CONNECTED             0
ARCH      CONNECTED             0
RFS       IDLE                  0
RFS       IDLE                  0
MRP0      APPLYING_LOG         72
DGRD      ALLOCATED             0

15 rows selected.
It could be seen that Managed Recovery Process (MRP) is now running on the new standby database "phoenix" with sequence 72 being applied.
A few more manual switches to test if everything is working fine. Now, at the new primary (unicorn)...
SQL>
sys@unicorn SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     70
Next log sequence to archive   72
Current log sequence           72
sys@unicorn SQL> alter system archive log current;
sys@unicorn SQL> /
sys@unicorn SQL> /
At the standby site (phoenix), the sync is working as expected.
SQL><>  
sys@phoenix SQL> @_last_sync1

// 17-jun-2017 22:50:11, sys@PHOENIX (269) //
// *** LAST SYNC STATUS *** //
_______________________________________________________________________________________________________________________________


   THREAD# SEQ# RECEIVED SEQ# APPLIED FIRST_CHANGE#                      NEXT_CHANGE#                             DIFF
========== ============= ============ ================================== ================================== ==========
         1            74           73 1748584 (17-JUN-2017 22:49:43)     1748592 (17-JUN-2017 22:49:45)              1



   THREAD# SEQ# RECEIVED APPLIED      FIRST_CHANGE#                      NEXT_CHANGE#                       ARCHIVED  DELETED
========== ============= ============ ================================== ================================== ========= =========
         1            74 IN-MEMORY    1748592 (17-JUN-2017 22:49:45)     1748598 (17-JUN-2017 22:49:46)     YES       NO
On a note, the physical standby database need not have to be in MOUNT state for switchover to be performed. In this case, Active Dataguard was in place (in OPEN READ ONLY MODE with APPLY), it was still possible to perform the switchvoer and not necessary to have them in MOUNT state.
Please write your comment if this article was useful.

ShanNura

/
You might want to read this:
Dataguard Failover in 12c