title: How do I identify a deadlock in SQL Azure?
body: <p>I have a Windows Azure role that consists of two instances. Once in a while a transaction will fail with an <code>SqlException</code> with the following text</p>
  
  <blockquote>
    <p>Transaction (Process ID N) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.</p>
  </blockquote>
  
  <p>Now I've Googled for a while and read <a href="http://blogs.msdn.com/b/bartd/archive/2006/09/09/deadlock-troubleshooting_2c00_-part-1.aspx" rel="noreferrer">this post</a> about identifying deadlocks using SQL Server logs.</p>
  
  <p>The problem is...</p>
  
  <p>How do I do it in SQL Azure? What tools do I use to access the internals of SQL Azure and getting enough data?</p>