Tuesday, January 29, 2013

Safely Terminate an RMAN Job



This will help avoid leaving zombie processes

select 'alter system kill session '''||sid||','||serial#||''' immediate;' from gv$session where MODULE like 'rman%';

or

select inst_id,sid,serial# from gv$session where MODULE like 'rman%';
alter system kill session 'sid,serial' immediate;

For Incremental backups:
select 'alter system kill session '''||sid||','||serial#||''' immediate;' from gv$session where MODULE = 'backup incr datafile';

2 comments:

  1. I was struggling to kill rman sessions and I find this query very helpful.

    ReplyDelete
  2. Great thanks for sharing it. There are many situations where RMAN session keep on hanging due to many reasons like bad command structure, memory, cache etc.. and we need to kill it. This will definitely help.

    ReplyDelete