
Your SAP HANA system is experiencing some memory and CPU high consumption. Upon checking, you found that there is long running session in the SAP HANA database.
In such a case, you can follow below steps on how to terminate a long running session in the SAP HANA database.
Method 1: Using command line
ALTER SYSTEM CANCEL SESSION '[connection_id]'
Method 2: Using SAP HANA Studio
Go to Performance > Session. Right click on the long running session and select Cancel Session.

Method 3: Using SAPGUI Application
Open transaction code DBACOCKPIT, under Performance, double click on Threads. On your right panel, choose the long running culprit and select Cancel Threads.

Method 4: Using hdbcons
hdbcons 'connection c [conn_id]'
Note
SAP Note 2092196 – How-To: Terminating Sessions in SAP HANA


