Quantcast
Channel: SCN : Blog List - All Communities
Viewing all articles
Browse latest Browse all 2548

HANA- How to analyse Blocked Transactions-Lock Waits

$
0
0

To check the blocked transactions,login to HANA Studio.Under Performance-> Treads/Blocked Transactions.

 

2.JPG

 

 

You see many hanging tasks in hana studio

There is a triangle symbol on the most left side in the task list, on this symbol there is a text (when you hover the mouse over the symbol), where you get the transaction ID of the blocker, on that the running task is waiting for.

In case you have multiple entries waiting for the same blocker-task, you can disconnect this blocker. To do so, you have to search for the 6-digit connection ID of the corresponding transaction ID of the blocker-process.
You find this relation in the session list.

Than you can run:

alter system disconnect session '<connection ID>';

Blocked Transactions

 

  Blocked transactions are write transactions that are unable to be further processed because they need to acquire transactional locks (record or      table locks) which are currently held by another write transaction.
Note that transactions can also be blocked waiting for physical resources like network or disk



Identifying & Assessing Blocked Transaction Issues

 

The first signs of blocked transactions are given by
      • Users reporting bad application responsiveness or
      • HANA Alerts 49 (“Check blocked transactions”) or 59 (“Percentage of transactions blocked”) are issued


To confirm the database performance is harmed by blocked transactions, you should check the following HANA DB Studio Monitors under the Performance tab:


     Load Monitor


1.JPG


The Load Monitor helps you to get a general idea about how many blocked transactions currently exist and allows displaying historical information to a certain extend. To further track down the issue, look at the:


Job Progress Monitor

 

  The Job Progress Monitor shows currently running HANA background processes like Delta Table Merge. Since the Delta Table Merge needs to lock tables to proceed, it is a common cause for blocked transactions


Session Monitor

 

 

  The Session Monitor lists all currently opened SQL sessions (=user connections). In the context of blocked transaction troubleshooting, the columns “Blocked by Connection Id” and “Blocks No. of Transactions” are of special interest. The first tells you whether the session is blocked by another session and identifies the Id of the blocking one. The latter gives you the corresponding information if a session blocks other sessions, and how many transactions are affected.


3.JPG


Troubleshooting Blocked Transactions

 

When troubleshooting blocked transactions, it is helpful to differentiate between situations where only single or a few transactions are blocked from the situation where a high percentage of all transactions are blocked.

 

Single or few transactions are blocked

 

 

  If you identified only a single or a few blocking transactions, there is likely an issue on application side. A usual pattern is a flaw in the application coding that misses to commit a write transaction. Such a transaction will be a blocker for any other transaction that needs to access the same database object. To release the situation you have to close the blocking transaction


Viewing all articles
Browse latest Browse all 2548

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>