How to kill RMAN backup jobs? Methods and scripts to kill RMAN backup jobs?
meda Changed status to publish 01/12/2022
You can kill RMAN jobs either using the Alter system kill session command Or at Operating system level with the help of “kill -9”.
Example 1: Alter system kill session, first, get the SID and SERIAL#
SQL> select b.sid, b.serial#, a.spid, b.client_info from v$process a, v$session b where a.addr=b.paddr and client_info like 'rman%'; SID SERIAL# SPID CLIENT_INFO ---------- ---------- ------------ --------------------------------- 295 11 568 rman channel=full_chanel
OR
SQL> SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK, ROUND (SOFAR/TOTALWORK*100, 2) "% COMPLETE" FROM V$SESSION_LONGOPS WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%' AND TOTALWORK! = 0 AND SOFAR <> TOTALWORK; SID SERIAL# CONTEXT SOFAR TOTALWORK %COMPLETE ---------- ---------- ---------- ---------- ---------- ---------- 295 11 1 8215569 28258880 56.20
And then execute the following command:
SQL> alter system kill session '295,11' immediate; system altered.
Example 2: At OS level :
[oracle@PR ~]$ ps -ef | grep rman|grep -v grep oracle 8432 2431 3 01:37 pts/1 00:00:00 rman target / [oracle@PR ~]$ kill -9 8432
Ezana Edited answer 05/04/2023