12-27-2007 4:02 PM
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...
12-27-2007 4:06 PM
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
12-27-2007 4:06 PM
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
12-27-2007 4:14 PM
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...