run
{
  ALLOCATE CHANNEL ch11 TYPE DISK;
  BACKUP AS COMPRESSED BACKUPSET skip inaccessible
  FORMAT '/backup/%T_D_%d_DBID_%I_%u_s%s_p%p.bck'
  DATABASE
  CURRENT CONTROLFILE
  FORMAT '/backup/%T_C_%d_DBID_%I_%u.bck'
  SPFILE
  FORMAT '/backup/%T_S_%d_DBID_%I_%u.bck'
  PLUS ARCHIVELOG
  FORMAT '/backup/%T_A_%d_DBID_%I_%u_s%s_p%p.bck';
  RELEASE CHANNEL ch11;
}



set lines 250 pages 9999
col opname form a40
col operation form a20
col status form a30
alter session set nls_date_format = "YYYY-MM-DD HH24:MI:SS";
 
SELECT sysdate, OPNAME, SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK, start_time, last_update_time, ROUND(SOFAR/TOTALWORK*100,2) "%_COMPLETE" FROM gV$SESSION_LONGOPS WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;


