|
single backup set. When a set is completely restored, RMAN begins reporting progress on the next set to restore.
To monitor RMAN job progress:
Before starting the RMAN job, create a script file (called, for this example, longops) containing the following SQL statement:
- 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;
Start RMAN and connect to the target database and recovery catalog (if used). Start an RMAN job. For example, enter: RMAN> RESTORE DATABASE; While the RMAN job is running, start SQL*Plus and connect to the target database, and execute the longops script to check the progress of the RMAN job. If you repeat the query while the RMAN job progresses, then you see output such as the following: SQL> @longops SID SERIAL# CONTEXT SOFAR TOTALWORK %_COMPLETE ---------- ---------- ---------- ---------- ---------- ---------- 8 19 1 10377 36617 28.34 SQL> @longops SID SERIAL# CONTEXT SOFAR TOTALWORK % COMPLETE ---------- ---------- ---------- ---------- ---------- ---------- 8 19 1 21513 36617 58.75 SQL> @longops SID SERIAL# CONTEXT SOFAR TOTALWORK % COMPLETE ---------- ---------- ---------- ---------- ---------- ---------- 8 19 1 29641 36617 80.95 SQL> @longops SID SERIAL# CONTEXT SOFAR TOTALWORK % COMPLETE ---------- ---------- ---------- ---------- ---------- ---------- 8 19 1 35849 36617 97.9 SQL> @longops no rows selected If you run the longops script at intervals of 2 minutes or more and the %_COMPLETE column does not increase, then RMAN is encountering a problem. See"Monitoring RMAN Interaction with the Media Manager" to obtain more information. If you frequently monitor the execution of long-running tasks, then you could create a shell script or batch file under your host operating system that runs SQL*Plus to execute this query repeatedly.
vciBiYWNrdXBPcGVyYW5kIFN1YmNsYXVzZQ==" width="100%">
| FILESPERSET integer |
Specifies the maximum number of input files to include in each output backup set. This parameter is only relevant when BACKUP generates backup sets. RMAN backs up the files in each backupSpec as one or more backup sets. When the number of files in eachbackupSpec exceeds the FILESPERSET setting, then RMAN splits the files into multiple backup sets accordingly. The default value for FILESPERSET is 64. The RMAN behavior is illustrated by the following BACKUP commands: BACKUP AS BACKUPSET (DATAFILE 3, 4, 5, 6, 7) (DATAFILE 8, 9); BACKUP AS BACKUPSET DATAFILE 3, 4, 5, 6, 7, 8, 9; BACKUP AS BACKUPSET DATAFILE 3, ... 72; In the first command, RMAN places data files 3, 4, 5, 6, and 7 into one backup set and data files 8 and 9 into another backup set. In the second command, RMAN places all data files into one backup set. In the third command, the ellipses indicate data files 3 through 72. Because in this case RMAN is backing up 70 data files, RMAN places 64 files in one backup set and 6 in another. By default, RMAN divides files among backup sets to make optimal use of channel resources. The number of files to be backed up is divided by the number of channels. If the result is less than 64, then this number is theFILESPERSET value. Otherwise, FILESPERSET defaults to 64. Note: You cannot specify the number of backup pieces that are in a backup set. |
|