Home » Server Options » Streams & AQ » Confusion in Bidrirectional Stream replication (oracle 10g, 10.2.0.3.0 on linux 64 bit)
Confusion in Bidrirectional Stream replication [message #388406] Tue, 24 February 2009 10:42 Go to next message
MIFI
Messages: 256
Registered: February 2008
Location: U.K.
Senior Member
Hi,
I have a confusion related to bidrectional Oracle schema stream replication.

If Capture, propogation and apply process running on both servers(Production and Destination), then when there is an update in Schema in production the change will be captured and propogated from Production to destination server and Applied to destination server.

When the change applied to destination server, The destination server capture the same change again and propogate the same to Production server, which production server will apply again.

Could you please help me in understanding that how the change applied in destination is not captured and propogated again to production server.


Re: Confusion in Bidrirectional Stream replication [message #388529 is a reply to message #388406] Wed, 25 February 2009 03:57 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member

Good Question...

I'm considering your question to Advanced Replication concept. Let's take there are two server "Source-A" And "Destination-B"

If you configure; Bi-Direction replication/streams; you need to configure "Conflict Resolution"

What's Conflict Resolution?

I hope there are some method/type available in conflict resolution; If any changes happen (DML) in source and destination. Replication/Streams Consider "most recent changes" (This is one of method in replication); As per most recent updated data's transfer to source/destination server.

I am requesting to you; you need to look conflict resolution in streams...

Babu

Re: Confusion in Bidrirectional Stream replication [message #388598 is a reply to message #388529] Wed, 25 February 2009 10:46 Go to previous messageGo to next message
MIFI
Messages: 256
Registered: February 2008
Location: U.K.
Senior Member
Hi,
You are right that conflict resolution is for bidirection replication but i am confused due to the data coming from production to destination will be inserted in destination and it will change the log file and that change will be captured by the capture process in destination server then same change will be sent again from destination to production again where production will or will not apply the change if there is any conflict resolution but this thing will be taking twice processing time in production first in sedning the original change and other in receiving the same change from destination and checking conflict resolution.

[Updated on: Wed, 25 February 2009 10:50]

Report message to a moderator

Re: Confusion in Bidrirectional Stream replication [message #388608 is a reply to message #388598] Wed, 25 February 2009 11:47 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member


Please let us know; what type of conflict resolution did you configured??

http://download.oracle.com/docs/cd/B19306_01/server.102/b14228/conflict.htm#i1006168
Re: Confusion in Bidrirectional Stream replication [message #389107 is a reply to message #388608] Fri, 27 February 2009 05:32 Go to previous messageGo to next message
MIFI
Messages: 256
Registered: February 2008
Location: U.K.
Senior Member
I did not set any conflict resoultion, but i think you did not understand my question.

I know the conflict reolution can be used for update delete and insertion conflicts if the transactions applied simultaneously,but i have a different question.

I have production database and destination database, data can be replicated from p-->d and d-->p, conflict resolution solves the problem when the one transaction simultaneously performed. i am not talking about that.

If for example transaction is only performing on production then it will be replicated to Destination.

Now my question is that if there is no chance of any conflict destination server receives the transaction and apply it my confusion is when it apply the transaction received from production by apply process, it will create the change in redo log that change will be captured as a change in destination server and propogated again to production server.

I was confused because the production server will process the transaction twice or it will be never ending cycle of single transaction, how destination server come to know that this transaction is coming from production and it only needs to be applied and there is no need to capture it again.

[Updated on: Fri, 27 February 2009 05:36]

Report message to a moderator

Re: Confusion in Bidrirectional Stream replication [message #389693 is a reply to message #389107] Tue, 03 March 2009 04:08 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member


I think your talking about only basic replication/streams NOT Advanced.

AS per your requirement; When ever changes happen in master site that data's releated to MV/Stream Site.

Like; In your case; If you done any changes in production box; those data's automatically/manual transfer to destination server throw redo log.

>>I was confused because the production server will process the transaction twice or it will be never ending cycle of single transaction, how destination server come to know that this transaction is coming from production and it only needs to be applied and there is no need to capture it again.

Once again can you explain me the above question.

Babu


Re: Confusion in Bidrirectional Stream replication [message #389988 is a reply to message #389693] Wed, 04 March 2009 07:56 Go to previous messageGo to next message
MIFI
Messages: 256
Registered: February 2008
Location: U.K.
Senior Member
Babu,
Thanks for your interest in solving my problem
Its alright, i have come to know about it.
I was using bidirectional oracle stream replication and was worried about change cycle and in book it is written that whenever there is a change locally it will be in redo log with null tag so capture process will only capture those changes in redo log which have null tags on the other hand when Apply process apply it will apply the change with tag '00' so this change will not be picked by capture process again so the change will not be sent to originating site again.

Regards,
Re: Confusion in Bidrirectional Stream replication [message #390010 is a reply to message #389988] Wed, 04 March 2009 09:56 Go to previous messageGo to next message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member


Thanks for your feedback.

Requesting to you; Can you explain me with more details.
Re: Confusion in Bidrirectional Stream replication [message #390220 is a reply to message #390010] Thu, 05 March 2009 08:53 Go to previous messageGo to next message
MIFI
Messages: 256
Registered: February 2008
Location: U.K.
Senior Member
To Explain,
For example you have two databases A and B. Replication is bidirectional means from A to B and From B to A.

There are three main processes in Oracle Stream replication

1)Capture
2)Propagation
3)Apply

In Bidirectional replication above processes will be running in both the server A and B.

Change in A will be captured in its redo logs when the redo log entry is with null tag by default, if we use dbms_streams_adm to create schema or table rule for oracle stream and whenever there is a change in A this change is captured and changed into LCR (Logical Change record) with null tag and then Propagation will pick the null tag lcr and place it in Queue and send it to destination server 'B' queue.
Apply process in Server B picks up the lcr and Apply change to server B and change goes into redo log of server B with TAG 00.

My question was that when the Apply process apply change to server B, this change will also go to redo log and as it is Bidirectional Replication, Server B Capture process pick up the change again and propagate it back to originating server A.
and it will keep continuing like that

After reading some articles in internet i come to know that this change cycle is not possible if i am using default setting in creating capture, apply and propagation by using dbms_streams_adm and local change will be with null tag so there is no chance of Server B capturing the change coming from its Apply process as that change will be with tag '00'

I hope that it will clear your doubts. If you need any further help please do not hesitate to ask.




[Updated on: Thu, 05 March 2009 09:13]

Report message to a moderator

Re: Confusion in Bidrirectional Stream replication [message #390253 is a reply to message #390220] Thu, 05 March 2009 11:55 Go to previous message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member

>> please do not hesitate to ask.

Razz

Thanks for your explain..

Babu

http://download.oracle.com/docs/cd/B19306_01/server.102/b14228/rep_tags.htm#i1007387

[Updated on: Thu, 05 March 2009 12:19]

Report message to a moderator

Previous Topic: AQ
Next Topic: Streams configuration without Database links
Goto Forum:
  


Current Time: Mon Dec 22 14:54:07 CST 2014

Total time taken to generate the page: 0.12319 seconds