Skip to Content
0
Nov 09, 2022 at 05:36 AM

Table Lock in SAP HANA DB in BTP

279 Views Last edit Dec 22, 2022 at 06:44 AM 4 rev

We have developed CAPM project and deployed project to BTP Cloud Foundary. We are trying to achieve one scenario where we want to lock table when inserting the new data to the table.

We tried table lock using below query but it is not working although query is successful.

Even the locked object is not listed under M_OBJECT_LOCKS after executing the query in the EXCLUSIVE mode.

LOCK TABLE <Table_Name> IN EXCLUSIVE MODE NOWAIT;

select * from SYS.M_OBJECT_LOCKS;

Insert into <Table_Name> values ('X','Y');

Please suggest if there is any other way to achieve it.