RE: Who is using my datafile

From: Powell, Mark D <mark.powell_at_eds.com>
Date: Wed, 9 Jul 2008 09:32:49 -0400
Message-ID: <D1DC33E67722D54A93F05F702C99E2A90291CDE5@usahm208.amer.corp.eds.com>

 

If a tablespace has multiple datafiles then an object segment may exist in multiple files and the segment header could be in any of the files so your query may not return a hit in cases where the segment spans multiple files.

DBA_SEGEMENTS has an entry which summarizes the space allocation for all objects that have physical segments.

DBA_EXTENTS on the other hand has an entry for every extent allocated to an object. The extents for an object may span files.

  • Mark D Powell -- Phone (313) 592-5148

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Yechiel Adar Sent: Wednesday, July 09, 2008 2:27 AM
Cc: ORACLE-L
Subject: Re: Who is using my datafile

I am a little confused here.

I thought that dba_segments contain information about space allocated to objects and dba_extents contain the information about the space allocation within each segments.
Now I find that:
select * from dba_segments where header_file = 7; return no rows while: select * from dba_extents where file_id = 7; return some rows.

So, I am switching to check dba_extents to clear space in datafiles.

What is the purpose of dba_segments?

Adar Yechiel
Rechovot, Israel

Yechiel Adar wrote:
> I have a RAC on windows.
> Oracle 9206.
> OCFS.
>
> I have five datafiles that have nothing in them.
> I mean that select * from sys.seg$ where file# between 6 and 11 return

> nothing.
>
> When I tried to decrease the size of the datafiles I got: the file
> contain data beyond the space I want to decrease to.
> I thought that maybe there are some temporary segments but all the
> users use temp as their temporary tablespace.
>
> TIA
>

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jul 09 2008 - 08:32:49 CDT

Original text of this message