-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathasm_all_disks.sql
52 lines (41 loc) · 1.2 KB
/
asm_all_disks.sql
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
--==============================================================================
-- GPI - Gunther Pippèrr
-- Desc: show asm candidate disks
-- Date: November 2013
--==============================================================================
set linesize 130 pagesize 300
column OS_MB format 9G999G999 heading "OS|MB"
column name format a16 heading "Disk|Name"
column path format a40 heading "Disk|Path"
column header_status format a10 heading "Header|status"
column mount_status format a10 heading "Mount|status"
column mode_status format a10 heading "Mode|status"
column state format a10 heading "State"
column GROUP_NUMBER format 999 heading "Grp|Nr"
ttitle left "ASM Disk Candidates" skip 2
SELECT GROUP_NUMBER
, path
, name
, OS_MB
, header_status
, mount_status
, mode_status
, state
FROM v$asm_disk
ORDER BY GROUP_NUMBER
/
prompt ----------------------
ttitle left "ASM Disks Size "
select d.GROUP_NUMBER
, g.name
, d.name
--, d.path
, d.TOTAL_MB
, d.FREE_MB
, d.total_mb - d.free_mb as used
from v$asm_disk d
, v$asm_diskgroup g
where g.GROUP_NUMBER (+) = d.GROUP_NUMBER
order by 1
/
ttitle off