Call for Oracle support & training (800) 766-1884
Free Oracle Tips

Corporate Oracle Training
Custom Oracle Training
Oracle New Features Training
Advanced Oracle DBA Classes
Oracle Tuning Courses
Oracle Tips & Tricks
Oracle Training Links
Oracle Training Links
Oracle Training Links

We are top for USA Oracle Training Clients


Free Oracle Tips


Free Oracle App Server Tips


Oracle support

Oracle training

Oracle tuning


Remote Oracle

Custom Oracle Training


  Oracle Tips by Burleson

Oracle 10g Unloading LONG and LONG RAW Datatypes

LONG and LONG RAW columns can be unloaded by the oracle_datapump access driver, however, that data can only be loaded back into the database as LOB fields. The following example demonstrates the unloading of LONG and LONG RAW datatypes.

  1. For all LONG or LONG RAW columns in the table being unloaded, define the corresponding columns in the external table as CLOB for LONG columns or BLOB for LONG RAW columns.

2 (
3 proj_no SMALLINT,
4 description LONG
5 );

Table created.

SQL> INSERT INTO proj_tab VALUES (1, 'Project to write an New Features book');

1 row created.

  1. To unload this data using the datapump, you must create an external table that contains a CLOB column to contain the data from the LONG column. When loading the external table, the to_lob operator must be used to convert the LONG column into a CLOB.

SQL> CREATE TABLE proj_tab_ext
3 (
6 LOCATION ('proj_tab_ext.dmp')
7 )
8 AS SELECT proj_no, TO_LOB(description) description FROM proj_tab;

Table created.

  1. The unloaded data in the external table can now be used to create another table similar to the one that was unloaded, except the new table will contain a CLOB column instead of a LONG.

SQL> CREATE TABLE proj_lob_tab
2 AS SELECT * from proj_tab_ext;

Table created.

  1. After an operation of this sort you should always verify that the table was properly created.

SQL> SELECT * FROM proj_lob_tab;

--- ----------------------------------------------
1   Project to write an New Features book

Get the complete story:

The above text is an excerpt from "Oracle Database 10g New Features: Reference for Advanced Tuning and Administration", by Rampant TechPress.  Written by top Oracle experts, this book has a complete online code deport with ready to use scripts. 

To get the code instantly, click here:

Need an Oracle Mentor?

BEI is now offering personal mentors for Oracle DBAs where you can have an Oracle expert right at your fingertips, anytime day or night. We work with hundreds of Oracle databases every year, so we know exactly how to quickly assist you with any Oracle question.

Why risk an unplanned outage? You can now get telephone access to Don Burleson or any of his Oracle Certified DBAs with more than 20 years of full-time IT experience. Click here for details:


Oracle performance tuning book



Oracle performance tuning software

Oracle performance tuning software
Oracle performance Tuning 10g reference poster
Oracle training in Linux commands
Oracle training Excel


email BC:

Copyright © 1996 -  2014 by Burleson Inc. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.