You have find out few transactions are actually blocking more and more transactions. This is most likely to be a user session or an application issue. After inquiring you came to the conclusion blocking transactions have to be stopped.
The first step is to contact and ask the relevant user to stop himself his session or transaction. If the transaction is part of an application, it is likely that the application will have to be shut down in order to release the locks.
How to stop a sap hana transaction which is taking too long to execute?
The Manual operation
You stop a session using the following SQL syntax :
ALTER SYSTEM CANCEL SESSION '< connection_id >'
Keep in mind, the CANCEL operation does not happened on the spot. It could take some times before the session stops.
You stop a session by disconnecting it using the following SQL syntax :
ALTER SYSTEM DISCONNECT SESSION '< connection_id >'
This is a 2 internal steps procedures. The current transaction is cancelled and rolled back first then it is disconnected.
Important Note : you should execute a DISCONNECT SESSION with care if the CANCEL SESSION didn't succeed.
See Also : How to find a sap hana connection id?
How to stop sap hana transactions using hdbcons command line?
It is also possible to stop a specific or all transactions at the operating system level using hdbcons.
A single transaction will be terminated using the following syntax :
PATadm@linu7$> hdbcons 'transaction c < transaction_id >'
All transactions will be terminated using the following syntax :
PATadm@linu7$> hdbcons 'transaction c -a'
See Also : How to find a sap hana transaction id?
How to cancel a sap hana session using sap hana studio?
Sessions can be cancelled in a very simple manner using sap hana studio. Log on to the relevant database and open the administration console. Select the performance tab then the Session tab.
Right click on the session you want to cancel. Select the Cancel session option.
Usefull Sap Hana "how to do" links and examples
Back to top