Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Which datafiles are my tables in?
On 8 Sep 1998 07:50:05 GMT, "Andy Hardy" <aph_at_glink.net.hk> wrote:
>Hi,
>
>How do I find out which datafiles a particular table is in?
Your table (or any other segment - rollback, index, cluster...) is composed of extents. Each of the extents is in one and only one datafile. You can use views DBA_EXTENTS and DBA_DATA_FILES to map each extent of a table to particular data file.
SELECT e.segment_name, e.extent_id, f.file_name
FROM dba_extents e, dba_data_files f
WHERE e.file_id = f.file_id
AND e.segment_name = 'THE_TABLE'
AND e.owner = 'THE_OWNER';
>Andy
HTH
--
Jurij Modic <jmodic_at_src.si>
Certified Oracle7 DBA (OCP)