1
  1. Consider a 3 node (N1, N2, N3) system
  2. N1 is master (used for writes) and N2, N3 (used for reads) are slaves
  3. Write request comes to update R to R1, N1 writes to disk and crashed without replication
  4. Will system continue to work and Oracle select the another master automatically?
  5. Write request comes to update R to R2 on N2
  6. N1 is back again

Which value will be kept - R1 or R2?

I am using Oracle as RDBMS.

  • 1
    Advanced Replication? Streams? GoldenGate? Where is the commit? Did you implement the necessary conflict handlers? – Balazs Papp Jun 28 '18 at 17:39
  • @BalazsPapp Right now I am using RAC in prod. Can you please let me know which is most commonly used replication model in prod environment and answer this question considering that replication model ? – emilly Jun 30 '18 at 11:01
0

It depends on exactly how the "replication" is set up.

Real Application Cluster

N1,N2,N3 are the three nodes of a RAC cluster.

In a RAC system, all nodes are "masters". You just choose to do READ-ONLY session on the other two.

  1. DML operation on Node 1 tries to set R to R1
  2. Node 1 crashes
  3. Transparent Application Failover fails the connection from Node 1 to Node 2 (or Node 3).
  4. The DML is "rolled back and tried again" on Node 2.
  5. DML on Node 2 attempts to change R to R2 (but value is now R1).

Logical Standby

  1. DML operation on Node 1 tries to set R to R1
  2. Node 1 crashes
  3. DML on Node 2 attempts to change R to R2.
    • DML on Node 2 fails since Logical Standbys can only be opened as READ ONLY
    • Starting with 18c, You can only do DML on Temp Table.
  4. At some point in time, DBAs set the Logical Standby as the primary.
    • If the change log was successful in writing, this change might be applied to the standby database.

Golden Gate

  1. DML operation on Node 1 tries to set R to R1
  2. Node 1 crashes before it completes the COMMIT process.
  3. DML on Node 2 attempts to change R to R2.
    • Since Node 2 is a separate Database, this DML succeeds.
  • 1
    RAC is not replication, nodes access shared data. TAF is not able to replay DML operations, that feature is available in Application Continuity starting with 12c. Logical standby databases can be opened as READ WRITE. DML on temp tables is possible starting with 12c. – Balazs Papp Jun 28 '18 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.