Wednesday, August 30, 2023

How to Kill RMAN Process/session in oracle Database

 1. Os Level:

ps -ef|grep rman

kill -9 <process_id>


--Once killed the os session, rman sessions still running and taking backup in database level.

--Use the below query to find the % completion

2. Database Level:

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;


--Kill all the rman sessions in database.

alter system kill session '2515,27025' immediate;


Note: After killing database sessions using alter query, it will take sometime to clear the existing sessions. 

But % wont increase after killing database sessions.

No comments:

Post a Comment