Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

$
0
0

 ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired


The error is raised when the following statement is executed against the Oracle Database.


SQL> truncate table WRI$_OPTSTAT_HISTHEAD_HISTORY;

truncate table WRI$_OPTSTAT_HISTHEAD_HISTORY

               *

ERROR at line 1:

ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired


Cause: 

The statement requires an exclusive lock on the table.If the table is active and has DML or DDL transactions against it the transaction will not be able to acquire the lock quickly. This will cause the transaction to fail and return the resource busy error to the session.

Solution:

Using DDL_LOCK_TIMEOUT

You can increased the timeout by modifying the DDL_LOCK_TIMEOUT parameter in your session. Once this is set Oracle will wait for the new TIMEOUT before returning the “ORA-00054: resource busy and acquire with NOWAIT specified” error.

[ora@ragu ~]$ sqlplus / as sysdba

SQL> ALTER SESSION SET ddl_lock_timeout=900;

Session altered.


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>