Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQLPLUS issue from ksh script
> 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-lReceived on Fri May 26 2006 - 13:30:30 CDT
![]() |
![]() |