📄 表空间大小.txt
字号:
有关表空间大小---Oracle初学者
如果知道某表空间大小为多少,已使用多少?
Reply:
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)) last,
sum(nvl(a.bytes,0))/(b.bytes)*100 last_pct
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;
Reply:
我觉得用两个脚本比较方便
1.freespace.sql
select tablespace_name,sum(bytes),count(*),max(bytes),min(bytes)
from dba_free_space
group by tablespace_name;
2.totalspace.sql
select tablespace_name,sum(bytes),count(*) from dba_data_files
group by tablespace_name;
Reply:
SELECT * FROM DBA_DATA_FILES;
看看,应该是可以查出来的。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -