Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

regarding locking of table....

Former Member
0 Kudos

Hi friends,

Is it possible to know whether the db table is locked or not!!

Because, when one user is using a table others cant use as the system locks that table. If a table is already being used by a user, and another user want to know whether the table is being locked or not, for updating data into that table programatically, how he can go for it?

Thanks in advance.

Suresh...

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Yes it is possible

Use the ENQUEUE_E_TABLE

call function 'ENQUEUE_E_TABLE'

exporting

tabname = p_table

exceptions

foreign_lock = 1

system_failure = 2

others = 3.

When you are trying to enque it, if you get exception, it means it is

locked by another user.

If you need more info let me know

Pavan

2 REPLIES 2

Former Member
0 Kudos

Yes it is possible

Use the ENQUEUE_E_TABLE

call function 'ENQUEUE_E_TABLE'

exporting

tabname = p_table

exceptions

foreign_lock = 1

system_failure = 2

others = 3.

When you are trying to enque it, if you get exception, it means it is

locked by another user.

If you need more info let me know

Pavan

0 Kudos

Thank you Pavan, thanks for ur input. It is working. I will try to fit it in my code and will definetly come to you if I have any other related issues. Thanks again.

Suresh...