on 12-09-2016 9:06 AM
Hi everyone!
I need to analyze record locks in SAP HANA via ST04 or view M_RECORD_LOCKS.
In the view output I can see Record ID entries like this:
If I understand the output correctly – it shows which records in which table are locked at the moment. And ‘Record ID’ field is a kind of a pointer to the particular blocked row in the table.
My question is, how can I interpret combination of SID, OFFSET and sometimes PARTID to address the exact row in the table?
Can I use special SQL command with this parameters (maybe somewhat converted ) to return the row number or row itself?
Many thanks in advance!
Best regards,
Pavel Simonovich
The structure of the RECORD_ID information presented in the M_RECORD_LOCKS view depends on the internal object type the lock is used for. It's a representation of the locking information from the lockmanager/transactionmanager components in the HANA kernel.
This structure is not officially documented externally and can/has/will change with new revisions of HANA.
Compared to other DBMS (e.g. Oracle) where such information could relatively reliably linked to a specific table record, this mapping is a lot more volatile in HANA as the memory structures used to keep table information are often reorganised. Things like an "offset" of a certain piece of information from e.g. a starting point of a specific memory structure change often and really only make sense in this low-level context of memory structures.
Long story short, there is no SQL statement where you could put in the RECORD_ID information and retrieve a SQL level record that is protected by the lock.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavel,
Please try with M_OBJECT_LOCK_STATISTICS where you will able to see Lock on the table , object lock, lock wait time.
BR,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pavel,
Please try this table M_OBJECT_LOCK_STATISTICS. This table has all the details about the lock.
Thanks.
Rithika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.