My Oracle Support Banner

How to Convert LONG Column to CLOB Using DBMS_REDEFINITION Package (Doc ID 251417.1)

Last updated on JULY 05, 2023

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Gen 1 Exadata Cloud at Customer (Oracle Exadata Database Cloud Machine) - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.


NOTE: In the images and/or the document content below, the user information and environment data used
represents fictitious data from the Oracle sample or bulit-in schema(s), Public Documentation delivered
with an Oracle database product or other training material. Any similarity to actual environments,
actual persons, living or dead, is purely coincidental and not intended in any manner.


This Note discusses how to convert LONG column to CLOB using package DBMS_REDEFINITION.

Oracle has introduced the package DBMS_REDEFINITION to redefine tables on line in 9.0.1. release. In release 9.0.1.X and 9.2.0.X, it is not possible to on line redefine tables with LONG columns.

This restriction has been removed in release 10G.

In 10G, tables with LONG columns can be on line redefined, but those columns must be converted to CLOBS. Tables with LONG RAW columns must be converted to BLOBS.

Therefore in 10G, it is possible to use package DBMS_REDEFINITION to convert LONG, LONG RAW columns to CLOB, BCLOB respectively.


The scope of this Note is directed to Oracle dba's looking to change a field from a LONG or LONG RAW to the associated CLOB or BLOB field.


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.