Question: How do I find the
maximum data file size for a partitioned table?
Answer: The Oracle dba_tab_partitons
and dba_data_files
view can be used to find the max size of a datafile within a
partitioned table. Here is an example script to find
the maximum file size in a partitioned table:
max_file_size_partitioned_table.sql
select
p1.table_name,
max(d1.bytes)/1024/1024
from
dba_data_files
d1,
dba_tab_partitions p1
where
p1.tablespace_name =
d1.tablespace_name
group by
p1.table_name
union
select
p2.index_name,
max(d1.bytes)/1024/1024
from
dba_data_files
d1,
dba_ind_partitions p2
where
p2.tablespace_name =
d1.tablespace_name;