1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

ORA-04021: timeout occurred while waiting to lock object issue reg

Discussion in 'SQL PL/SQL' started by laxman, May 13, 2010.

  1. laxman

    laxman Forum Expert

    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    230
    Location:
    MUMBAI
    Hi all,
    I am trying to compile one package but couldnt since after long time i am getting this error message.

    ORA-04021: timeout occurred while waiting to lock object

    I am not sure but there is chance that multiple sessions might using this object and it doesnt allow me to compile this package successfully.
    can anybody help me.
    Zargon Sir and Rajvu Sir need your attention please!!!!

    regards
    Laxman
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    That's not the entire error message as there should have been a line number reported or an object name given. You may not be able to compile this package during regular work hours; why are you trying this on a live system? You'll need to take an outage to get this done so you can ensure the table which is giving you problems is not locked by any transaction.
     
  3. laxman

    laxman Forum Expert

    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    230
    Location:
    MUMBAI
    Dear Sir,
    its true that i am trying to compile during regular work hours.but since its an urgent requirement i need to do some changes and then have to compile it so that with updated one the functionality of the system can be analyze. otherwise shall i wait for other transaction to finish and then i do my job!!!

    HERE is the actual error msg:

    create or replace PACKAGE BODY close_req
    *

    ERROR at line 1:
    ORA-04021: timeout occurred while waiting to lock object LAX.CLOSE_REQ

    Regards
    Laxman
     
  4. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    It seems that, someone is executing the package when you try compiling the package. Find out the locking session and kill it. Then try to compile again.That is the only way to compile it.
     
  5. laxman

    laxman Forum Expert

    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    230
    Location:
    MUMBAI
    Ok Sir,
    Let me find out the locking session and try to kill it.hope i will successfully compile this time.

    Thanks n regards
    Laxman