Online Tutorials & Training Materials | STechies.com
Register Login

How to find the datafile which contains a particular table?

|| 0

How to find the datafile which contains a particular table?
Stechies

If you query DBA_EXTENTS based on segment_name equal to your table name you will see that the column FILE_ID will show you the database file where each extent is located. You can then use FILE_ID to query DBA_DATA_FILES to find the name of the datafile. Or you could do it all in one query using a join.