Forum Stats

  • 3,769,694 Users
  • 2,253,008 Discussions
  • 7,875,154 Comments

Discussions

Error: ORA-04021: timeout occurred while waiting to lock object

User_GK50K
User_GK50K Member Posts: 3 Green Ribbon
edited Sep 17, 2021 7:44AM in General Database Discussions

Hi,

I was making changes in procedure from sql developer. suddenly it started to give me this error.

Even if I restart connection, I cant make any changes any more. oracle version 12c.

NOTE: I can make changes to other procedure there is no issue.

I have run below queries but the object Id doesn't match the procedure name.

---------------

SELECT ORACLE_USERNAME, OS_USER_NAME,LOCKED_MODE,OBJECT_NAME,OBJECT_TYPE

  FROM V$LOCKED_OBJECT A, DBA_OBJECTS B

  WHERE A.OBJECT_ID=B.OBJECT_ID;

  --------------

SELECT SID, OWNER, OBJECT, TYPE

   FROM V$ACCESS

   WHERE OBJECT = 'gv_$instance';

-------------------------


There has been same issue before but I dont see any solution here? https://community.oracle.com/tech/developers/discussion/comment/3906357

Thank you for your supports.

Answers