Syed Saad Ali

Oracle ACE Pro

Oracle Solution Architect

Oracle E-Business Suite

Oracle Cloud Infrastructure

Oracle Fusion Middleware

Oracle Database Administration

Oracle Weblogic Administration

Syed Saad Ali

Oracle ACE Pro

Oracle Solution Architect

Oracle E-Business Suite

Oracle Cloud Infrastructure

Oracle Fusion Middleware

Oracle Database Administration

Oracle Weblogic Administration

Blog Post

Query to Monitor RMAN Backups

Query to Monitor RMAN Backups

SELECT Count(*) 
FROM   v$backup_async_io 
WHERE  status = ‘IN PROGRESS’; 

Session information on backups

SELECT s.sid,
username   AS “User”,
program,
MODULE,
action,
logon_time “Logon”,
l.*
FROM   v$session s,
v$enqueue_lock l
WHERE  l.sid = s.sid
AND l.TYPE = ‘CF’
AND l.id1 = 0
AND l.id2 = 2;

RMAN backup overall progress status

SELECT Decode(context, 1, ‘This Task:’,
2, ‘Agregate:’,
‘?’)              Context,
sofar,
totalwork,
Round(sofar / totalwork * 100, 2) “% Complete”
FROM   v$session_longops
WHERE  opname LIKE ‘RMAN%’
AND opname LIKE ‘%aggregate%’
AND totalwork != 0
AND sofar <> totalwork
UNION
SELECT Decode(context, 1, ‘This Task:’,
2, ‘Agregate:’,
‘?’)              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;

 

 

Related Posts
Write a comment