Link to home
Start Free TrialLog in
Avatar of marrowyung
marrowyung

asked on

oracle DR - data guard failover.

hi,

I am waiting this: https://www.youtube.com/watch?v=42J56mB_JNY.

what is the diff betwee:
1) failover and switch over command, it looks the same ?
2) when we use convert?
3) when we use reinstate ?
Avatar of johnsone
johnsone
Flag of United States of America image

I would highly recommend checking out the documentation here.

Switchover vs failover

Not sure what you mean by convert as it can have a couple meanings, but this is probably what you are looking at.

I don't see a reference to reinstate command in the documentation, and I'm not familiar with that.  Could be having to do with recreating a primary/standby after failover, but I don't know.  The concept documentation is actually very good, you'll learn a lot more from that than you will a video.
Avatar of marrowyung
marrowyung

ASKER

how about reinstate ?
As per the last statement in my previous comment, I don't see that in the documentation and I have never done that with data guard.

What is the context?  Whatever it is, I'm sure it is in that document somewhere.
SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's why I couldn't find it.  It is in part of the broker.  We never used that.
ok. let me find out more. I read similar thing before today about when failover and switchback, we need this but some article don't even say that
"Reinstates a database as a new standby database in the broker configuration for the current primary database."

actually don't quite understand what this mean and what it is going to do on failover to commmand/operation.

the procedure I read on failover don't need reinstates
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
"then the broker can failover to the Standby database and make it as the new Primary. This can also be achieved using an observer which makes to it failover automatically thereby making it transparent for the application without any downtime for application services. So, the main difference is while trying to failover it is done when Primary has failed due to any reasons and only standby is available. Whereas or switchover both are available.
"

ok, switchover is for situation like primary still here and we can do manual failover while primary DB still here.

failover is a force failover which primary don't looks responsive any more right?
 but the failover is the execute from primary DB, right?

"So coming to the re-instate then. So once the Primary was out of broker due to any reason once it is back up and running then to bring it back to the broker configuration we can use re-instate."

so this mean when primary can't connected at all, from the data guard configuration.  primary DB will disappear from configuration ? that's why when primary back online after we repair it, we need to reinstate it ?

"an observer

what observer component it is ?

"And convert is widely used to change the type of the Datagaurd i.e. from Phyiscal Standby to Logical Standby etc."

why we need to convert like this ? what is the diff between physical and logical standby?
failover is a force failover which primary don't looks responsive any more right?
 but the failover is the execute from primary DB, right?
 
This is done using the dataguard broker prompt "dgmgrl". So does not matter if you are on Primary site or Standby. But if your Primary is not available then you will do from your standby.

so this mean when primary can't connected at all, from the data guard configuration.  primary DB will disappear from configuration ? that's why when primary back online after we repair it, we need to reinstate it ?

Yes. Below link from Uwe Hesse (DG Expert) provides a very good example

https://uhesse.com/2016/09/21/how-to-reinstate-the-old-primary-as-a-standby-after-failover-in-oracle/

"an observer

what observer component it is ?

Observer is a third system which can be in a neutral zone probably on the apps server which can look at both systems Primary and standby. As soon as the Primary goes down it triggers the failover automatically without a DBA needing to manually do it. This keeps the application running without any turbulence and still the database is available to it.

"And convert is widely used to change the type of the Datagaurd i.e. from Phyiscal Standby to Logical Standby etc."

why we need to convert like this ? what is the diff between physical and logical standby?

These are the different types of Standby databases. I think before digging deep into Dataguard topics these basic terms and architecture you must make yourself familiar with. You should go through the Oracle documentation to understand these terms.

Physical Standby - Does only block copy therefore database is not in open mode. You cannot query this database. Redo from Primary is read and applied on the Physical standby block by block replica.

Logical Standby - When you need to use your standby database for some testing purpose then you can use this database in open mode make changes

Snapshot Standby - Again a standby database used for testing purpose. Physical converted to snapshot, then database opened for read write testing purposes. Once testing completed re-converted to physical standby.

Depending upon the various reasons of why you want your standby database we create the different types of Standby databases. So, you need to know for what purpose are you building it.

To understand mode check this link

https://docs.oracle.com/cd/B28359_01/server.111/b28294/standby.htm#i50975
"Observer is a third system which can be in a neutral zone probably on the apps server which can look at both systems Primary and standby. As soon as the Primary goes down it triggers the failover automatically without a DBA needing to manually do it.

so it seems a failover broker or witness of the failover operatoin, rihgt? it has to know any of the node is not responding.

observer is the name of that component ?


"Logical Standby - When you need to use your standby database for some testing purpose then you can use this database in open mode make changes"

but this is read only DB ?

"Snapshot Standby - Again a standby database used for testing purpose. Physical converted to snapshot, then database opened for read write testing purposes. Once testing completed re-converted to physical standby."

I think it is a clone of the primary dB only ? so that's why read write is ready on that server.
observer is the name of that component ?

Yes.

Logical Standby -
but this is read only DB ?

It depends upon your use case. The major difference between Physical standby and Logical Standby is that Physical standby does a redo apply which means an exact block by block copy as that of Primary. So, you can treat it as a xerox copy of Primary that is why you cannot read or write to it. As an exception to reading you have to convert to Active Dataguard then only you can read it, but under no circumstances you can write to a Physical standby.

However Logical standby by default is read only as it is still replicating from Primary as the exact copy. Only difference is that other than the objects existing on Primary you can create additional objects and carryout even write operations on those new objects. Also the method of replication here is not redo apply but logmining and converting it to individual DML statements. So, the architecture changes. So, you can have read write Logical sby, whereas you can never have a write Physical Sby and a read Sby is possible as a ADG.

Snapshot Standby -
I think it is a clone of the primary dB only ? so that's why read write is ready on that server.

Kind of as it is one of the cloning solution for carrying out rapid testing.
Actually, you can write to a physical standby.  There are a lot of steps to it, but starting in 10g with flashback being available, it is allowed to write to a physical standby.  This can be used for testing of interesting scenarios on a copy of production without causing issues.  I don't personally recommend it, but it is possible.  This is a pretty good article that explains it for 10g.  I don't think it has changed much for newer versions.

In addition, a logical standby is not read only.  You can do anything you want in a logical standby.  You probably don't want to, but you can.
Hi Johsone,

Sorry to say but I do not agree with you regarding writing to physical standby. As soon as open the database it is no more physical standby, it becomes a snapshot standby. In 10g they did not in built the functionality so you had to do this workaround, but now from the broker you can do the same without manually undertaking those steps and oracle handles for itself.

Also please observe I have not said Logical standby is only read only I have mentioned "So, you can have read write Logical sby, whereas you can never have a write Physical Sby and a read Sby is possible as a ADG."

Hope you agree to what I said already above.
johnsone,

"In addition, a logical standby is not read only.  You can do anything you want in a logical standby.  You probably don't want to, but you can."

but that logical standby should separate from the production network and should be risk free? from your point of view, why we don't want to do that?
tks guys, but can the last part of question get answered ?
hi,


anyone can answer this:

but that logical standby should separate from the production network and should be risk free? from your point of view, why we don't want to do that?
"This is done using the dataguard broker prompt "dgmgrl". So does not matter if you are on Primary site or Standby. But if your Primary is not available then you will do from your standby."

"Observer is a third system which can be in a neutral zone probably on the apps server which can look at both systems Primary and standby. As soon as the Primary goes down it triggers the failover automatically without a DBA needing to manually do it."

 so we need observer anyway and it is part of Oracle installation and with observer we don't even need to type dgmgrl command to failover at all?
Observer is not mandatory installation, it's just a choice. It is a good option generally for Production Databases. For observer to work you have to enable Fast Start Failover (FSFO) in the datagaurd configuration using dgmgrl. And yes if observer is there you do not need to type command to failover to the SBy site. However if you want to switchover then you still would have to do it via dgmgrl command.
hi.,

" However if you want to switchover then you still would have to do it via dgmgrl command."

so swithover is manually failover from primary to standby while primary is not down?

failover is when primary is down and no choice to make standby the primary role?

that's why if I want to switchover then I still would have to do it via dgmgrl command as it is not about the observer here or not , we want MANUAL failover, which is call switchover?