How do I identify a deadlock in SQL Azure?

sharptooth picture sharptooth · Nov 3, 2011 · Viewed 11.1k times · Source

I have a Windows Azure role that consists of two instances. Once in a while a transaction will fail with an SqlException with the following text

Transaction (Process ID N) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Now I've Googled for a while and read this post about identifying deadlocks using SQL Server logs.

The problem is...

How do I do it in SQL Azure? What tools do I use to access the internals of SQL Azure and getting enough data?

Answer

Igorek picture Igorek · Nov 3, 2011

Monitoring of SQL Azure is more limited than SQL Server, but the tools are becoming more available for you to look underneath:

http://social.technet.microsoft.com/wiki/contents/articles/troubleshoot-and-optimize-queries-with-sql-azure.aspx