title: how to generate a deadlock scenario in Oracle?
body: <p>I've been stuck on a Lab question for the last four hours because I generally don't understand what it wants, even with extensive research and flipping through endless slides. EDIT the prologue in question is a dbcreate.sql which creates a series of tables, and then a dbload.sql which inserts values into given tables. </p>
  
  <p>The given question is </p>
  
  <blockquote>
    <p>Implement in PL/SQL the database transactions that operate on the sample database created in Prologue step and such that their concurrent processing leads to dadeadlock situation. Save the transactions in SQL scripts solution1-1.sql and solution1-2.sql</p>
  </blockquote>
  
  <p>I feel someone on this site could explain this in a way I  can understand! Thank you for your help</p>
  
  <p>EDIT theres a second part to this question</p>
  
  <blockquote>
    <p>Simulate a concurrent processing of the transaction such that it will lead to a deadlock.
    To simulate a concurrent processing of the database transactions use a PL/SQL procedure
    SLEEP from the standard PL/SQL package DBMS_LOCK. By "simulation of concurrent
    execution" we mean that the first transaction does a bit of work, then it is delayed for a
    certain period of time and in the same period of time another transaction is processed.
    Finally, after a delay the first transaction completes its job.</p>
  </blockquote>