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.
- While a normal backup or restore is in progress, open a new command line interface window.
- Start sqlplus
In Windows: sqlplus %NH_USER%/%NH_USER%@%NH_DB_CONNECT_STRING%
In Solaris/Linux: sqlplus $NH_USER/$NH_USER@$NH_DB_CONNECT_STRING
- Enter the following query to check progress of the backup or restore.
SELECT sid, serial#, context, sofar, totalwork,
round(sofar/totalwork*100,2) “% Complete”
WHERE totalwork 0
and upper(opname) like ‘%RMAN%’
and sofar totalwork;
The table below shows an example of the output the query might display.
There are usually multiple processes linked to the backup or restore. Output will display each process, how far that process has gone out of total work to be completed, and then a simple percentage value.