SUMMARY
Creating a normal (binary) database backup with nhSaveDb, or restoring a normal backup with nhLoadDb, is a time consuming process that gives little indication of whether the process is running or in a hung state. Standard output to screen does not update until the process has completed or has failed, which can legitimately take several hours. Customers would like a way to determine progress on a backup or restore process.
INSTRUCTIONS
SELECT sid, serial#, context, sofar, totalwork,
round(sofar/totalwork*100,2) “% Complete”
FROM v$session_longops
WHERE totalwork 0
and upper(opname) like ‘%RMAN%’
and sofar totalwork;
The table below shows an example of the output the query might display.
SID | SERIAL# | CONTEXT | SOFAR | TOTALWORK | % Complete |
1026 | 26544 | 1 | 2081106 | 10752000 | 19.36 |
1002 | 28050 | 3 | 102401569 | 269149445 | 38.05 |
1037 | 16054 | 1 | 9125198 | 10854400 | 84.07 |
962 | 18556 | 1 | 9226142 | 10854400 | 85 |
… | … | 1 | … | … | … |