Wednesday, March 14, 2012

ORA-03297 file contains used data beyond requested RESIZE value

select
a.file_name,
a.bytes file_size_in_bytes,
(c.block_id+(c.blocks-1)) * &_BLOCK_SIZE HWM_BYTES,
a.bytes - ((c.block_id+(c.blocks-1)) * &_BLOCK_SIZE) SAVING
from dba_data_files a,
(select file_id,max(block_id) maximum
from dba_extents
group by file_id) b,
dba_extents c
where a.file_id = b.file_id
and c.file_id = b.file_id
and c.block_id = b.maximum
and c.tablespace_name = 'INDX'

ALTER DATABASE DATAFILE 'D:\lard1213\INDEX01.ORA' RESIZE 20000M;

No comments:

Post a Comment

Followers