Resolving deadlock caused by parallel triggers in oracle -


my friend asked me question , not able resolve it.

consider scenario have 2 triggers on table1. both before insert triggers. both triggers try update row 1 of table2. when insert query run on table1, both triggers try update same row of table2 , deadlock caused. simplified issue. in actual case there around 50 triggers , other reasons because of cannot use commit in of triggers.

now please me resolving above issue.

  • is there can sequence triggers.
  • is possible utilize savepoints in way resolve issue.
  • or way need create temporary table , it.

please explain if solutions feasible.

is real situation, or hypothetical one? far know can commit in trigger autonomous transaction, explain deadlocks because otherwise running trigger code within same transaction, , can't deadlock itself.

anyway, 11.2 control firing order of triggers following clause: http://docs.oracle.com/cd/b28359_01/appdev.111/b28370/create_trigger.htm#cjadjgif

triggers make application support difficult, way, , indicate need cope denormalised design problem. avoided whenever possible.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -