开发者

Compute the Database Schema Size

开发者 https://www.devze.com 2023-02-22 06:08 出处:网络
I want to find the size of Table, Data_Space_Used, Index_Space_Used, Unused_Space etc but exec sp_spaceused开发者_StackOverflow doesn\'t work.

I want to find the size of Table, Data_Space_Used, Index_Space_Used, Unused_Space etc but exec sp_spaceused开发者_StackOverflow doesn't work.

I need to define first the table with columns as referred above?


If this is for Oracle:

Space allocated to tables and indexes:

select owner, segment_type, segment_name, sum(bytes)
from dba_segments
group by owner, segment_type, segment_name;

Free space:

select tablespace_name, sum(bytes) from dba_free_space group by tablespace_name;

Another more detailed query here: http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551402703363001567

0

精彩评论

暂无评论...
验证码 换一张
取 消