Monitor RMAN

set lineszie 150
column sid format 999999
column serial# format 999999
column spid format 9999999999
column client_info format a25
SELECT b.sid, b.serial#, a.spid, b.client_info
FROM v$process a, v$session b
WHERE a.addr = b.paddr
   AND b.client_info LIKE '%rman%';


    SID SERIAL# SPID                     CLIENT_INFO
------- ------- ------------------------ -------------------------
   1004   13030 61407298                 rman channel=d1
    841    2499 62390376                 rman channel=d2



set linesize 150
column program format a25
column opname format a25
SELECT S.SID,
       S.SERIAL#,
       S.PROGRAM,
       SL.OPNAME,
       SL.TIME_REMAINING
FROM V$SESSION S, V$SESSION_LONGOPS SL
WHERE S.SID=SL.SID
AND S.SERIAL#=SL.SERIAL#
AND S.PROGRAM LIKE '%RMAN%'
AND TIME_REMAINING > 0;




set linesize 150
column sid format 99,999
column serial# format 99,999,999
column sofar format 9,999,999,999
column totalwork format 99,999,999,999
SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,
ROUND(SOFAR/TOTALWORK*100,2) AS PCT_COMPLETE
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%'
AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK != 0
AND SOFAR <> TOTALWORK;

    SID     SERIAL#    CONTEXT          SOFAR       TOTALWORK PCT_COMPLETE
------- ----------- ---------- -------------- --------------- ------------
  1,004      13,030          1      1,236,094       1,310,720        94.31
    841       2,499          1      1,012,990       1,310,720        77.29



set pagesize 1000
set linesize 180
column filename format a85
column devtype format a5
column setcnt format 9,999,999,999
column bufcnt format 9,999,999
column buffer_size format 9,999,999,999
column type format a10
SELECT SET_COUNT AS SETCNT,
DEVICE_TYPE AS DEVTYPE,
TYPE,
FILENAME,
BUFFER_SIZE,
BUFFER_COUNT AS BUFCNT,
OPEN_TIME,
CLOSE_TIME
FROM V$BACKUP_ASYNC_IO
ORDER BY SETCNT, TYPE, OPEN_TIME, CLOSE_TIME;


        96,807 DISK  OUTPUT     /data/oracle/SHRARS/backup/database/df.SHRARS.66.dbf_l0_t954175202_s96807_p1.rmn           1,048,576          4 08-SEP-17    08-SEP-17
        96,808 DISK  AGGREGATE                                                                                                     0          0 08-SEP-17    08-SEP-17
        96,808 DISK  INPUT      /data/oracle/SHRARS/data02/datacore_0037.dbf                                               1,048,576         16 08-SEP-17    08-SEP-17
        96,808 DISK  OUTPUT     /data/oracle/SHRARS/backup/database/df.SHRARS.67.dbf_l0_t954175217_s96808_p1.rmn           1,048,576          4 08-SEP-17    08-SEP-17
        96,809 DISK  AGGREGATE                                                                                                     0          0 08-SEP-17    08-SEP-17
        96,809 DISK  INPUT      /data/oracle/SHRARS/data01/datacore_0038.dbf                                               1,048,576         16 08-SEP-17    08-SEP-17
        96,809 DISK  OUTPUT     /data/oracle/SHRARS/backup/database/df.SHRARS.68.dbf_l0_t954175492_s96809_p1.rmn           1,048,576          4 08-SEP-17    08-SEP-17
        96,810 DISK  AGGREGATE                                                                                                     0          0 08-SEP-17    08-SEP-17
        96,810 DISK  INPUT      /data/oracle/SHRARS/data02/datacore_0039.dbf                                               1,048,576         16 08-SEP-17    08-SEP-17
        96,810 DISK  OUTPUT     /data/oracle/SHRARS/backup/database/df.SHRARS.69.dbf_l0_t954175518_s96810_p1.rmn           1,048,576          4 08-SEP-17    08-SEP-17
        96,811 DISK  AGGREGATE                                                                                                     0          0 08-SEP-17    08-SEP-17
        96,811 DISK  INPUT      /data/oracle/SHRARS/data01/datacore_0040.dbf                                               1,048,576         16 08-SEP-17    08-SEP-17
        96,811 DISK  OUTPUT     /data/oracle/SHRARS/backup/database/df.SHRARS.70.dbf_l0_t954175803_s96811_p1.rmn           1,048,576          4 08-SEP-17    08-SEP-17
        96,812 DISK  AGGREGATE                                                                                                     0          0 08-SEP-17    08-SEP-17
        96,812 DISK  INPUT      /data/oracle/SHRARS/data02/datacore_0041.dbf                                               1,048,576         16 08-SEP-17    08-SEP-17
        96,812 DISK  OUTPUT     /data/oracle/SHRARS/backup/database/df.SHRARS.71.dbf_l0_t954175818_s96812_p1.rmn           1,048,576          4 08-SEP-17    08-SEP-17
        96,813 DISK  AGGREGATE                                                                                                     0          0 08-SEP-17
        96,813 DISK  INPUT      /data/oracle/SHRARS/data01/datacore_0042.dbf                                               1,048,576         16 08-SEP-17
        96,813 DISK  OUTPUT     /data/oracle/SHRARS/backup/database/df.SHRARS.72.dbf_l0_t954176093_s96813_p1.rmn           1,048,576          4 08-SEP-17
        96,814 DISK  AGGREGATE                                                                                                     0          0 08-SEP-17
        96,814 DISK  INPUT      /data/oracle/SHRARS/data02/datacore_0043.dbf                                               1,048,576         16 08-SEP-17
        96,814 DISK  OUTPUT     /data/oracle/SHRARS/backup/database/df.SHRARS.73.dbf_l0_t954176108_s96814_p1.rmn           1,048,576          4 08-SEP-17

2136 rows selected.



set linesize 150
column sid format 99,999
column serial# format 99,999
SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK,
ROUND(SOFAR/TOTALWORK*100,2) AS PCT_COMPLETE
FROM V$SESSION_LONGOPS
WHERE OPNAME LIKE 'RMAN%'
AND OPNAME NOT LIKE '%aggregate%'
AND TOTALWORK != 0
AND SOFAR <> TOTALWORK;

    SID SERIAL#    CONTEXT          SOFAR       TOTALWORK PCT_COMPLETE
------- ------- ---------- -------------- --------------- ------------
    841   2,499          1      1,294,974       1,310,720         98.8






*********************************************************************************************************************************************
set linesize 150
set pagesize 1000
column session_recid format 9999999
column input_bytes_per_sec_display format a30
column output_bytes_per_sec_display format a30
column time_taken_display format a30
SELECT * FROM
(
SELECT session_recid,
       input_bytes_per_sec_display,
       output_bytes_per_sec_display,
       time_taken_display,
       start_time,
       end_time
FROM v$rman_backup_job_details
ORDER BY end_time desc
)
WHERE ROWNUM <= 20;

SESSION_RECID INPUT_BYTES_PER_SEC_DISPLAY    OUTPUT_BYTES_PER_SEC_DISPLAY   TIME_TAKEN_DISPLAY             START_TIME   END_TIME
------------- ------------------------------ ------------------------------ ------------------------------ ------------ ------------
       103008    68.00M                          9.01M                      00:42:47                       08-SEP-17    08-SEP-17
       102998    20.30M                          6.29M                      00:04:00                       08-SEP-17    08-SEP-17
       102988    21.82M                          6.44M                      00:03:13                       08-SEP-17    08-SEP-17
       102980    21.56M                          7.92M                      00:02:27                       08-SEP-17    08-SEP-17
       102977    15.98M                         16.02M                      00:00:04                       08-SEP-17    08-SEP-17
       102974    70.93M                          8.51M                      02:03:46                       08-SEP-17    08-SEP-17
       102964    19.71M                          6.30M                      00:04:19                       07-SEP-17    07-SEP-17
       102954    20.43M                          6.24M                      00:03:26                       07-SEP-17    07-SEP-17
       102944    19.73M                          5.83M                      00:03:25                       07-SEP-17    07-SEP-17
       102936    21.18M                          7.66M                      00:02:07                       07-SEP-17    07-SEP-17
       102933    15.98M                         16.02M                      00:00:04                       07-SEP-17    07-SEP-17
       102930    72.75M                          8.73M                      02:00:41                       07-SEP-17    07-SEP-17
       102920    17.52M                          5.74M                      00:04:28                       06-SEP-17    06-SEP-17
       102910    18.03M                          5.44M                      00:03:58                       06-SEP-17    06-SEP-17
       102900    21.46M                          6.29M                      00:03:06                       06-SEP-17    06-SEP-17
       102892    22.40M                          8.03M                      00:02:07                       06-SEP-17    06-SEP-17
       102889    15.98M                         16.02M                      00:00:04                       06-SEP-17    06-SEP-17
       102886    73.78M                          8.85M                      01:58:59                       06-SEP-17    06-SEP-17
       102876    17.68M                          5.89M                      00:04:29                       05-SEP-17    05-SEP-17
       102866    16.67M                          5.37M                      00:05:51                       05-SEP-17    05-SEP-17

20 rows selected.


to_date(start_time,'dd-mon-rrrr hh24:mi:ss');


set linesize 150
set pagesize 1000
column session_recid format 9999999
column input_bytes_per_sec_display format a30
column output_bytes_per_sec_display format a30
column time_taken_display format a30
SELECT session_recid,
       input_bytes_per_sec_display,
       output_bytes_per_sec_display,
       time_taken_display,
       end_time
FROM v$rman_backup_job_details
ORDER BY end_time desc;

SESSION_RECID INPUT_BYTES_PER_SEC_DISPLAY    OUTPUT_BYTES_PER_SEC_DISPLAY   TIME_TAKEN_DISPLAY             END_TIME
------------- ------------------------------ ------------------------------ ------------------------------ ------------
       103008    69.72M                          9.08M                      00:12:55                       08-SEP-17
       102998    20.30M                          6.29M                      00:04:00                       08-SEP-17
       102988    21.82M                          6.44M                      00:03:13                       08-SEP-17
       102980    21.56M                          7.92M                      00:02:27                       08-SEP-17
       102977    15.98M                         16.02M                      00:00:04                       08-SEP-17
       102974    70.93M                          8.51M                      02:03:46                       08-SEP-17
       102964    19.71M                          6.30M                      00:04:19                       07-SEP-17
       102954    20.43M                          6.24M                      00:03:26                       07-SEP-17
       102944    19.73M                          5.83M                      00:03:25                       07-SEP-17
       102936    21.18M                          7.66M                      00:02:07                       07-SEP-17
       102933    15.98M                         16.02M                      00:00:04                       07-SEP-17
       102930    72.75M                          8.73M                      02:00:41                       07-SEP-17
       102920    17.52M                          5.74M                      00:04:28                       06-SEP-17
       102910    18.03M                          5.44M                      00:03:58                       06-SEP-17
       102900    21.46M                          6.29M                      00:03:06                       06-SEP-17
       102892    22.40M                          8.03M                      00:02:07                       06-SEP-17
       102889    15.98M                         16.02M                      00:00:04                       06-SEP-17
       102886    73.78M                          8.85M                      01:58:59                       06-SEP-17
       102876    17.68M                          5.89M                      00:04:29                       05-SEP-17
       102866    16.67M                          5.37M                      00:05:51                       05-SEP-17
       102856    20.38M                          6.03M                      00:03:13                       05-SEP-17





set linesize 150
column sid format 999999
column serial# format 9,999,999,999
column sofar format 9,999,999,999
column totalwork format 99,999,999,999
column opname format a35
select sid, serial#, sofar, totalwork, opname,
       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;

   SID        SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- -------------- -------------- --------------- ----------------------------------- ----------
   1004         13,030        634,750       1,310,720 RMAN: full datafile backup               48.43
    841          2,499        594,814       1,310,720 RMAN: full datafile backup               45.38


    SID        SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- -------------- -------------- --------------- ----------------------------------- ----------
   1004         13,030        760,190       1,310,720 RMAN: full datafile backup                  58
    841          2,499        686,718       1,310,720 RMAN: full datafile backup               52.39

    SID        SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- -------------- -------------- --------------- ----------------------------------- ----------
   1004         13,030        345,214       1,310,720 RMAN: full datafile backup               26.34
    841          2,499        290,046       1,310,720 RMAN: full datafile backup               22.13

    SID        SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- -------------- -------------- --------------- ----------------------------------- ----------
   1004         13,030        205,566       1,310,720 RMAN: full datafile backup               15.68
    841          2,499        183,806       1,310,720 RMAN: full datafile backup               14.02


    SID        SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- -------------- -------------- --------------- ----------------------------------- ----------
    841          2,550         88,702       1,310,720 RMAN: full datafile restore               6.77


    SID        SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- -------------- -------------- --------------- ----------------------------------- ----------
   1004         13,189        152,062       1,310,720 RMAN: full datafile restore               11.6
    841          2,550        228,462       1,310,720 RMAN: full datafile restore              17.43



set linesize 250
column sid format 999999
column serial# format 9,999,999
column sofar format 9,999,999,999
column totalwork format 99,999,999,999
column spid format a10
column client_info format a20
column opname format a35
column message format a80
select s.client_info,
       sl.opname,
       sl.message,
       sl.sid,
       sl.serial#,
       p.spid,
       sl.sofar,
       sl.totalwork,
       round(sl.sofar/sl.totalwork*100,2) "% Complete"
from v$session_longops sl, v$session s, v$process p
where p.addr = s.paddr
and sl.sid=s.sid
and sl.serial#=s.serial#
and opname LIKE 'RMAN%'
and opname NOT LIKE '%aggregate%'
and totalwork != 0
and sofar <> totalwork;


CLIENT_INFO          OPNAME                              MESSAGE                                                                              SID    SERIAL# SPID            SOFAR       TOTALWORK % Complete
-------------------- ----------------------------------- -------------------------------------------------------------------------------- ------- ---------- ---------- ---------- --------------- ----------
rman channel=d1      RMAN: full datafile backup          RMAN: full datafile backup: Set Count 96803: 622334 out of 1310720 Blocks done      1004     13,030 61407298      622,334       1,310,720      47.48
rman channel=d2      RMAN: full datafile backup          RMAN: full datafile backup: Set Count 96804: 542078 out of 1310720 Blocks done       841      2,499 62390376      542,078       1,310,720      41.36


CLIENT_INFO          OPNAME                              MESSAGE                                                                              SID    SERIAL# SPID                SOFAR       TOTALWORK % Complete
-------------------- ----------------------------------- -------------------------------------------------------------------------------- ------- ---------- ---------- -------------- --------------- ----------
rman channel=d1      RMAN: full datafile backup          RMAN: full datafile backup: Set Count 96807: 219390 out of 1310720 Blocks done      1004     13,030 61407298          219,390       1,310,720      16.74
rman channel=d2      RMAN: full datafile backup          RMAN: full datafile backup: Set Count 96808: 165502 out of 1310720 Blocks done       841      2,499 62390376          165,502       1,310,720      12.63

CLIENT_INFO          OPNAME                              MESSAGE                                                                              SID    SERIAL# SPID                SOFAR       TOTALWORK % Complete
-------------------- ----------------------------------- -------------------------------------------------------------------------------- ------- ---------- ---------- -------------- --------------- ----------
rman channel=d1      RMAN: full datafile backup          RMAN: full datafile backup: Set Count 96815: 323454 out of 1310720 Blocks done      1004     13,030 61407298          323,454       1,310,720      24.68
rman channel=d2      RMAN: full datafile backup          RMAN: full datafile backup: Set Count 96816: 308222 out of 1310720 Blocks done       841      2,499 62390376          308,222       1,310,720      23.52

CLIENT_INFO          OPNAME                              MESSAGE                                                                              SID    SERIAL# SPID                SOFAR       TOTALWORK % Complete
-------------------- ----------------------------------- -------------------------------------------------------------------------------- ------- ---------- ---------- -------------- --------------- ----------
rman channel=d1      RMAN: full datafile backup          RMAN: full datafile backup: Set Count 96847: 492670 out of 786432 Blocks done       1004     13,030 61407298          492,670         786,432      62.65


CLIENT_INFO          OPNAME                              MESSAGE                                                                              SID    SERIAL# SPID                SOFAR       TOTALWORK % Complete
-------------------- ----------------------------------- -------------------------------------------------------------------------------- ------- ---------- ---------- -------------- --------------- ----------
rman channel=d1      RMAN: full datafile restore         RMAN: full datafile restore: Set Count 96800: 730710 out of 1310720 Blocks done      841      2,550 61407312          730,710       1,310,720      55.75
rman channel=d2      RMAN: full datafile restore         RMAN: full datafile restore: Set Count 96799: 668174 out of 1310720 Blocks done     1004     13,189 64553078          668,174       1,310,720      50.98



set linesize 150
column sid format 999999
column serial# format 9,999,999
column sofar format 9,999,999,999
column totalwork format 99,999,999,999
column opname format a35
select sid, serial#, sofar, totalwork,opname,
       round(sofar/totalwork*100,2) "% Complete"
from v$session_longops
where opname LIKE 'RMAN%aggregate%'
and totalwork != 0
and sofar <> totalwork;

    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     12,476,520      67,419,776 RMAN: aggregate input                    18.51


    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     14,410,084      67,419,776 RMAN: aggregate input                    21.37

    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     15,399,904      67,419,776 RMAN: aggregate input                    22.84


    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     22,053,332      67,419,776 RMAN: aggregate input                    32.71


    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     23,007,056      67,419,776 RMAN: aggregate input                    34.13

    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     31,084,108      67,419,776 RMAN: aggregate input                    46.11

    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     35,662,404      67,419,776 RMAN: aggregate input                     52.9

    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     37,874,620      67,419,776 RMAN: aggregate input                    56.18


    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     41,175,088      67,419,776 RMAN: aggregate input                    61.07

    SID    SERIAL#          SOFAR       TOTALWORK OPNAME                              % Complete
------- ---------- -------------- --------------- ----------------------------------- ----------
    939     42,987     45,173,920      67,419,776 RMAN: aggregate input                       67


请使用浏览器的分享功能分享到微信等