How to view all tablespace occupation disk

zhaozj2021-02-11  163

How do I see the disk condition of each table space?

Software Environment:

1, Windows NT4.0 Oracle 8.0.4

2, the 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))) 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))))).

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;

File ID number Table space name byte number has been used in the remaining space remaining percentage

--------------------------------------------- --------------- ----------

1 system 20971520 9971712 10999808 52.451172

2 User_Data 3145728 432128 2713600 86.263021

3 rollback_data 5242880 1640448 3602432 68.710938

4 Temporary_Data 2097152 2048 2095104 99.902344

转载请注明原文地址:https://www.9cbs.com/read-5663.html

New Post(0)