Posts Tagged ‘ Oracle Datafile ’

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
Advertisements