Oracle Database , Exadata , Rman , Dataguard , RAC
REM ASM views:
REM
VIEW
|ASM INSTANCE |DB INSTANCE
----------------------------------------------------------------------------------------------------------
REM V$ASM_DISKGROUP |Describes a disk
group
(number,
name
,
size
|
Contains
one row
for
every
open
ASM
REM |related info, state,
and
redundancy type) |disk
in
the DB instance.
REM V$ASM_CLIENT |Identifies databases using disk groups |
no
rows
.
REM |managed
by
the ASM instance. |
REM V$ASM_DISK |
every disk discovered |
only
disks
the
REM |
the ASM instance, including disks that |disk groups
use
that DB instance.
REM |are
not
part
of
any
disk
. |
REM V$ASM_FILE |
every ASM file
every |
files that are
REM |disk
mounted
the ASM instance. |currently
REM V$ASM_TEMPLATE |
every template present
REM |every disk
REM V$ASM_ALIAS |
every alias present
REM v$ASM_OPERATION |
every active ASM long |
REM |running operation executing
set
wrap
off
lines 155 pages 9999
col
"Group Name"
a6 Head
"Group|Name"
"Disk Name"
a10
"State"
"Type"
a10 Head
"Diskgroup|Redundancy"
"Total GB"
9,990 Head
"Total|GB"
"Free GB"
"Free|GB"
"Imbalance"
99.9 Head
"Percent|Imbalance"
"Variance"
"Percent|Disk Size|Variance"
"MinFree"
"Minimum|Percent|Free"
"MaxFree"
"Maximum|Percent|Free"
"DiskCnt"
9999 Head
"Disk|Count"
prompt
prompt ASM Disk Groups
prompt ===============
SELECT
g.group_number
"Group"
, g.
, g.state
, g.type
, g.total_mb/1024
, g.free_mb/1024
, 100*(
max
((d.total_mb-d.free_mb)/d.total_mb)-
min
((d.total_mb-d.free_mb)/d.total_mb))/
((d.total_mb-d.free_mb)/d.total_mb)
(d.total_mb)-
(d.total_mb))/
(d.total_mb)
(d.free_mb/d.total_mb))
count
(*)
FROM
v$asm_disk d, v$asm_diskgroup g
WHERE
d.group_number = g.group_number
d.group_number <> 0
d.state =
'NORMAL'
d.mount_status =
'CACHED'
GROUP
BY
g.group_number, g.
, g.state, g.type, g.total_mb, g.free_mb
ORDER
1;
prompt ASM Disks
In
Use
prompt ================
999
"Disk"
"Header"
a9
"Mode"
a8
"Created"
"Added To|Diskgroup"
--col "Redundancy" for a10
--col "Failure Group" for a10 Head "Failure|Group"
"Path"
a19
--col "ReadTime" for 999999990 Head "Read Time|seconds"
--col "WriteTime" for 999999990 Head "Write Time|seconds"
--col "BytesRead" for 999990.00 Head "GigaBytes|Read"
--col "BytesWrite" for 999990.00 Head "GigaBytes|Written"
"SecsPerRead"
9.000 Head
"Seconds|PerRead"
"SecsPerWrite"
"Seconds|PerWrite"
select
group_number
, disk_number
, header_status
, mode_status
, state
, create_date
--, redundancy "Redundancy"
, total_mb/1024
, free_mb/1024
--, failgroup "Failure Group"
, path
--, read_time "ReadTime"
--, write_time "WriteTime"
--, bytes_read/1073741824 "BytesRead"
--, bytes_written/1073741824 "BytesWrite"
, read_time/reads
, write_time/writes
from
v$asm_disk_stat
where
header_status
(
'FORMER'
'CANDIDATE'
)
order
/
Prompt File Types
Diskgroups
Prompt ========================
"File Type"
a16
"Block Size"
a5 Head
"Block|Size"
"Gb"
9990.00
"Files"
99990
break
on
skip 1 nodup
g.
, f.TYPE
, f.BLOCK_SIZE/1024||
'k'
, f.STRIPED
, round(
sum
(f.BYTES)/(1024*1024*1024),2)
v$asm_file f,v$asm_diskgroup g
f.group_number=g.group_number
,f.TYPE,f.BLOCK_SIZE,f.STRIPED
1,2;
clear break
prompt Instances currently accessing these diskgroups
prompt ==============================================
"Instance"
form a8
c.group_number
, c.instance_name
v$asm_client c
, v$asm_diskgroup g
g.group_number=c.group_number
Free
ASM disks
their paths
prompt ==============================
"Disk Size"
form a9
, lpad(round(os_mb/1024),7)||
'Gb'
v$asm_disk
path
Current
ASM disk operations
prompt ===========================
*
v$asm_operation
First Identify and break down LGWR wait events. Query wait events for LGWR. In this instance LGWR sid is 3 (and usually it is). select s...