Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-30006: resource busy; acquire with WAIT timeout expired

Samuel RabiniJul 7 2010 — edited Jul 7 2010
Hi,
I'm running an Oracle Database 11g Release 11.1.0.6.0 - 64bit Production With the Real Application Clusters option on a RedHat 5.

I'm managing a part of a database developed by a former colleague and I have a doubt on how to manage a problem I'm experiencin now.
I've a table T_EVENT with this active trigger:

create or replace TRIGGER tra_device_live
AFTER INSERT ON T_EVENT FOR EACH ROW
DECLARE
date_live_last_ DATE;
id_gprs_ NUMBER;
id_gprs_last_live_ NUMBER;
BEGIN
BEGIN
SELECT id_user
INTO id_gprs_
FROM t_data
WHERE id_data = :new.id_data
AND id_type_communication = 1;
EXCEPTION
WHEN NO_DATA_FOUND THEN
id_gprs_ := NULL;
END;

SELECT date_live_last, id_gprs_last_live
INTO date_live_last_, id_gprs_last_live_
FROM t_device
WHERE id_device = :new.id_device
FOR UPDATE WAIT 4;

UPDATE t_device
SET date_live_last = SYSDATE,
id_gprs_last_live = id_gprs_
WHERE id_device = :new.id_device;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
END;

I'm not completely confident with the FOR UPDATE WAIT statement, how does it work?
The problem I'm experiencing now is:

"ORA-30006: resource busy; acquire with WAIT timeout expired
ORA-06512: at "TRA_DEVICE_LIVE", line 17
ORA-04088: error during execution of trigger 'TRA_DEVICE_LIVE'"

while inserting e new data into T_EVENT. I've this problem just for a specific id_device.
Others records are updating without any problem.

How can I detect the problem?
How can I solve it and, more important, avoid it?

Thanks in advance!
Samuel
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2010
Added on Jul 7 2010
7 comments
28,794 views