0

We have two threads(Timer) which are calling same stored procedure in oracle. How to handle from Database side to process one thread at a time. We used "Alter session disable Parallel DML" query inside the Procedure, But, still both threads are running at a same time.

Is there any locking mechanism which will take care these steps ?

Expecting Result:

  1. Thread should execute the same procedure one after another.

Can anyone suggest solution for this issue?

William Robertson
  • 15,273
  • 4
  • 38
  • 44
Subramanian
  • 29
  • 2
  • 10
  • check https://stackoverflow.com/questions/47942521/serializable-transactions-not-protecting-me-from-double-inserts?noredirect=1#comment82858178_47942521 – pOrinG Jan 03 '18 at 08:29
  • Oracle has several different locking mechanisms. Which one is the best for your needs depends on what your procedure actually does. So we can't give you a solution until you post more details. – APC Jan 03 '18 at 09:45
  • "Parallel DML" doesn't refer to multiple sessions doing DML simultaneously. It is related to the mechanism for [parallelising individual SQL statements](https://docs.oracle.com/database/121/VLDBG/GUID-2627DC19-7EBE-4C45-A758-711BDB5E37EC.htm). – William Robertson Jan 03 '18 at 10:02

0 Answers0