In ASM: Query all disk names, total size, remaining size: units MB
-----View the group's information (total size)
Select Name,total_mb, free_mb from V$asm_diskgroup;
---to view disk member information size individually
Select Name,total_mb,free_mb from V$asm_disk;
Or:
[[Email Protected]]asmcmd
Asmcmd>lsdg
Query table spatial data file path and Total size: units MB
SELECT Tablespace_name,
FILE_ID,
file_name,
Round (Bytes/(1024x768), 0) Total_space
From Dba_data_files
ORDER by Tablespace_name;
Query tablespace used, remaining, percent used: units GB
SELECT A.tablespace_name,
B.SIZE_GB,
A.FREE_GB,
Round ((A.FREE_GB/B.SIZE_GB) * +) "free_%"
From (SELECT Tablespace_name,
Round (Sum (bytes) *10/1024/1024/1024)/10 FREE_GB
From
Dba_free_space
GROUP by Tablespace_name) A,
(SELECT Tablespace_name,
Round (Sum (bytes) *10/1024/1024/1024)/10 SIZE_GB
From Dba_data_files
GROUP by Tablespace_name) b
WHERE A.tablespace_name = B.tablespace_name
ORDER BY 4 DESC
/
You can test a table space with a maximum of several data files:
Create tablespace Qiu datafile '/u01/app/oracle/oradata/qiu1.dbf ' size 1M;
Declare
V_STR VARCHAR2 (200);
Begin
For I in 2..1024 loop
V_str:= ' alter tablespace qiu add datafile ' | | ' /u01/app/oracle/oradata/qiu ' | | i| | '. DBF ' | | ' size 1M ';
Execute immediate v_str;
End Loop;
End
/
Query tablespace usage in ORACLE ASM, data file path, total size remaining size of bare device disk