查看oracle 用户的数据有多大
2个回答
展开全部
我理解你是想查数据表空间有多大
SELECT dbf.tablespace_name,
dbf.totalspace "总量(M)",
dbf.totalblocks AS 总块数,
dfs.freespace "剩余总量(M)",
dfs.freeblocks "剩余块数",
(dfs.freespace / dbf.totalspace) * 100 "空闲比例"
FROM (SELECT t.tablespace_name,
SUM(t.bytes) / 1024 / 1024 totalspace,
SUM(t.blocks) totalblocks
FROM dba_data_files t
GROUP BY t.tablespace_name) dbf,
(SELECT tt.tablespace_name,
SUM(tt.bytes) / 1024 / 1024 freespace,
SUM(tt.blocks) freeblocks
FROM dba_free_space tt
GROUP BY tt.tablespace_name) dfs
WHERE TRIM(dbf.tablespace_name) = TRIM(dfs.tablespace_name);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询