title: What happens if altering a stored procedure while it is running?
body: <p>I have a minor, one line change (fixing a typo in a string), to a stored procedure that I would like to deploy to our production SQL Server 2005 server as soon as possible.</p>
  
  <p>The worry I have is what happens if at the exact time run the alter statement to update my stored procedure, it happens that something calls that stored procedure at the same time?</p>
  
  <p>Does it run with the previous copy of the stored procedure, or can it result to some corruption or errors?</p>
  
  <p>Considering the ACID nature of SQL Server, I would expect that it is safe.
  The chances of it running at the exact same time, especially since the SP is quite small are extremely low, but I just prefer to make sure, and I am also interested in the answer, just for educational purposes.</p>
  
  <p>Arguably, ServerFault would be a better place for this, sorry if it is misposted.</p>
  
  <p>Thank you.</p>