Hi Please see here. http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1536 12348067 You can also read : http://www.oracle.com/technology/oramag/oracle/04-sep/o54asktom.html (Here look for What's at the end of File? ). Thanks ________________________________ From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Jared Still Sent: Monday, May 03, 2010 9:06 PM To: s.cislaghi@xxxxxxxxx Cc: Oracle L Subject: Re: Query for shrinking datafile On Mon, May 3, 2010 at 12:49 AM, Stefano Cislaghi <s.cislaghi@xxxxxxxxx> wrote: Hi all, do you use any query or method to discover how much space you can save on a datafile? I want to say...suppose to shrink your datafile, which is the minimum size, according to the highest HWM position, you can reach for your datafile? Which is the easiest way to achieve this? HWM for a data file cannot be reliably found by querying DBA_SEGMENTS as at least one poster has suggested. That method will work if the objects in the tablespace have never been dropped, rebuilt, or otherwise relocated within the data files. Attached is a script with one way to do it. There are other methods to for doing this as well. Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist Oracle Blog: http://jkstill.blogspot.com Home Page: http://jaredstill.com