rmanjob.sql

--==================================================================
--
-- Title       :   rmanjob.sql
-- Description :   To show RMAN run time and status.
--
-- Usage/Notes :
--
-- Author      :   Adrian Preston MCSE+I MCDBA OCP
-- Date        :   22 September 2014
--
-- Version     :   1.00
--
-- Amendment   :
-- History
--
-- Copyright   :   ABCdba.com 2014
--
--==================================================================
 
SET TERMOUT OFF
STORE SET save_env.sql REPLACE
SET TERMOUT ON
 
CLEAR BREAKS
CLEAR COLUMNS
CLEAR COMPUTES
 
SET PAGESIZE 100
SET LINESIZE 132
 
COL session_key         FOR 9999999     HEA 'Session|  Key  '
COL input_type          FOR a13         HEA ' Input Type  '
COL status              FOR a23         HEA '      Job Status       '
COL start_time          FOR a18         HEA '    Start Time    '
col end_time            FOR a18         HEA '     End Time     '
COL elapsed             FOR 9999.99     HEA 'Elapsed| Mins '
 
SELECT
   session_key,
   input_type,
   status,
   TO_CHAR( start_time, 'dd/mm/yy hh24:mi:ss' ) start_time,
   TO_CHAR( end_time,'dd/mm/yy hh24:mi:ss' ) end_time,
   ( elapsed_seconds / 60 ) elapsed
FROM
   v$rman_backup_job_details
ORDER BY
   session_key
/
 
SET TERMOUT OFF
@save_env.sql
host rm save_env.sql
SET TERMOUT ON

© copyright 2001-2014 ABCdba.com | all rights reserved