共計 1252 個字符,預計需要花費 4 分鐘才能閱讀完成。
這篇文章主要介紹“oracle 表空間使用情況怎么查看”,在日常操作中,相信很多人在 oracle 表空間使用情況怎么查看問題上存在疑惑,丸趣 TV 小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”oracle 表空間使用情況怎么查看”的疑惑有所幫助!接下來,請跟著丸趣 TV 小編一起來學習吧!
select * from (
Select a.tablespace_name,
to_char(a.bytes/1024/1024, 99,999.999) total_bytes,
to_char(b.bytes/1024/1024, 99,999.999) free_bytes,
to_char(a.bytes/1024/1024 - b.bytes/1024/1024, 99,999.999) use_bytes,
to_char((1 - b.bytes/a.bytes)*100, 99.99 ) || % use
from (select tablespace_name,
sum(bytes) bytes
from dba_data_files
group by tablespace_name) a,
(select tablespace_name,
sum(bytes) bytes
from dba_free_space
group by tablespace_name) b
where a.tablespace_name = b.tablespace_name
union all
select c.tablespace_name,
to_char(c.bytes/1024/1024, 99,999.999) total_bytes,
to_char( (c.bytes-d.bytes_used)/1024/1024, 99,999.999 ) free_bytes,
to_char(d.bytes_used/1024/1024, 99,999.999) use_bytes,
to_char(d.bytes_used*100/c.bytes, 99.99) || % use
(select tablespace_name,sum(bytes) bytes
from dba_temp_files group by tablespace_name) c,
(select tablespace_name,sum(bytes_cached) bytes_used
from v$temp_extent_pool group by tablespace_name) d
where c.tablespace_name = d.tablespace_name
)
到此,關于“oracle 表空間使用情況怎么查看”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注丸趣 TV 網站,丸趣 TV 小編會繼續努力為大家帶來更多實用的文章!
正文完
發表至: 數據庫
2023-07-28