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

Thread: Clearing Hanged Session

  1. #1
    Join Date
    Jul 2003
    Location
    Dubai, UAE
    Posts
    15

    Clearing Hanged Session

    HI

    How can I clear hanged session from the database without restating the instance. ( I AM USING ORACLE 8.1.7)


    select machine,count(*) from v$session group by ,machine;

  2. #2
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    Code:
    alter system kill session 'SID, SERIAL#';
    Sanjay G.
    Oracle Certified Professional 8i, 9i.

    "The degree of normality in a database is inversely proportional to that of its DBA"

  3. #3
    Join Date
    Jul 2003
    Location
    Dubai, UAE
    Posts
    15
    thank you very much SANJAY_G


    I did it and the status of the hanged sessions changed from INACTIVE to KILLED and its being deleted gradually by the system.

  4. #4
    Join Date
    Apr 2003
    Posts
    353
    The query will yield the
    blocking session.

    select ''''||a.sid||','||a.serial#||'''' to_kill,
    a.username,a.machine, a.lockwait,a.osuser,
    a.program,b.owner,b.object_name,c.locked_mode
    from v$locked_object c, all_objects b, v$session a
    where b.object_id = c.object_id and a.sid = c.session_id;


    with the sid and serial number you can delete that
    user after verifying the username,machine name users query.

    Regards
    Giri

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