-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrman_progress.sql
35 lines (32 loc) · 1.01 KB
/
rman_progress.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
----------------------------------------------------------------------------------------
--
-- File name: rman_progress.sql
--
-- Purpose: Shows progress of database backup
--
-- Author: jpsaraiva
--
-- Version: 2017/02/13
--
-- Example: @rman_progress.sql
--
-- Notes: Developed and tested on 11.2.0.4.
--
---------------------------------------------------------------------------------------
--
set pagesize 100 lines 120 pages 1000 heading on feed off null '' ver off
col sse format a15
col opname format a20 word_wrapped
col target_desc format a10 word_wrapped
col message format a30 word_wrapped
col "PROGRESS(%)" format 999.00
SELECT sid||','||serial# sse
, TO_CHAR(start_time,'YYYY-MM-DD HH24:MI:SS') AS start_time
, to_char(sysdate + TIME_REMAINING/3600/24, 'YYYY-MM-DD HH24:MI:SS') end_time
, totalwork
, sofar
, ROUND((sofar/totalwork)*100, 2) "PROGRESS(%)"
, message
from v$session_longops
where totalwork > sofar
AND opname like 'RMAN%';