10.19.2008

Oracle DBA scripts - Partition related

set pages 999 lines 100
col table_name format a40
col high_value format a20
col tablespace_name format a20

1. List partitioned tables

select table_name, partitioning_type type, partition_count partitions
from dba_part_tables
where owner = '&owner'
order by 1;

2. List a tables partitions

select partition_name , tablespace_name , high_value
from dba_tab_partitions
where table_owner = '&owner' and table_name = '&table_name'
order by partition_position;