-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathspaceplatform.sql
More file actions
54 lines (45 loc) · 1.29 KB
/
Copy pathspaceplatform.sql
File metadata and controls
54 lines (45 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
set pages 10000
set lines 100
column target_name format a20
column metric_name format a20
column average format 999990.9
column minimum format 999990.9
column maximum format 999990.9
spool spaceplatform
select count(*) DB_COUNT, sum(maximum) allocated_space_platform_gb
from
(
select distinct substr(target_name,1,12), rollup_timestamp, average, minimum, maximum
from mgmt$metric_daily
where
column_label = 'Allocated Space(GB)'
and metric_name = 'DATABASE_SIZE'
and trunc(rollup_timestamp) = '08-FEB-2015'
)
;
select count(*) DB_COUNT, sum(maximum) used_space_platform_gb
from
(
select distinct substr(target_name,1,12), rollup_timestamp, average, minimum, maximum
from mgmt$metric_daily
where
column_label = 'Used Space(GB)'
and metric_name = 'DATABASE_SIZE'
and trunc(rollup_timestamp) = '08-FEB-2015'
)
;
select distinct substr(target_name,1,12), rollup_timestamp, average, minimum, maximum
from mgmt$metric_daily
where
column_label = 'Allocated Space(GB)'
and metric_name = 'DATABASE_SIZE'
and trunc(rollup_timestamp) = '08-FEB-2015'
order by 1;
select distinct substr(target_name,1,12), rollup_timestamp, average, minimum, maximum
from mgmt$metric_daily
where
column_label = 'Used Space(GB)'
and metric_name = 'DATABASE_SIZE'
and trunc(rollup_timestamp) = '08-FEB-2015'
order by 1;
spool off