Switchover and Switchback in 12c

06:56 Feroz Khan 0 Comments



Switchover and Switchback in 12c

                                               


  • Primary Instance Name: PROD
  • Primary Database Name: PROD
  • Primary DB Server Name: prod

  • Standby Instance Name: PRODDR
  • Standby Database Name :PROD
  • Standby DB Server Name:prod_stby


Prechecks:

  • -Both Primary and Standby database should be in SYNC( check MRP process on Standby    database it should be active). 
 
  •  -log_archive_dest_2 is configured on both Primary and Standby databases. 
 
  •  -Create Standby Redo logs on Primary Database ,if not exists.
 
  •  -Check Temp tablespace on Standby, if not exists need to add.



Switchover Steps

Steps:
1) Check the last archive log generated sequence on production database. he last archive log generated sequence on production database.

2) Check the last archive generated on production is applied on standby database  
(On Standby).
3Check the switchover_status  on the production database and it should by TO STANDBY.
(On Primary)
 
4) TO PRIMARY. 
(On Standby)
5) Convert Production database to Standby by executing below command
(On Primary)

After executing above command the production database will shut down.

6) Start the production database instance in mount mode and check the status,it should be standby database ie New Standby Database.


Check status of OLD Primary Database, ie New Standby Database.
7)  Disable archive shipping from old Production(i.e New Standby ) to Standby server.
8) Execute the below command on original standby serverprod_stby) to convert it to production.
9) Open the New Production database in read write mode prod_stby).

10)  Enable the archive shipping from New Production to Standby database and make sure the RFS process is started on standby database.
a)      Enable archive shipping from New Production   b)  Make sure RFS process is started on standby server and archive are getting transferred.

11)   Start Media recovery on the new standby database
a)      Enable media recovery.


b)    Make sure archive are getting applied on standby server


12)   Perform few more log switches and make sure both database are in sync.
      Check the  last archive generated on New Production Database is transferred to the New Standby                database 
13)  Check that the last archive generated on New production is applied on the New Standby database.


Switchback Steps


14) We need to execute above step again to convert the New Production database to standby and New standby database to Production.

Steps: 

a)      Production Database Status.

b)  Standby Database Status.
15 ) Convert the Primary  database to Standby  and start-up in mount state.
16) Convert the Standby database to Production and open in read write mode.


17)  Disable archive shipping from Production to Standby server.

18)  Enable archive shipping from Production to Standby Database and make sure the RFS process is started on standby database.
    a)      Enable archive transfer from Production Server. 
 b)      Make sure RFS is started in standby server.

19) Start the media recovery on Standby database and make sure the archive are getting applied.
     a)      Enable media recovery        b)      Make sure archive are getting applied on standby server.


References:
12c Data guard Switchover Best Practices using SQLPLUS (Doc ID 1578787.1) 





































You Might Also Like

0 comments: