Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Terminating Sessions

Re: Terminating Sessions

From: Ethan Post <epost1_at_my-deja.com>
Date: 2000/06/12
Message-ID: <8i3nij$pk8$1@nnrp1.deja.com>#1/1

***EXCERPT FROM ORACLE 8.1.5 SQL Docs***

KILL SESSION Example
You may want to kill the session of a user that is holding resources needed by other users. The user receives an error message indicating that the session has been killed. That user can no longer make calls to the database without beginning a new session. Consider this data from the V$SESSION dynamic performance table:

SELECT sid, serial, username
FROM v$session

  SID SERIAL USERNAME

----- --------- ----------------
    1         1
    2         1
    3         1
    4         1
    5         1
    7         1
    8        28 OPS$BQUIGLEY
   10       211 OPS$SWIFT
   11        39 OPS$OBRIEN
   12        13 SYSTEM
   13         8 SCOTT


The following statement kills the session of the user SCOTT using the SID and SERIAL# values from V$SESSION:

ALTER SYSTEM KILL SESSION '13, 8'; -Ethan
www.freetechnicaltraining.com
www.gnumetrics.com

In article <8i3hv2$lod$1_at_nnrp1.deja.com>,   ctenos_at_my-deja.com wrote:
> Hello and welcome to another one of my newbie simpleton questions....
>
> We have a testing machine that people bang away when developing some
> web apps using PHP.... The problem is that there are a lot of
 sessions
> that get hung up (that is, the damn developers do not use error
> trapping and then disconnect from the database). It is common to come
> to work and finding tons of sessions that have been inactive for
> several days (v$session).
>
> How do I kill this sessions without using the Instance manager???? We
> are running 8.1.6 on a solaris machine (E250).... Is there like a
 kill
> command I could run from SQLPLUS from any other machine so I do not
> have to go and visit the mighty server???
>
> Thanks in advance,
>
> -R!
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

--
http://www.freetechnicaltraining.com/home/ethan


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Jun 12 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US