We have a requirement, where we need test the Fail over on production database. Currently we have 18.104.22.168 on Linux as production and same on another machine as Standby. We did not enabled DG Broker and Flashback in any databases. I want below information:
1) How to test failover with out DG Broker and Flashback in any databases?
2) How to enable both DG broker and Flashback and test failover with DG Broker and Flashback?
3) How can i revert back the changes after Failover i.e., i want to see the production as production and standby as standby like earlier.
Thanks a lot in advance.
For question 1 you can start with this:
For question 2 you can start with this:
Question 3 is cover by the link in question 1. You can also use RMAN instead of flashback.
I would consider thinking long and hard about failover and setup a test system for it Ask yourself a few questions
Can I do a switchover instead?
How long can I be down and how much time will it take to recover from a failover?
Does the business really need a failover option?
Thanks a lot for your reply. I see the notes and they are helpful for me.
I want to go with the "http://www.visi.com/~mseberg/data_guard/Data_Guard_Failover_Test_using_SQL.pdf"
4) How can i enable flash back in both the databases?
Change parameters as needed for you system
alter system set db_recovery_file_dest_size=20g;
alter system set db_recovery_file_dest=' /u01/app/oracle/fast_recovery_area';
SQL> shutdown immediate
SQL> startup mount
SQL> alter system set db_flashback_retention_target=2880;
--flashback to be retained for two days
SQL> alter database flashback on;
SQL> alter database open; ( Not on the Standby side of course )
set linesize 200
SQL> select * from v$flashback_database_log;
Thanks for your timely reply.
After understanding your first Update i.e., risks involved in this Fail over testing in Production. Now in my mind, have a plan like below.
1) I will shut down the Production(Just to Stimulate the Disaster recovery situation). And will convert the standby as Primary.
2) Once testing is done(Pointing application to New Primary) , can bring up the old primary as primary and re-build the standby by erasing New prod.
3) Sync the DR with Primary.
By this away i feel no risks involved !!
Please suggest if am missing any thing here. Also i would like to know "Is there any fast method to re-build the standby.".
PS: We don't have Broker and Flashback enabled in Prod & DR environments.
Appreciate your response on this.
Sorry for the delayed Update. I got clear requirement from client. Please see below.
Let's Say :
Production -- Pr
Standby - Dr
1) Client will disconnect the network cable to Production(Pr).
2) Then we need to convert the Dr to Production.
3) Client will update some sql's in New Prod(Dr).
4) Client will connect the cable to Production (Pr).
5) He want to see those updates to be reflected in Production (Pr).
Please suggest me how to achieve this requirement. And for ease re-instating i want to use DG Broker as mentioned in earlier update.
Appreciate your reply on this.
You need to write up a plan and test, test, test in advance.
Once you perform Failover you have to recover the former Primary to a state where it can become the Standby for the new Primary.
it then need to catch up until it's back in sync with the new Primary. Make sure you have a way to test this.
Consider doing a switchover and back first to shake out any possible broker issues.
Review these documents as insurance:
Step by Step How to Create Dataguard Broker Configuration (Doc ID 984622.1)
11.2 Data Guard Physical Standby Switchover Best Practices using the Broker (Doc ID 1305019.1)
Write the entire process up as a step by step plan and include what you will do if a step fails.
Oracle document E17023-06 is a good source of information ( chapter 5 for example )
5.1 Overview of Switchover and Failover in a Broker Environment
5.4 Manual Failover