This post has been republished via RSS; it originally appeared at: Azure Database Support Blog articles.
Today, we got a service request that our customer reported that the using the following article the blocker and blocked queries haven't relation between them.
In this post we are going to explain why?. Normally, when you need to identify blocking issues we’re used to run the following query explained on this URL.
We found a situation that the query reported could not be the query that is blocking the another one. In this specify situation is when our customer is running multiple queries in the same transaction:
- If our customer is running a bunch of query in the same execution, you could see all the details, for example, this way.
- However, if the customer application opens a new transaction and runs a single query per execution as a single unit within this transaction, you mightn’t see the exact query that is blocking other query. In this specific situation and depending on when you run the DMV to obtain the queries/transaction blocked you may see either of these queries INSERT TABLE1 or UPDATE TABLE2 (below).
11:00 AM Customer open a transaction – BEGIN TRANSACTION
11:01 AM Customer runs INSERT Table1
11:02 AM Customer runs UPDATE Table 2
11:03 AM Customer commit the transaction.