Home / AppsDBA Scripts / 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;

 

 

About Syed Saad Ali

With 13 years of experience as a certified and skilled Oracle Database Administrator, I possess the expertise to handle various levels of database maintenance tasks and proficiently perform Oracle updates. Throughout my career, I have honed my analytical abilities, enabling me to swiftly diagnose and resolve issues as they arise. I excel in planning and executing special projects within time-sensitive environments, showcasing exceptional organizational and time management skills. My extensive knowledge encompasses directing, coordinating, and exercising authoritative control over all aspects of planning, organization, and successful project completions. Additionally, I have a strong aptitude for resolving customer relations matters by prioritizing understanding and effective communication. I am adept at interacting with customers, vendors, and management, ensuring seamless communication and fostering positive relationships.

Check Also

Application Report Queries

QUERY TO CHECK LIST OF RUNNING REQUEST

Leave a Reply