I often reduce tablespace in our Oracle instance (11g).
Using the following script (from system user) I can know exactly the allocated space for each object in choosen tablespace (e.g. MY_TABLESPACE):
select
tablespace_name, file_id, block_id,
block_id + blocks - 1 end_block, owner,
segment_name, partition_name, segment_type
from
dba_extents
where 1=1
and tablespace_name = 'MY_TABLESPACE'
union all
select
tablespace_name, file_id, block_id,
block_id + blocks - 1 end_block,
'free' owner, 'free' segment_name,
null partition_name, null segment_type
from
dba_free_space
where 1=1
and tablespace_name = 'MY_TABLESPACE'
order by
file_id desc,
block_id desc;
Something I try the following strange thing, consecutive free block that I can't resize:
This means which we have 19095 free blocks (about 150 Mb) that can't resize.
To avoid the complete drop and create back of tablespace, could someone help me?