How to free a locked object?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: How to free a locked object?

  1. #1
    Join Date
    Oct 2006
    Posts
    175

    How to free a locked object?

    hi all,
    I'm trying a compile a proc but the run would just go forever and throw 'ORA-04021: timeout occurred while waiting to lock object xxx' at the end. Upon checking the v$session_wait, i found "latch: cache buffers chains" as Event and "Concurrency" as Wait_class. On checking v$locked_object, i found one object being held. I don't have access to alert_log file. How do I find who is using this object and how do I free it for myself?

    Appreciate your kind responses.
    gtcol

  2. #2
    Join Date
    Oct 2007
    Posts
    7
    You can write a query by joining v$session and v$ssesion_wait and can come to know about who is using which object.

  3. #3
    Join Date
    Oct 2006
    Posts
    175
    Dear,
    Can you elaborate this a bit? How does it tell me who is locking the object?

  4. #4
    Join Date
    Apr 2003
    Location
    Pune,Maharashtra. India.
    Posts
    245
    use v$locked_object (A),all_objects (B),v$session (C)
    see which columns you need to select from above 3 views
    then match foll
    object_id (from A) to object_id (from B)
    process (from C) to process (from A)
    Rgds
    Parag

  5. #5
    Join Date
    Oct 2006
    Posts
    175
    Hello Parag/TPT
    Thanks for your prompt responses. This is what I found after googling for a while: http://www.praetoriate.com/oracle_ti...d_sessions.htm. It did really help.

    Thanks,
    gtcol

  6. #6
    Join Date
    Aug 2007
    Posts
    14
    just run the script ...rdbms\admin\utllockt.sql you knw that which user is waiting for whom. Then you can send the mail to him or kill the session.

  7. #7
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    Quote Originally Posted by Kailash Chandra
    just run the script ...rdbms\admin\utllockt.sql you knw that which user is waiting for whom. Then you can send the mail to him or kill the session.
    Issue was described as a locked object on January 23 at 3:38 am
    Issue got solved the very same day before 7:54 am

    May I ask why you decided to add your post on February 5th?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  8. #8
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    lemme guess, for publicity?
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  9. #9
    Join Date
    Jan 2001
    Posts
    2,828
    Just wundering do people understand the meaning of a thread a forum etc.

    regards
    Hrishy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width