oracle表空间可用空间查询

2021/12/13 19:17:01

本文主要是介绍oracle表空间可用空间查询,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

环境oracle

oracle表空间可以使用的量=dba_data_files剩余空间+dab_free_space可以使用的空间 dba_data_files 剩余空间 sum(maxbytes-bytes) dab_free_space sum(bytes)   --表空间可以使用的总空间=没有分配的存储+已经分配但是没有使用的存储 1、没有分配的存储 select tablespace_name,cast(sum(maxbytes-bytes)/1024/1024 as int) sy_mb from dba_data_files group by tablespace_name ; 2、已经分配但是没有使用的存储(每个表预分配的可用空间) select cast(sum(bytes)/1024/1024 as int) from dba_free_space where tablespace_name group by tablespace_name ;   一般监控,只用监控没有分配的存储即可。



这篇关于oracle表空间可用空间查询的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程