Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Not able to reduce the size of Datafile

j_DBA_souravNov 8 2011 — edited Nov 16 2012
Hello all,
I am using Oracle Database in 11.2.0.2 and in ASM instance. Today I noticed that disk usage is almost full in my disc groups. I then thought to reduce the size of big Tablespace datafiles's size.

select file_name,bytes/1024/1024 from dba_data_files where tablespace_name='FRARDTA9T';

FILE_NAME BYTES/1024/1024
------------------------------------------------------------------------- -------------------------------------
+DATAJDFSWM/t1erp90d/datafile/frardta9t01.dbf 81000

alter database datafile '+DATAJDFSWM/t1erp90d/datafile/frardta9t01.dbf' resize 40000M;

I am getting the following error.


ERROR at line 1:
ORA-03297: file contains used data beyond requested RESIZE value

Here is the output for DBA_FREE_SPACE


SQL> select * from dba_free_space where tablespace_name='FRARDTA9T';

TABLESPACE_NAME FILE_ID BLOCK_ID BYTES BLOCKS RELATIVE_FNO
-------------------------------------------- ---------- -------------- ---------- ----------- -----------------
FRARDTA9T 104 97728 5767168 704 1024
FRARDTA9T 104 189016 4521984 552 1024
FRARDTA9T 104 277016 5046272 616 1024
FRARDTA9T 104 277680 655360 80 1024
FRARDTA9T 104 1630336 3288334336 401408 1024
FRARDTA9T 104 2031744 4160749568 507904 1024
FRARDTA9T 104 2539648 4160749568 507904 1024
FRARDTA9T 104 3047552 4160749568 507904 1024
FRARDTA9T 104 3555456 4160749568 507904 1024
FRARDTA9T 104 4063360 4160749568 507904 1024
FRARDTA9T 104 4571264 4160749568 507904 1024
FRARDTA9T 104 5079168 4160749568 507904 1024
FRARDTA9T 104 5587072 1543503872 188416 1024
FRARDTA9T 104 5775616 2616197120 319360 1024
FRARDTA9T 104 6094976 4160749568 507904 1024
FRARDTA9T 104 6637472 2803630080 342240 1024
FRARDTA9T 104 7550488 558694400 68200 1024
FRARDTA9T 104 7618688 4160749568 507904 1024
FRARDTA9T 104 8126592 4160749568 507904 1024
FRARDTA9T 104 8634496 4160749568 507904 1024
FRARDTA9T 104 9142400 4160749568 507904 1024
FRARDTA9T 104 9650304 4160749568 507904 1024
FRARDTA9T 104 10223520 786432 96 1024

Please suggest me how to fix this issue.. Is fragmentation the culprit for not letting me freeing up space?

-Saha
This post has been answered by Oviwan on Nov 8 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 14 2012
Added on Nov 8 2011
17 comments
1,699 views