title: Processing parallel requests to a stored procedure synchronously
body: <p>I have a requirement where I need to process parallel (concurrent) requests to a stored procedure synchronously. Let's say if there are 2 requests coming in parallel to execute a stored procedure, the 2nd or 1st request has to wait until the other finishes. </p>
  
  <p>I'm writing stored procedure in following way:</p>
  
  <pre><code>SET TRANSACTION ISOLATION LEVEL REPEATABLE READ
  BEGIN TRANSACTION 
  
  &lt;My SQL Query here&gt;
  
  COMMIT TRANSACTION 
  SET TRANSACTION ISOLATION LEVEL READ COMMITTED  
  </code></pre>
  
  <p>Will this work to fulfill my requirement? Or is it that one of the requests will fail due to locks being not held and I would need to retry the failed request? I'm not an expert in SQL or stored procedures. Please suggest. Also, if the above query doesn't work, please suggest how do I achieve it.</p>