Hi,
Is it possible to choose some sessions from session browser screen to kill and then create a script instead of just killing the sessions?
Hi,
Is it possible to choose some sessions from session browser screen to kill and then create a script instead of just killing the sessions?
Hi.
Sorry, there is no way to do that. Just curious - why not run it in Toad? Is it just that you don't want to wait for the script to complete?
-John
What I need is to run a certain process, but before running it, I need to kill a group of sessions and immediately start the process.
Therefore, I need to create a script that will kill all these connected sessions and then run the process right after.
The question is: How can I create this script in TOAD?
I would make a script that can be run in sqlplus, which creates the script to kill sessions, then starts your process.
so it would be something like:
BEGIN
FOR r IN (select sid,serial# from v$session where 'whatever your criteria is....')
LOOP
EXECUTE IMMEDIATE 'alter system kill session ''' || r.sid
|| ',' || r.serial# || ''' immediate';
END LOOP;
END;
/
Add another command here to start your process.
What I need is , to build the script using the session's information that already exists in session browser screen, not to write the script manually.
I understand that but it isn't possible now. If you can put your criteria into the pl/sql block above, you can just run that to kill the sessions.