Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Explicit UNLOCK in procedure / trigger

Hello,

how can I explicitly unlock my lock in stored procedure/trigger ?

When I try:

DROP DBPROC TEST_TMP
//
CREATE DBPROC TEST_TMP AS
BEGIN
  LOCK (WAIT) TABLE ADMIN.MOBILE
    IN EXCLUSIVE MODE;
  UNLOCK TABLE ADMIN.MOBILE
    IN EXCLUSIVE MODE;
END;
I obtain an error message:

Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed Syntax error or access violation;-5015 POS(87) Missing keyword:LOCK,WHILE,UPDATE,SELECT,INSERT,IF,EXECUTE,DELETE,CLO ...

What am I doing incorrect ?

What is the correct syntax ?

Thank you, Dusan

Former Member
Not what you were looking for? View more on this topic or Ask a question