DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: session killed still locking a package

  1. #1
    Join Date
    Nov 2000
    Posts
    440

    session killed still locking a package

    SQL> SELECT * FROM V$SESSION WHERE SID IN(SELECT SID FROM v$access WHERE object ='GCO_GENERAL' AND OWNER = 'DEMO40');

    SADDR SID SERIAL# AUDSID PADDR USER# USERNAME COMMAND OWNERID TADDR LOCKWAIT STATUS SERVER
    -------- ---------- ---------- ---------- -------- ---------- ------------------------------ ---------- ---------- -------- -------- -------- ---------
    2C0BDEA8 78 6414 271726 2C081FEC 114 DEMO40 47 2147483644 KILLED DEDICATED



    This session is still locking my package, and i want to compile it, but i cant cuse it is lock!!!
    The session is marked for kill and does not want to get the hell out and release the lock!!

    Im thinking of using orakill, will it work, or will it try to kill an already killed session?
    The orakill program ask me for sid, wich i know what it is, but what is the thread? It says thread is the id of the thread to kill. Im on windows platform, where do i get that thread number?

  2. #2
    Join Date
    Nov 2000
    Posts
    440
    I found the thread number, it is the spid in v$process view, if i try to use orakill on it, it says: Could not attach to Oracle instance 78: err = 2, any idea why?

  3. #3
    Join Date
    Nov 2000
    Posts
    440
    Ok sid is the oracle sid, not the session sid, and it killed the process and i have to more lock on my package.

    HEY, i post a question and answer my question by myself, thats the first time i see that

  4. #4
    Join Date
    Jan 2002
    Posts
    474
    run this script to find out OSPID

    select substr(s.sid,1,3) sid,substr(s.serial#,1,5) ser,
    substr(osuser,1,8) osuser,spid ospid,
    substr(status,1,3) stat,substr(command,1,3) com,
    substr(schemaname,1,10) schema,
    substr(type,1,3) typ,
    substr(decode((consistent_gets+block_gets),0,'None',
    (100*(consistent_gets+block_gets-physical_reads)/
    (consistent_gets+block_gets))
    ),1,4) "%HIT",value CPU,
    substr(block_changes,1,5) bchng,
    substr(consistent_changes,1,5) cchng
    from v$process p, v$SESSTAT t,v$sess_io i ,v$session s
    where i.sid=s.sid and p.addr=paddr(+) and s.sid=t.sid and
    t.statistic#=12



    once you got the OSPID, do the following command

    ORAKILL SID_NAME OSPID

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