You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with t as ( select file_id,sum(blocks*8192)/(1024*1024) t_used,max(block_id+blocks-1) t_max_block from dba_extents where file_id=&file_id group by file_id)
(
select name,bytes/(1024*1024) total_size,t_used used_size,bytes/(1024*1024)-t_used free_size,ceil(t_max_block*8192/(1024*1024)) resizable_to, bytes/(1024*1024)-ceil(t_max_block*8192/(1024*1024)) reclaimable_size from v$datafile d,t whered.file#=&file_id and t.file_id=d.file#
select*from (select owner,SEGMENT_NAME,PARTITION_NAME,SEGMENT_TYPE,round((BLOCK_ID*8192)/(1024*1024)) start_size,round((BLOCK_ID+blocks-1)*8192/(1024*1024)) end_size from dba_extents where file_id=&file_id order by block_id desc) where rownum<=nvl('&rows',20) order by5;