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: Sean Zhang <sean_at_cnfei.com>
Date: 2000/06/12
Message-ID: <9jc15.2658$L4.3421653@firenze.visi.net>#1/1

You have two options at least,
1. you can create a profile and bind the profile to all users whose session   you want to kill after a period of time:   sqlplus>connect system/manager
  sqlplus > create profile test_profile limit idle_time 60;   sqlplus > alter user username profile test_profile; 2. user "alter system "
  sqlplus >connect system/manager
   sqlplus>select sid, serila# from v$session where status='INACTIVE' and

          login_time<sysdate-1 ( or some other condition);    sqlplus>alter system kill session 'sid, serial# ';     You can write a shell script to kill all sessions once. The first solution is easy and clean.

Hope this helps.

sean zhang
sean_at_cnfei.com

<ctenos_at_my-deja.com> wrote in message news:8i3hv2$lod$1_at_nnrp1.deja.com...
> 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.
Received on Mon Jun 12 2000 - 00:00:00 CDT

Original text of this message

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