This content has been marked as final. Show 6 replies
I want to ask you something.Do you face this situation or you are assuming that this situation may occur?.when you do switch over that means you are switching the roles of your database and that means that the primary database will be standby and the standby will be primary.
If you are trying to do this and meet an error then the switch over is not complete and you have to recover from the situation/Error.The errors vary from database to another but that means that the primary will stay as it is and the standby will stay as it is.
General guidelines to follow from the documentation before doing the switch over:
Please have a look at the part 5.3.1 Before You Perform a Switchover Operation
Well, I was asked this question in an interview and I cross questioned him "What is the error?". He said that the error is irrelevant and you have to give me back a Primary database in minimum time.
Since the original primary is now converted to a standby database and the old standby database is not getting converted to Primary database, so what steps I will have to do to get a Primary database in minimum time, at this moment even if I do not have a standby database that will do as per the interviewer.
This is my concern, finding the error is secondary which I can dig once my Primary is back.
In a nutshell, I just want to know if in the middle of a switchover that I have to perform in a time constrain, if my switchover fails as I have explained above. What approach or steps that I have to take to undo the swicthover or at least get my Primary back.
Hope it calirifes.
If you are at the point where you have two Standby's then you can perform this on the Primary :
1. alter database commit to switchover to primary;
2. shutdown immediate
4. Set system set log_archive_dest_state_2=enable to enable as needed.
So instead of moving forward, you perform steps 1 - 4 on the Primary you were about to convert to the new standby.
You may have to shutdown the Standby and restart the apply there depending upon where you error out.
I told the same procedure to the interviewer but he disagreed.
One more method that I can think of is as follows:
1.As now we have two standby database, I will keep the old standby as it is and at the new standby database (X-primary), I will activate it
alter database activate standby database;Take a bounce and start the database in open mode, so I will have a primary and my standby database is already there. This seems like an interim solution but I am not sure.
Mine is based on a test.
So he can disagreed, but he'd be wrong. Have tested this twice on both Oracle 10 and 11.
But then, he's just an interviewer. Still have doubts? Test it yourself. I ran into this on a few of my swtchover test and this is how I recovered.
Sorry you are dealing for such a hard case.