oracle怎么查看表空间,可以用PL⼀SQL查看吗?

2025-03-25 23:19:33
推荐回答(1个)
回答1:

可以通过PL/SQL查看。
1. 查看所有表空间大小
select tablespace_name,sum(bytes)/1024/1024 from dba_data_files group by tablespace_name;
2. 未使用的表空间大小
select tablespace_name,sum(bytes)/1024/1024 from dba_free_space group by tablespace_name;

补充回答:
查看当前用户每个表占用空间的大小:
Select Segment_Name,Sum(bytes)/1024/1024 From User_Extents Group By Segment_Name