CREATE OR REPLACE PROCEDURE TOOLS.P_TLS_BACKUP_REPORT IS
-- Kamil Piórek
-- kamil.piorek@gmail.com
-- Procedure To Push Full Backup Report From DB
--
v_1 NUMBER (3);
BEGIN
SELECT Count(*) INTO v_1 FROM (
SELECT STATUS,INPUT_TYPE,OPTIMIZED,START_TIME,END_TIME,INPUT_BYTES,(SELECT Sum(bytes) FROM dba_segments) AS DB_SEGS_SIZE,OUTPUT_BYTES,INPUT_BYTES_DISPLAY
FROM SYS.V_$RMAN_BACKUP_JOB_DETAILS
WHERE INPUT_TYPE LIKE 'DB INCR' -- Inc Level 0 ( TYPE DB_INC )
ORDER BY START_time DESC
) WHERE INPUT_BYTES> DB_SEGS_SIZE -- Check Size Of Full Backup
AND END_TIME > SYSDATE - 8 AND status LIKE 'COMPLETED'; -- Check Status Of Backup
IF v_1 < 1 THEN
..... < dbms.smtp( SEND MAIL PROCEDURE Your Imp ) >
END IF ;
END ;
Komentarze
Prześlij komentarz