询表空间是否查自动扩展 tablespace / auto
set pagesize 1000;
col tablespace_name for a14;
select d.tablespace_name,space "sum_space(m)",blocks sum_blocks,space-nvl(free_space,0) "used_space(m)",
round((1-nvl(free_space,0)/space)*100,2) "used_rate(%)",free_space "free_space(m)"
from
(select tablespace_name,round(sum(bytes)/(1024*1024),2) space,sum(blocks) blocks
from dba_data_files
group by tablespace_name) d,
(select tablespace_name,round(sum(bytes)/(1024*1024),2) free_space
from dba_free_space
group by tablespace_name) f
where d.tablespace_name = f.tablespace_name(+) union all
select d.tablespace_name,space "sum_space(m)",blocks sum_blocks,
used_space "used_space(m)",round(nvl(used_space,0)/space*100,2) "used_rate(%)",
nvl(free_space,0) "free_space(m)"
from
(select tablespace_name,round(sum(bytes)/(1024*1024),2) space,sum(blocks) blocks
from dba_temp_files
group by tablespace_name) d,
(select tablespace_name,round(sum(bytes_used)/(1024*1024),2) used_space,
round(sum(bytes_free)/(1024*1024),2) free_space
from v$temp_space_header
group by tablespace_name) f
where d.tablespace_name = f.tablespace_name(+);
通过上面的SQL查到表空间的使用情况,通过以下SQL查找是否表空间自动扩展。
SQL> select STATUS,AUTOEXTENSIBLE from dba_data_files where tablespace_name='ISS_UPDATE';
STATUS AUT
--------- ---
AVAILABLE NO
AVAILABLE NO
AVAILABLE NO
AVAILABLE NO
AVAILABLE NO
AVAILABLE NO
AVAILABLE NO
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341