프린트 하기

OS환경 : Oracle Linux 7.6 (64bit)

 

DB 환경 : Oracle Database 19.10.0.0

 

방법 : 오라클 19c 일별, 시간별 아카이브 갯수 및 용량 확인

rac 일별 아카이브 발생 갯수 및 용량 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SQL> 
select to_char(completion_time,'yyyy/mm/dd') day, thread#, 
round(sum(blocks*block_size)/1024/1024/1024) gb,
count(*) archives_generated 
from v$archived_log 
where standby_dest='NO' 
group by to_char(completion_time,'yyyy/mm/dd'), thread# 
order by 1;
 
DAY          THREAD#          GB ARCHIVES_GENERATED
---------- ---------- ---------- ------------------
2022/02/07        1           0          1
2022/02/07        2           0          1
2022/02/09        1           0          1
2022/02/09        2           0          1
2022/02/11        1           0          1

 

 

single 일별 아카이브 발생 갯수 및 용량 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SQL> 
select to_char(completion_time,'yyyy/mm/dd') day,
round(sum(blocks*block_size)/1024/1024/1024) gb,
count(*) archives_generated 
from v$archived_log 
where standby_dest='NO' 
group by to_char(completion_time,'yyyy/mm/dd'
order by 1;
 
DAY             GB     ARCHIVES_GENERATED
---------- ---------- ------------------
2022/02/03        0               1
2022/02/05        0               1
2022/02/07        0               1
2022/02/09        0               1
2022/02/11        0               1

 

 

rac 시간별 아카이브 발생 갯수 및 용량 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SQL> 
select to_char(trunc(completion_time, 'hh'), 'yyyy/mm/mm hh24:mi:ss') hour, thread#, 
round(sum(blocks*block_size)/1024/1024/1024) gb,
count(*) archives 
from v$archived_log 
where standby_dest='NO'
group by to_char(trunc(completion_time, 'hh'), 'yyyy/mm/mm hh24:mi:ss'), thread# 
order by 1;
 
HOUR                 THREAD#     GB   ARCHIVES
------------       ---------- ---------- ----------
2022/02/01 00:00:00         1        0       2
2022/02/01 06:00:00         2        0       1
2022/02/02 11:00:00         1        0       1
2022/02/02 14:00:00         2        0       1

 

 

single 시간별 아카이브 발생 갯수 및 용량 확인

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SQL> 
select to_char(trunc(completion_time, 'hh'), 'yyyy/mm/mm hh24:mi:ss') hour,
round(sum(blocks*block_size)/1024/1024/1024) gb,
count(*) archives 
from v$archived_log 
where standby_dest='NO'
group by to_char(trunc(completion_time, 'hh'), 'yyyy/mm/mm hh24:mi:ss'
order by 1;
 
HOUR                    GB   ARCHIVES
------------       ---------- ----------
2022/01/01 08:00:00         1        3
2022/01/01 17:00:00         0        1
2022/01/01 20:00:00         0        1
2022/01/01 22:00:00         2        9
2022/02/02 00:00:00         0        2

 

 

참조 : http://adhioracledba.blogspot.com/p/blog-page_75.html