AN EXAMPLE OF A COMPLEX ONLINE TABLE REDEFINITION (DBMS_REDEFINITION) (Doc ID 1358236.1)

Last updated on JULY 21, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 9.0.1.0 to 11.2.0.2 [Release 9.0.1 to 11.2]
Oracle Database - Enterprise Edition - Version 11.2.0.3 to 11.2.0.3 [Release 11.2]
Information in this document applies to any platform.
***Checked for relevance on 21-Jul-2017***

Goal

This document will demonstrate an example of a complex (multiple changes) online redefinition of a table using DBMS_REDEFINITION

This case study will

* Compress the table
* Convert a CLOB column that uses basicfiles to securefile
* Move the table from the Users tablespace to the Test Tablespace
* Change block size for the storage from 8K to 16K
* Partition the table (on COL1)
* Add a column (COL5)
* Drop a column (COL2)
* Rename column names as well as change position in the table of two columns (COL3 <--> COL4)
* Change the  datatype of a column (convert COL3 from a date to a timestamp)
* Convert the table from Index (IOT) to Heap Organization
* Defragment the table

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms