Domanda

I have a table which has two partitions (by range): first_half and second_half based on a column "INSERT_DAY".

I need to add subpartitions "SUCCESS" and "NONSUCCESS" based on the values of another column "STATUS" (subpartition by list) i.e. I need to transform my range partition to composite (range-list) partition.

I do not wish to drop existing tables or partitions. What is the ALTER query for this?

PS: The database is Oracle 9i

È stato utile?

Soluzione

No alter query for adding subpartitions as far as i know. To get the desired result performe the folowing steps

  1. Create the table in the structure you want using create as select with the partitions and the sub partitions.
  2. switch the names of the two tables.

you can also explore the use of dbms_Redefinition but if you have a luxury of a littel downtime it's not worth it.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top