截取METALINK:
Error: ORA-00054
Text: resource busy and acquire with NOWAIT specified or timeout expired
=========================================================================
Cause: Resource interested is busy or the timeout specified by DDL_LOCK_TIMEOUT has expired
Action: Retry the command with a higher DDL_LOCK_TIMEOUT if desired
*** Important: The notes below are for experienced users - See Note:22080.1
Explanation:
This is a quite normal message and is reported if a SQL statement
would have blocked waiting for another user to complete some
operation. The SQL command issued either:
a) had a 'NOWAIT' clause so instead of blocking the statement
returns this error.
or b) was DDL and was blocked.
DDL or SELECT .. FOR UPDATE NOWAIT can raise this error if an
incompatible lock is held.
Diagnosis:
- None normally required unless this is occurring when not expected.
- Check v$lock for locks being held.
- For DDL repeat the command. If the DDL is issued under DBMS_SQL
it is possible to cause this error if the DDL touches an object
related to the current PL/SQL block by some dependency.
- For SELECT FOR UPDATE issue the same statement without the NOWAIT
clause to see if the statement blocks (assuming the problem is
reproducible). If it blocks check there is a blocker in v$lock, Eg:
select * from v$lock where request!=0;
-- To find the blocked process.
select * from v$lock where type='TX' and id1='&1' and id2='&2'
-- where &1 and &2 are the ID for the lock we are waiting on
from above.
Is this Oracle7 version prior to 7.1.6? If so are the foreign
key columns indexed or not? (If not, DML on child table will
take out table locks on parent, preventing DML on parent.)
If this is Oracle7 V7.1.6+, are locks being taken out on a child
table when doing deletes on the parent? If so, indexing the
foreign key column on the child table will stop this happening.
Is there a select ... for update, joining two tables together?
If so this will lock both parent and child rows. If you only
wish to lock e.g. child rows, specify:
... for update OF
Articles:
(V3) Locking in SQL*Forms <101960>
101960>
Text: resource busy and acquire with NOWAIT specified or timeout expired
=========================================================================
Cause: Resource interested is busy or the timeout specified by DDL_LOCK_TIMEOUT has expired
Action: Retry the command with a higher DDL_LOCK_TIMEOUT if desired
*** Important: The notes below are for experienced users - See Note:22080.1
Explanation:
This is a quite normal message and is reported if a SQL statement
would have blocked waiting for another user to complete some
operation. The SQL command issued either:
a) had a 'NOWAIT' clause so instead of blocking the statement
returns this error.
or b) was DDL and was blocked.
DDL or SELECT .. FOR UPDATE NOWAIT can raise this error if an
incompatible lock is held.
Diagnosis:
- None normally required unless this is occurring when not expected.
- Check v$lock for locks being held.
- For DDL repeat the command. If the DDL is issued under DBMS_SQL
it is possible to cause this error if the DDL touches an object
related to the current PL/SQL block by some dependency.
- For SELECT FOR UPDATE issue the same statement without the NOWAIT
clause to see if the statement blocks (assuming the problem is
reproducible). If it blocks check there is a blocker in v$lock, Eg:
select * from v$lock where request!=0;
-- To find the blocked process.
select * from v$lock where type='TX' and id1='&1' and id2='&2'
-- where &1 and &2 are the ID for the lock we are waiting on
from above.
Is this Oracle7 version prior to 7.1.6? If so are the foreign
key columns indexed or not? (If not, DML on child table will
take out table locks on parent, preventing DML on parent.)
If this is Oracle7 V7.1.6+, are locks being taken out on a child
table when doing deletes on the parent? If so, indexing the
foreign key column on the child table will stop this happening.
Is there a select ... for update, joining two tables together?
If so this will lock both parent and child rows. If you only
wish to lock e.g. child rows, specify:
... for update OF
Articles:
(V3) Locking in SQL*Forms <101960>
101960>