Java Mailing List Archive

http://www.dba.5341.com/

Home » Home (12/2007) » oracle l »

Re: SQLPLUS issue from ksh script

cichomitiko gmail

2006-05-26

Replies:

> It works in "pure" sqlplus, just not in the script.
>
> Ideas? Thanks.


sqlplus "/ as sysdba" <<EOJ
declare

STR VARCHAR2(2000);

begin

for x in (select * from v\$session) loop
  IF x.user# = 27 then
   str := ' alter system kill session ''' || x.sid || ',' || x.serial#
||'''';
   execute immediate str;
  End if;
END LOOP;
end;
/

EOJ


Regards
Dimitre

--
http://www.freelists.org/webpage/oracle-l


©2008 dba.5341.com - Jax Systems, LLC, U.S.A.