Table corresponding Tablespace, Datafile in Oracle

This following query retrieves table name with corresponding tablespace name and datafile name.


select 
dba_tables.table_name, 
dba_tables.tablespace_name,
dba_data_files.file_name 
from dba_tables 
inner join dba_data_files 
on 
dba_tables.tablespace_name = dba_data_files.tablespace_name


Output:


TABLE_NAME                     TABLESPACE_NAME                FILE_NAME                           
------------------------------ ------------------------------ ------------------------------ 
IND$                           SYSTEM                         /database/ababil/system01.dbf                                                                                                                                                              
COL$                           SYSTEM                         /database/ababil/system01.dbf                                                                                                                                                              
CLU$                           SYSTEM                         /database/ababil/system01.dbf                                                                                                                                                              
TAB$                           SYSTEM                         /database/ababil/system01.dbf                                                                                                                                                              
ICOL$                          SYSTEM                         /database/ababil/system01.dbf

Thanks
A Rahim Khan

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: