2 Star 0 Fork 0

mirrors_ReneNyffenegger/fatdba-Oracle-Database-Scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
tablespaceinfo.sql 730 Bytes
一键复制 编辑 原始数据 按行查看 历史
Prashant Dixit 提交于 2022-02-10 14:11 . Create tablespaceinfo.sql
set pages 80
set lin 120
set echo off
set feed off
column PCT format 999.99
column tbspce format A30
col container for a30
select substr(f.tablespace_name,1,30) tbspce,
round(f.tsbytes/(1024*1024),0) "ALLOCATED(MB)",
round(nvl(s.segbytes,0)/(1024*1024),0) "USED(MB)",
round((nvl(s.segbytes,0)/f.tsbytes)*100,2) PCT,
lower(vc.name) as container
from
(select con_id,tablespace_name,sum(bytes) tsbytes from cdb_data_files group by con_id,tablespace_name) f,
(select con_id,tablespace_name,sum(bytes) segbytes from cdb_segments group by con_id,tablespace_name) s,
v$containers vc
where f.con_id=s.con_id(+)
and f.tablespace_name=s.tablespace_name(+)
and f.con_id=vc.con_id
order by container, tbspce;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_ReneNyffenegger/fatdba-Oracle-Database-Scripts.git
git@gitee.com:mirrors_ReneNyffenegger/fatdba-Oracle-Database-Scripts.git
mirrors_ReneNyffenegger
fatdba-Oracle-Database-Scripts
fatdba-Oracle-Database-Scripts
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385