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';
I was struggling to kill rman sessions and I find this query very helpful.
ReplyDeleteGreat 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