Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Forcing session to disconnect
Hi
About your question to Oracle Group
Look, I extract specials sql script to do that. You must connect with sys to
execute.
set heading off
set termout off
set verify off
set echo off
set feedback off
alter system enable restricted session
/
alter system checkpoint global
/
spool kill_all.sql
select 'execute
kill_session('||chr(39)||sid||chr(39)||','||chr(39)||serial#||chr(39)||');'
from v$session
where username is not null
or username <> 'SYS'
/
spool off
start kill_all.sql
exit
Hope this help you.
Olivier Bercovitz wrote:
> Hello everybody,
>
> Do you know if there is a way to disconnect (clean) all Oracle sessions
> without shutdown an startup the database.
> We need to disconnect or kill all the sessions to free all locks so even
>
> for the sessions currently running.
> When we try "alter system kill session...." sometime the statement is
> locked
> so how can we do to free all locks for all the sessions and to be sure
> that
> all locks are free ??
> Thanks in advance
>
> Regards.
> Olivier
>
--
"Smell the Flower While you can"