Re: Removing table partition

From: Jonathan Lewis <>
Date: Fri, 20 Mar 2020 18:32:47 +0000
Message-ID: <LNXP265MB1562B8DF3BC71EAE150A71EEA5F50_at_LNXP265MB1562.GBRP265.PROD.OUTLOOK.COM>

It depends what you're trying to achieve. If you're trying to eliminate partitioning to remove the need for a licence then you're going to have to do something a bit messy. If you just want to reduce each table to a single segment you could run a statement like the following for each table:

alter table t1 modify partition by hash ({primary key column}) partitions 1 update indexes online;

This gives you a single data segment for each table and index, even though the table is technically still partitioned. If you want to reduce to a simple table then you'll need to create a table "for exchange", and exchange - but that would need you to worry about cleaning up all the details of foreign keys.

Note: 18c XE may not allow ONLINE.

Jonathan Lewis

From: <> on behalf of Michael D O'Shea/Woodward Informatics Ltd <> Sent: 20 March 2020 14:26
To: oracle-l-freelists
Subject: Removing table partition

Chaps, this is an RTFM question I know, but I am also having no luck.

Scenario: Oracle 18c XE, Win x64, dev. environment, existing list partitioned table with many FK's to and from other tables.

There seems to be no obvious functionality such as, in pseudo code, ALTER TABLE COALESCE PARTITION FLATTEN or other such DDL to remove existing partitions and return to an unpartitioned table. DBMS_REDEFINITION seemed like an obvious port of call too, but the functionality I seek doesn't seem to be on offer. Am I missing something?


Received on Fri Mar 20 2020 - 19:32:47 CET

Original text of this message