How can you migrate from a LONG to a LOB data type for a column?
-
Use the DBMS_MANAGE_LOB.MIGRATE procedure
-
Use the UTL_MANAGE_LOB.MIGRATE procedure.
-
Use the ALTER TABLE command
-
You cannot migrate from a LONG to a LOB date type for a column
Migrating from LONG to LOB is done using ALTER TABLE MODIFY command. You use ALTER TABLE table_name MODIFY column_name CLOB (or BLOB). There are no DBMS_MANAGE_LOB or UTL_MANAGE_LOB packages. The migration is fully supported and recommended as LONG is deprecated.
Oracle allows converting a LONG column directly to a LOB type (CLOB/NCLOB/BLOB) using ALTER TABLE ... MODIFY, provided the table has a single LONG column and meets Oracle's documented restrictions (no LONG columns in indexes, etc.) — this in-place ALTER TABLE conversion is the standard, documented migration path. There is no DBMS_MANAGE_LOB or UTL_MANAGE_LOB package/procedure in Oracle for this purpose (both are fabricated distractor names), and the claim that migration is impossible is false since Oracle explicitly supports and documents this conversion. So ALTER TABLE is correct.