Thinking Out Loud

July 6, 2011

Renaming Interval Partitions

Filed under: 11g,oracle — mdinh @ 3:56 am

I wrote a stored procedure to RENAME USER system generated name for interval partition tables and LOCAL indexes.

One pertinent information on >>Interval Partitioning

  • Can only partition on one key column and must be NUMBER or DATE type

>>NUMTOYMINTERVAL must resolve to the following values: ‘YEAR’,’MONTH’
>>NUMTODSINTERVAL must resolve to the following values: ‘DAY’,’HOUR’,’MINUTE’,’SECOND’

Download stored procedure and test case >>interval_part.sql

System generated partitions.

Renamed partitions.

UPDATED: Add parameter p_table to package.

Update ONE table: exec mdinh_pkg.ren_interval_part(‘day’);

Update ALL tables: exec mdinh_pkg.ren_interval_part;

Create a free website or blog at WordPress.com.