Execute immediate problem
Posted on 2007-11-28
I got this code yesterday to track and kill TOAD sessions:
FOR s IN (SELECT SID, serial#
WHERE program LIKE '%TOAD%')
EXECUTE IMMEDIATE 'alter system kill session ''' || TO_CHAR(s.SID) || ', ' || TO_CHAR(s.serial#)
It picks up the session, but the execute immediate does not successfully kill the session although the pl/sql completes successfully. Within that code structure what modification do i need to make it work?