Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Location
    Dublin, Ireland
    Posts
    212

    Unhappy Unanswered: ORA-04021:timeout...

    Hi guys,
    I have a problem: when I try to replace or delete a package I recive
    an error message ORA-04021: timeout occurred while waiting to lock object XXX

    Of course it's becouse this package is used by another session.
    In v$access table I've found out whitch session it is, but I don't
    know how to kill or stop this session to allowed replacing of package.
    I killed the session and its status is marked as killed but the
    package is still used.

    Pls help me it's very important. Any solution how to compile this
    package is welcomed. Restart of database doesn't help, I tried :-(
    Thanx a lot.

  2. #2
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Are you "pinning" the package in memory???

    What os are you using ... if it's windows, you can use orakill <sid> <thread>
    to remove the killed process complete ...

    HTH
    Gregg

  3. #3
    Join Date
    Feb 2004
    Location
    Dublin, Ireland
    Posts
    212
    Hi,
    I used orakill... but an error occured:
    Could not attach to Oracle instance <SID>: err = 2

    Do you know where is the problem?

  4. #4
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Find the thread of the process to kill...
    sql> select p.spid "Thread", s.sid "SID-Top Sessions",
    substr(s.osuser,1,15) "OS User", substr(s.program,1,25) "Program Running"
    from v$process p, v$session s
    where p.addr=s.paddr
    order by substr(s.osuser,1,15)
    ;

    drop to command prompt:

    orakill <sid> <thread from above>

    ex: sid= orcl thread = 4958

    orakill orcl 4958

    HTH
    Gregg

  5. #5
    Join Date
    Feb 2004
    Location
    Dublin, Ireland
    Posts
    212

    Smile

    Yes it works. I've made a mistake I typed <SID> as session id
    instead of database SID. Thank you

Posting Permissions

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