Software Environment: 1, Windows NT4.0 Oracle 8.0.4 2, Oracle Installation Path is: C: / ORANT
SQL statement:
/ * Chinese environment * /
COL table space name Format A20;
Select B.File_ID file ID number, B.Tablespace_name table space name, B.bytes bytes, (B.bytes-sum (NVL (A.BYTES, 0))))), SUM (NVL (A.bytes, 0) The remaining space, SUM (NVL (a.bytes, 0)) / (b.bytes) * 100 remaining percentage from DBA_FREE_SPACE A, DBA_DATA_FILES B where A.FILE_ID = B.File_ID Group by b.tablespace_name, B.File_ID , B.Bytes Order by B.File_ID;
/ * English environment * /
COL TABLESPACE_NAME FORMAT A20;
Select B.file_id file_id, b.tablespace_name tablespace_name, b.bytes Bytes, (B.Bytes-Sum (NVL (A.BYTES, 0))) Used, SUM (NVL (A.BYTES, 0)) Free, SUM NVL (A.bytes, 0)) / (B.bytes) * 100 Percent from DBA_FREE_SPACE A, DBA_DATA_FILES B Where A.FILE_ID = B.File_ID Group by b.tablespace_name, b.file_id, b.bytes Order by B.File_ID ;