Datafile high water mark
How lower can you resize datafiles ?
define blksize=8192 –set your db block size
select /*+rule*/ 'alter database datafile '''||file_name||''' resize '||ceil( (nvl(hwm,1)*&blksize)/1024/1024)||'m;',
ceil( (nvl(hwm,1)*&blksize)/1024/1024 ) smallest,
ceil( blocks*&blksize/1024/1024) currsize,
ceil( blocks*&blksize/1024/1024) -
ceil( (nvl(hwm,1)*&blksize)/1024/1024 ) savings
from
dba_data_files a,
(select file_id, max(block_id+blocks-1) hwm
from
dba_extents
group by file_id ) b
where a.file_id = b.file_id(+);
source: dba-oracle.com
Regards
Manoj
No comments:
Post a Comment