- To check Diskgroup name, Diskname, Disk Path, Total size & Free size in ASM:-
SQL> col diskgroup for a10
col diskname for a12
col path for a20
select a.name DiskGroup,b.name DiskName, b.total_mb, b.free_mb,b.path, b.header_status from v$asm_disk b, v$asm_diskgroup a where a.group_number (+) =b.group_number order by b.group_number,b.name;
DISKGROUP DISKNAME TOTAL_MB FREE_MB PATH HEADER_STATUS
--------------------------------------------------------------------------------------------------------------------
DATA DATA_0000 255997 179547 \\.\ORCLDISKDATA0 MEMBER
DATA DATA_0001 255997 179548 \\.\ORCLDISKDATA1 MEMBER
OCRVOTE OCRVOTE_0000 102397 102002 \\.\ORCLDISKOCRVOTE0 MEMBER
RECO RECO_0000 511997 496066 \\.\ORCLDISKRECO0 MEMBER
- To check status & State in Diskgroups.
SQL> SELECT SUBSTR(d.name,1,16) AS asmdisk, d.mount_status, d.state, dg.name AS diskgroup FROM V$ASM_DISKGROUP dg, V$ASM_DISK d WHERE dg.group_number = d.group_number;
ASMDISK MOUNT_STATUS STATE DISKGROUP
---------------- ------- -------- --------------------------------------------------------------------
DATA_0000 CACHED NORMAL DATA
DATA_0001 CACHED NORMAL DATA
RECO_0000 CACHED NORMAL RECO
OCRVOTE_0000 CACHED NORMAL OCRVOTE
- TO check Diskgroup Mapped to which instance,Db name & Compatible.
SUBSTR(c.db_name,1,12) AS dbname, SUBSTR(c.SOFTWARE_VERSION,1,12) AS software, SUBSTR(c.COMPATIBLE_VERSION,1,12) AS compatible
FROM V$ASM_DISKGROUP dg, V$ASM_CLIENT c WHERE dg.group_number = c.group_number;
DISKGROUP INSTANCE DBNAME SOFTWARE COMPATIBLE
--------- ------------ -------- ------------ -----------------------------------------------------
DATA +asm2 IECLIVE 11.2.0.3.0 11.2.0.0.0
RECO +asm2 IECLIVE 11.2.0.3.0 11.2.0.0.0
Happy Learning ....
No comments:
Post a Comment