Home » Server Options » Replication » Creative conflict resolution (Oracle 10gR2, Windows Server)
Creative conflict resolution [message #445267] Sat, 27 February 2010 00:08 Go to next message
Brent.Billups
Messages: 2
Registered: February 2010
Junior Member
Hi:

I am new to Oracle Advanced replication. I have replication working as I expect. I am trying to learn how to handle conflict resolution. I have reviewed the sites, and most of the examples seem pretty simple; not exactly what I am looking for.

I would like to be able to use a user defined function to allow merging of values on an update conflict. Under many conditions, some of the columns may be updated by different sites. So if I have columns a, b, and c and the old value was [a1, b1, c1] the current values are [a1, b2, c1] and new values are [a1, b1, c2], I would like the result to be [a1, b2, c2]. I am not clear if this is possible, or how to do it if it is.

The documentation indicates no DDL, no transactions (rollbacks, commits) or altering the system/session. But it isn't clear that we can't update the row, or how to see any values other than the parameter column of the resolution method.

Thanks,
Brent
Re: Creative conflict resolution [message #445268 is a reply to message #445267] Sat, 27 February 2010 02:45 Go to previous messageGo to next message
John Watson
Messages: 4514
Registered: January 2010
Location: Global Village
Senior Member
I've had a couple of run-ins with Adv Replication. Could you do this with column groups? From the chapter 5 of the Adv Rep doc,
Quote:

Use Column Groups

Column groups can help you avoid conflicts even if you do not apply any conflict resolution methods to the column groups. When your replicated table contains multiple column groups, each group is viewed independently when analyzing updates for conflicts.

For example, consider a replicated table with column group a_cg and column group b_cg. Column group a_cg contains the following columns: a1, a2, and a3. Column group b_cg contains the following columns: b1, b2, and b3.

The following updates occur at replication sites sf.world and la.world:


User wsmith updates column a1 in a row at sf.world.

At exactly the same time, user mroth updates column b2 in the same row at la.world.

In this case, no conflicts result because Oracle analyzes the updates separately in column groups a_cg and b_cg. If, however, column groups a_cg and b_cg did not exist, then all of the columns in the table would be in the same column group, and a conflict would have resulted. Also, with the column groups in place, if user mroth had updated column a3 instead of column b2, then a conflict would have resulted, because both a1 and a3 are in the a_cg column group.

If you set up each column as its own group, I think your example would go through without a conflict at all?

[Updated on: Sat, 27 February 2010 02:50]

Report message to a moderator

Re: Creative conflict resolution [message #445439 is a reply to message #445268] Mon, 01 March 2010 22:52 Go to previous message
Brent.Billups
Messages: 2
Registered: February 2010
Junior Member
Thanks for the reply. I do see that this would solve the specific case I had listed. I guess I didn't formulate my question as well as I should have. It is hard to get further into the details without going into domain specific details about the data.

What I am asking comes down to details about what is the full data available when using a user function for conflict resolution. Can you only choose the column set from one record or the other? Can you see any of the rest of the record, or only values inside the column set? Is there something that goes into details about what can be done inside one of these functions?

I looked for it on the web and the Oracle documentation, but all of the examples are pretty simple. Is this only a simple function, with no complex solutions allowed, or does this allow us to work the solution as we see fit?

Thanks,
Brent
Previous Topic: refresh mv using oracle jobs everyday except for sunday @ 6 AM
Next Topic: Fast Replication is slow
Goto Forum:
  


Current Time: Fri Aug 29 04:00:17 CDT 2014

Total time taken to generate the page: 0.10960 seconds