DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Tuesday, December 22, 2015

ORA-04021: timeout occurred while waiting to lock object





VError report:
ORA-04021: timeout occurred while waiting to lock object 
04021. 00000 - "timeout occurred while waiting to lock object %s%s%s%s%s"
*Cause: While waiting to lock a library object, a timeout is occurred.

*Action: Retry the operation later.


V$ACCESS – You can use the V$ACCESS view to see which users have locks on which objects in your database
     SELECT SID, OWNER, OBJECT, TYPE
     FROM V$ACCESS
     WHERE OBJECT = 'object_name';
$SESSION_EVENT and V$SESSION_WAIT – use these views to see what Oracle wait events the session(s) are waiting on
     SELECT *
     FROM V$SESSION_EVENT
     WHERE SID = <sid>
     ORDER BY TIME_WAITED DESC;

     SELECT *
     FROM V$SESSION_WAIT
     WHERE SID = <sid>;

V$LOCKED_OBJECT – This view will also help you see who is locking the object

1 comment:

Sridevi K said...


Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.