Migrating LONG to LOBs
The database applications using LONG
data types should migrate to LOB
due to the following reasons:
- A
LONG
column can store a maximum of (2GB - 1) while anLOB
can store a maximum data of (4GB - 1) - A table can have one, and only one,
LONG
data type column while there is no restriction on the number ofLOB
columns in a table - Data replication is not allowed with the
LONG
andLONG RAW
columns
Tip
Migrating LONG
to the LOB
columns may generate a lot of redo. Therefore, it is advised to switch off the logging for the table containing the LONG
column.
You can convert LONG
to CLOB
and LONG RAW
to BLOB
using either of the following listed approaches:
Use the ALTER TABLE command
For a table with the LONG
type column, you can use the ALTER ...
Get Advanced Oracle PL/SQL Developer's Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.