Blame

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