Re: Datafile HWM without querying dba_extents

  • From: "Deepak Sharma" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "sharmakdeep_oracle@xxxxxxxxx" for DMARC)
  • To: "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Sat, 31 Jan 2015 05:58:54 +0000 (UTC)

I should have added that it's an 11g DB and we're using LMT tablespaces.
 

     On Friday, January 30, 2015 11:57 PM, Deepak Sharma 
<sharmakdeep_oracle@xxxxxxxxx> wrote:
   

 In order to resize a datafile to release space at the end, we need to find 
whatever the last block_id that is at the start of that free contiguous space. 

Problem is that we have a very large database such that querying dba_extents to 
find the last block is probably not an option. The standard query(ies) that 
make use of dba_extents runs for hours at stretch and also  sometimes fails 
with a 'snapshot too old' (just gives up).
Is there an alternative to using dba_extents?
For example, if the datafile size is 100mb and the last 10mb is vacant, I want 
to know the block_id of where that 10mb begins.



   

Other related posts: