Blame

2c78f0 feagor 2025-12-06 10:00:37 1
## Archivelog. Объем сгенерированных логов
2141cb feagor 2025-12-06 08:58:05 2
1f0c2e feagor 2025-12-06 10:00:10 3
#### Разбивка по дням
48b9de feagor 2025-12-06 09:48:49 4
```ora=
2141cb feagor 2025-12-06 08:58:05 5
select d.type
239252 feagor 2025-12-06 09:49:34 6
, trunc(completion_time) as "DATE"
7
, trunc(sum(blocks*block_size)/1024/1024/1024) as GB
8
, count(1) cnt
9
from v$archived_log l
3d0ad2 feagor 2025-12-06 09:50:18 10
join v$archive_dest_status d on d.DEST_ID = l.DEST_ID and d.status='VALID'
239252 feagor 2025-12-06 09:49:34 11
where first_time > trunc(sysdate-10)
2141cb feagor 2025-12-06 08:58:05 12
group by d.type, trunc(completion_time)
13
order by 2 desc ,1;
14
```
15
#### Разбивка по часам
408756 feagor 2025-12-06 09:16:08 16
```ora=
2141cb feagor 2025-12-06 08:58:05 17
alter session set nls_date_format='DD MON YYYY';
699cf7 feagor 2025-12-06 09:22:58 18
19
select thread#,
20
trunc(completion_time) as "date",
21
to_char(completion_time,'Dy') as "Day",
22
count(1) as "total",
23
sum(decode(to_char(completion_time,'HH24'),'00',1,0)) as "h00",
24
sum(decode(to_char(completion_time,'HH24'),'01',1,0)) as "h01",
25
sum(decode(to_char(completion_time,'HH24'),'02',1,0)) as "h02",
26
sum(decode(to_char(completion_time,'HH24'),'03',1,0)) as "h03",
27
sum(decode(to_char(completion_time,'HH24'),'04',1,0)) as "h04",
28
sum(decode(to_char(completion_time,'HH24'),'05',1,0)) as "h05",
29
sum(decode(to_char(completion_time,'HH24'),'06',1,0)) as "h06",
30
sum(decode(to_char(completion_time,'HH24'),'07',1,0)) as "h07",
31
sum(decode(to_char(completion_time,'HH24'),'08',1,0)) as "h08",
32
sum(decode(to_char(completion_time,'HH24'),'09',1,0)) as "h09",
33
sum(decode(to_char(completion_time,'HH24'),'10',1,0)) as "h10",
34
sum(decode(to_char(completion_time,'HH24'),'11',1,0)) as "h11",
35
sum(decode(to_char(completion_time,'HH24'),'12',1,0)) as "h12",
36
sum(decode(to_char(completion_time,'HH24'),'13',1,0)) as "h13",
37
sum(decode(to_char(completion_time,'HH24'),'14',1,0)) as "h14",
38
sum(decode(to_char(completion_time,'HH24'),'15',1,0)) as "h15",
39
sum(decode(to_char(completion_time,'HH24'),'16',1,0)) as "h16",
40
sum(decode(to_char(completion_time,'HH24'),'17',1,0)) as "h17",
41
sum(decode(to_char(completion_time,'HH24'),'18',1,0)) as "h18",
42
sum(decode(to_char(completion_time,'HH24'),'19',1,0)) as "h19",
43
sum(decode(to_char(completion_time,'HH24'),'20',1,0)) as "h20",
44
sum(decode(to_char(completion_time,'HH24'),'21',1,0)) as "h21",
45
sum(decode(to_char(completion_time,'HH24'),'22',1,0)) as "h22",
46
sum(decode(to_char(completion_time,'HH24'),'23',1,0)) as "h23"
47
from v$archived_log
48
where first_time > trunc(sysdate-10)
b38952 feagor 2025-12-06 09:23:42 49
and dest_id = (select dest_id
57fe36 feagor 2025-12-06 09:48:41 50
from v$archive_dest_status
0eb2ed feagor 2025-12-06 09:34:10 51
where status='VALID'
52
and type='LOCAL')
d3e517 feagor 2025-12-06 09:27:14 53
group by thread#, trunc(completion_time), to_char(completion_time, 'Dy')
54
order by 2,1;
2141cb feagor 2025-12-06 08:58:05 55
```