I'm trying to kill sessions on a very old Oracle server (8.0.5.0) with the following script:
begin
for x in (select SID,Serial#,status,last_call_et,username from v$session
where type='USER'
and status='INACTIVE'
and username = 'TESTER'
and last_call_et > 1200
) loop
execute 'Alter System Kill Session '''|| x.Sid
|| ',' || x.Serial# || '''';
end loop;
end;
/
I have a syntax or quote problem since the script errors at "'Alter" with an error stating encountered the symbol "Alter System Kill Session "' when expecting one of the following: :=.(@%; in Toad.
Any help would be appreciated for anyone who has this old of a version to test wtih.
begin
for x in (select SID,Serial#,status,last_call_et,username from v$session
where type='USER'
and status='INACTIVE'
and username = 'TESTER'
and last_call_et > 1200
) loop
execute 'Alter System Kill Session '''|| x.Sid
|| ',' || x.Serial# || '''';
end loop;
end;
/
I have a syntax or quote problem since the script errors at "'Alter" with an error stating encountered the symbol "Alter System Kill Session "' when expecting one of the following: :=.(@%; in Toad.
Any help would be appreciated for anyone who has this old of a version to test wtih.