ON CALL DBA SUPPORT

— Database blog

Archive for October, 2014

QUERY TO FIND RMAN BACKUP STATUS IN A DATABASE

Posted by ssgottik on 31/10/2014

set lines 200;
set pages 200;
SELECT INPUT_TYPE “Backup Type”,incremental_level,d.session_recid,
TO_CHAR(d.START_TIME,’mm/dd/yy hh24:mi’) “start_time”,
TO_CHAR(END_TIME,’mm/dd/yy hh24:mi’) “End_time”,
d.elapsed_seconds/3600 “Elapsed Time”,
d.status
FROM V$RMAN_BACKUP_JOB_DETAILS d,V$BACKUP_SET_DETAILS s where d.session_recid=s.session_recid and d.START_TIME>sysdate-2 order by End_time desc;

Posted in SCRIPTS | Leave a Comment »

QUERY TO FIND FRA UTILIZATION

Posted by ssgottik on 31/10/2014

set lines 200;
col “Flashback Area” for a40;
SELECT NAME “Flashback Area”, ROUND(SPACE_LIMIT / 1073741824) “Allocated space in GB”, ROUND(SPACE_USED / 1073741824) “Used space in GB”,ROUND(((SPACE_USED /1073741824) * 100) / (SPACE_LIMIT / 1073741824), 2) “USED PERCENTAGE” FROM V$RECOVERY_FILE_DEST where ROUND(((SPACE_USED / 1073741824) * 100) / (SPACE_LIMIT / 1073741824), 2)>0;

Posted in SCRIPTS | Leave a Comment »