
We can kill RMAN backup job with the help of 2 methods, as below:
Method I:
Alter system kill session:
First, get the SID and SERIAL# from below query:
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 ---------- ---------- ------------ --------------------------------- 592 12 865 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 ---------- ---------- ---------- ---------- ---------- ---------- 592 12 1 9115569 19258880 47.33
Use the following command to kill RMAN backup job:
SQL> alter system kill session '592,12' immediate; system altered.
Backup job killed successfully, simultaneously you will get below mentioned error log in RMAN backup logs:
RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup plus archivelog command at 07/01/2017 00:09:15 RMAN-10038: database session for channel full_chanel terminated unexpectedly
Method II:
Directly kill RMAN job from OS level with the help of “kill -9”
[oracle@PR ~]$ ps -ef | grep rman|grep -v grep oracle 2348 3124 3 01:28 pts/1 00:00:00 rman target /
[oracle@PR ~]$ kill -9 2348
Thanks, Stay Tune. 🙂
IMHO you can do a kill -6 (SIGTERM) instead of the kill -9 (SIGKILL)