查看rman备份的详细信息:V$RMAN_BACKUP_JOB_DETAILS
<p>V$RMAN_BACKUP_JOB_DETAILS 展示了rman备份的相关细节。比如,rman备份持续时间、rman备份的执行次数、每一次rman备份工作的状态(failed or completed and so on),每次rman备份的起始时间等等。</p>
<p>SQL> desc sys.v$rman_backup_job_details
Name Null? Type
----------------------------------------- -------- ----------------------------
SESSION_KEY NUMBER
SESSION_RECID NUMBER
SESSION_STAMP NUMBER
COMMAND_ID VARCHAR2(33)
START_TIME DATE #备份开始时间
END_TIME DATE #备份结束时间
INPUT_BYTES NUMBER #输入的数据大小
OUTPUT_BYTES NUMBER #输出的数据总大小
STATUS_WEIGHT NUMBER
OPTIMIZED_WEIGHT NUMBER
OBJECT_TYPE_WEIGHT NUMBER
OUTPUT_DEVICE_TYPE VARCHAR2(17) #备份设备类型
AUTOBACKUP_COUNT NUMBER<br />
BACKED_BY_OSB VARCHAR2(3)
AUTOBACKUP_DONE VARCHAR2(3)
STATUS VARCHAR2(23) #备份状态
INPUT_TYPE VARCHAR2(13) #备份的方式,比如全库备份、数据库增量备份、归档备份等等
OPTIMIZED VARCHAR2(3)<br />
ELAPSED_SECONDS NUMBER #备份花费的时间(秒)
COMPRESSION_RATIO NUMBER #压缩比
INPUT_BYTES_PER_SEC NUMBER #每秒输入多少字节
OUTPUT_BYTES_PER_SEC NUMBER #每秒输出多少字节
INPUT_BYTES_DISPLAY VARCHAR2(4000) #输入字节显示的单位<br />
OUTPUT_BYTES_DISPLAY VARCHAR2(4000) #输出字节显示的单位
INPUT_BYTES_PER_SEC_DISPLAY VARCHAR2(4000) #输入速率单位显示
OUTPUT_BYTES_PER_SEC_DISPLAY VARCHAR2(4000) #输出速率单位显示
TIME_TAKEN_DISPLAY VARCHAR2(4000) #所用时间,以用户可显示的格式 <nn>h:<nn>m:<nn>s 显示
CON_ID NUMBER
> 附录
<strong> STATUS:rman备份job的结果状态,选项值如下:</strong></p>
<ul>
<li>RUNNING WITH WARNINGS 正在备份但是有警告</li>
<li>RUNNING WITH ERRORS 正在备份但有错误</li>
<li>COMPLETED 正常备份完成</li>
<li>COMPLETED WITH WARNINGS 备份完成但是有警告</li>
<li>COMPLETED WITH ERRORS 备份完成但是有错误</li>
<li>FAILED 备份失败
<strong>INPUT_TYPE:备份方式,选项值如下:</strong>
<ul>
<li>DB FULL</li>
<li>RECVR AREA</li>
<li>DB INCR</li>
<li>DATAFILE FULL</li>
<li>DATAFILE INCR</li>
<li>ARCHIVELOG</li>
<li>CONTROLFILE</li>
<li>SPFILE</li>
</ul></li>
</ul>
<h1>查看备份情况</h1>
<pre><code class="language-sql">set pagesize 1000 linesize 200
col command_id for a20
col start_time for a20
col time_taken_display for a10
col status for a25
col input_type for a13
col output_device_type for a10
col input_bytes_display for a10
col output_bytes_display for a10
COL in_sec FORMAT a10
COL out_sec FORMAT a10
alter session set nls_date_format = 'YYYY-MM-DD HH24:MI:SS';
select * from
(select
SESSION_KEY
,start_time
, end_time
, time_taken_display
, status
, input_type
, output_device_type
,INPUT_BYTES_PER_SEC_DISPLAY in_sec
,OUTPUT_BYTES_PER_SEC_DISPLAY out_sec
, input_bytes_display
, output_bytes_display
from v$rman_backup_job_details
order by start_time DESC)
where rownum&lt;30</code></pre>
<p>参考:<a href="https://www.cnblogs.com/datalife/p/5085883.html">https://www.cnblogs.com/datalife/p/5085883.html</a>
Oracle官网解释:<a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/V-RMAN_BACKUP_JOB_DETAILS.html">https://docs.oracle.com/en/database/oracle/oracle-database/19/refrn/V-RMAN_BACKUP_JOB_DETAILS.html</a></p>