SET DOCUMENT OFF

/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 +                                                                               +
 +   FileName  : check_arc.sql                                                   +
 +   Purpose   : 아카이브로그 시간별,일별 체크                                              +
 +   Genarated : 2014/01/16 by TECHDATA                                          +
 +   Modified  :                                                                 +
 +                                                                               +
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/

set line 300
col first_time for 9999

select to_char(first_time,'MM-DD') day,
to_char(sum(decode(to_char(first_time,'hh24'),'00',1,0)),'999') "00",
to_char(sum(decode(to_char(first_time,'hh24'),'01',1,0)),'999') "01",
to_char(sum(decode(to_char(first_time,'hh24'),'02',1,0)),'999') "02",
to_char(sum(decode(to_char(first_time,'hh24'),'03',1,0)),'999') "03",
to_char(sum(decode(to_char(first_time,'hh24'),'04',1,0)),'999') "04",
to_char(sum(decode(to_char(first_time,'hh24'),'05',1,0)),'999') "05",
to_char(sum(decode(to_char(first_time,'hh24'),'06',1,0)),'999') "06",
to_char(sum(decode(to_char(first_time,'hh24'),'07',1,0)),'999') "07",
to_char(sum(decode(to_char(first_time,'hh24'),'08',1,0)),'999') "08",
to_char(sum(decode(to_char(first_time,'hh24'),'09',1,0)),'999') "09",
to_char(sum(decode(to_char(first_time,'hh24'),'10',1,0)),'999') "10",
to_char(sum(decode(to_char(first_time,'hh24'),'11',1,0)),'999') "11",
to_char(sum(decode(to_char(first_time,'hh24'),'12',1,0)),'999') "12",
to_char(sum(decode(to_char(first_time,'hh24'),'13',1,0)),'999') "13",
to_char(sum(decode(to_char(first_time,'hh24'),'14',1,0)),'999') "14",
to_char(sum(decode(to_char(first_time,'hh24'),'15',1,0)),'999') "15",
to_char(sum(decode(to_char(first_time,'hh24'),'16',1,0)),'999') "16",
to_char(sum(decode(to_char(first_time,'hh24'),'17',1,0)),'999') "17",
to_char(sum(decode(to_char(first_time,'hh24'),'18',1,0)),'999') "18",
to_char(sum(decode(to_char(first_time,'hh24'),'19',1,0)),'999') "19",
to_char(sum(decode(to_char(first_time,'hh24'),'20',1,0)),'999') "20",
to_char(sum(decode(to_char(first_time,'hh24'),'21',1,0)),'999') "21",
to_char(sum(decode(to_char(first_time,'hh24'),'22',1,0)),'999') "22",
to_char(sum(decode(to_char(first_time,'hh24'),'23',1,0)),'999') "23",
count(*) TOTAL
from v$log_history
group by to_char(first_time,'MM-DD')
order by 1;

 

사업자 정보 표시
(주)블루원 | 김홍태 | 서울특별시 용산구 원효로 4가 135 금홍 2빌딩 | 사업자 등록번호 : 106-86-76684 | TEL : 02-3272-7200 | Mail : support_ora@blueone.co.kr | 통신판매신고번호 : 호 | 사이버몰의 이용약관 바로가기

'DB - ORACLE > Oracle Command' 카테고리의 다른 글

TEMP 테이블스페이스의 Really Status 쿼리  (0) 2015.01.19
RAC Relocate  (0) 2015.01.19
Listener Log On/Off  (0) 2015.01.19
Oracle DB Whole Dump  (0) 2014.12.22
literal Sql Check  (0) 2014.12.22

+ Recent posts