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

Thread: kill session for a scecific procedure running

  1. #1
    Join Date
    Aug 2000
    Posts
    163
    Hi everyone,
    I kicked several procedures off through sqlplus (multiple sessions). A few minutes later I realized that I kicked one of them by mistake and would like to kill that session.
    Is there any way of doing it? I gues I'd break my question into 2 parts:
    -Is there any way of seeing what procedures are running at the moment in the database?
    -How do I find a session id for a scecific statement/procedure running?
    Thank you.

  2. #2
    Join Date
    Apr 2000
    Location
    Baltimore, MD
    Posts
    759
    ps -ef|grep oracle --> tells you which oracle processes are running. Find the process and issue: kill -9 process_no.

  3. #3
    Join Date
    Aug 2000
    Posts
    163
    Thanks Halo.
    I wish I run on Unix. But that is not the case. I run Nt. I cannot use a -grep command.

  4. #4
    Join Date
    Jun 2000
    Location
    Conway,AR,USA
    Posts
    29
    Try the task manager on NT and Cancel that session(which calls sql*plus)
    Soumya
    still learning

  5. #5
    Join Date
    Aug 2000
    Posts
    163
    yes, that is what I am trying to do. The problem is I don't know how to identify the session I need to kill. When you go to session manager it shows you all the sessions connected to the db. I need to kill a specific session. I am wondering if there is a way to find out what sql statement/process each session running and then kill the one I kicked off by mistake.
    Thank you for your help.

  6. #6
    Join Date
    Nov 2000
    Posts
    71
    Mary you can choose one of those 2 metods.
    1 - it's the simplest if you have installed OEM. Run the top session monitor from the OEM and the with a right click on the session you wanto to kill choose kill and do it!

    2 - from sql*Plus run the follwing query

    SELECT username, sid, serial#
    FROM v$session;

    for example if you have thi result

    USERNAME SID SERIAL#
    ------------------------------ --------- ---------
    SYSTEM 7 7
    USER1 5 25

    and you want to kill USER1 then run the current statement:

    ALTER SYSTEM KILL SESSION '5,25';


    you can re-run the first query to verify the operation.
    I hope this can help you.
    Bye

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