oracle备份信息查询

SELECT TRIM(START_TIME || '#'),
       TRIM(END_TIME || '#'),
       TRIM(CASE OUTPUT_DEVICE_TYPE
              WHEN 'DISK' THEN
               'DISK'
              WHEN 'SBT_TAPE' THEN
               'SBT_TAPE'
              ELSE
               'Others'
            END || '#') AS BACKUP_DEVICE,
       TRIM(STATUS || '#'),
       TRIM(CASE INPUT_TYPE
              WHEN 'DB FULL' THEN
               'DB_FULL'
              WHEN 'DB INCR' THEN
               'DB_INCR'
              WHEN 'ARCHIVELOG' THEN
               'DB_ARCH'
              ELSE
               'Others'
            END || '#') AS BACKUP_TYPE,
       TRIM(ROUND(ELAPSED_SECONDS / 60 / 60, 2) || '#') AS T,
       TRIM(OUTPUT_BYTES_DISPLAY || '#') AS DB_SIZE
  FROM V$RMAN_BACKUP_JOB_DETAILS
 WHERE START_TIME = (SELECT MAX(START_TIME) FROM V$RMAN_BACKUP_JOB_DETAILS);

posted @ 2018-04-03 10:45  钱若梨花落  阅读(251)  评论(0编辑  收藏  举报