First, Dbms_jobs
1, check the running job;
SELECT * from User_scheduler_running_jobs
2, according to Sid isolated the corresponding session;
Select sid,serial# from v$session where sid= ' session_id ';
3, kill the corresponding session;
Alter system kill session ' &sid,&serial ';
Then delete the job, then you can.
Some jobs were killed in the session, although the status has been set wiekilled, but because the resources can not be released immediately, Jobs will continue to run. At this point, if you want to end the script immediately, you can further kill the system process.
1, through the above command to kill the process, the status of the process will be set to "killed", but the locked resource is not released, then you can kill the corresponding process (thread) at the OS level, first execute the following statement to get the process (thread) Number:
Select Spid,osuser,s.program
From V$session s,v$process p
where s.paddr = p.addr and s.sid = ' Sid '
Note: Here is the first sentence to find out the SID,
Execute the above statement and get out of the SPID
2. Kill the process (thread) by clearing the cmd command on the OS
1) First, on Unix OS, execute the following command as root:
#kill-9 728 (728 1 of the statements in the query out of the SPID)
2) The second type, in Windows, kills threads with Orakill,
The syntax is: Orakill SID thread
Note: SID, here's the SID for the instance name of the database where you killed the process
Thread, which refers to the number of threads you want to kill for the process, the SPID queried for 1
Examples are as follows:
C:documents and Settingsadministrator>orakill Zghx 728
Kill of thread ID 728 in instance zghx successfully signalled.
Oracle Script stops Advanced