Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Resize datafile not releasing space at OS level

RE: Resize datafile not releasing space at OS level

From: Mark W. Farnham <>
Date: Fri, 9 Mar 2007 18:47:14 -0500
Message-ID: <026b01c762a5$44134d30$>

The original poster mentioned already having completely rebooted the system. Now if those are shared volumes and maybe another host had it mounted from previous to the reboot...

Now I don't know WHY it didn't shrink as expected. You might try this work-around:

With Oracle *not* running, dd off the first 30G plus 2 block sizes for good luck and reasons beyond the limits of this message to a new file. Rename the existing file (keep it in case this workaround is useless). Rename the new file as the existing file.

Give it a whirl. Allocate some junk tables to make sure you can fill the tablespace accurately and that it both is able to work with contents in the last blocks according to what Oracle says it now has and that it will not allocate beyond what is supposed to exist - you should not get media errors but rather the expected out of space errors.

Unless someone has a better suggestion or you're willing to wait for Oracle support.

Good luck! (Oh, and then if all is well zap the 100G thingy, but I'd restart Oracle a couple times before I believed it... even on a test system.

-----Original Message-----

From: [] On Behalf Of Best, David
Sent: Friday, March 09, 2007 5:31 PM
To:; oracle-l Subject: RE: Resize datafile not releasing space at OS level

We have had this problem before.. I believe the solution was to unmount and remount the filesystem.

-----Original Message-----

Sent: Friday, March 09, 2007 2:47 PM
To: oracle-l
Subject: Resize datafile not releasing space at OS level


We have an Oracle database on RHAT4 test server and I resize the file from 100G to 30G and operation is successful and I can see in the dba_data_file it is showing now as 30G but on hard drive/filesystem it is still showing 100G. So I assumed OS may release space when other process needs it but it didn't happened and other process failed for space reasons and also I rebooted the server but still no effect. What can be the possible reasoning for this behavior and how to reduce the size at file system level.



     This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.

-- Received on Fri Mar 09 2007 - 17:47:14 CST

Original text of this message