How to load CLOB with SQl Loader
This is my posting in response to a request on OraclePoint.com. It’s available at http://www.oraclepoint.com/topic.php?filename=592&extra=page%3D1
The basic steps are:
C:\temp\sql loader>sqlplus dbaman@test
SQL*Plus: Release 10.2.0.1.0 - Production on ðÃã++² 4È- 30 14:23:28 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - ProductionDBAMAN@test> drop table clob_test_table;
drop table clob_test_table
*
ERROR at line 1:
ORA-00942: table or view does not existDBAMAN@test> create table clob_test_table (
2 file_number number(10),
3 file_description varchar2(50),
4 clob_content CLOB
5 );Table created.
DBAMAN@test> $dir
Volume in drive C has no label.
Volume Serial Number is 48D2-E7B2Directory of C:\temp\sql loader
04/30/2008 02:30 PM .
04/30/2008 02:30 PM ..
04/30/2008 02:21 PM 207,360 CLOB_Test_1.txt
04/30/2008 02:22 PM 324,096 CLOB_Test_2.txt
04/30/2008 02:27 PM 44 clob_test_data.txt
04/30/2008 02:30 PM 269 loader_control.txt
4 File(s) 531,769 bytes
2 Dir(s) 19,472,154,624 bytes free
C:\temp\sql loader>sqlldr userid=dbaman@test control=loader_control.txt log=loader_clob.log
Password:
SQL*Loader: Release 10.2.0.1.0 - Production on ðÃã++² 4È- 30 14:36:02 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 1
Commit point reached - logical record count 2C:\temp\sql loader>sqlplus dbaman@test
SQL*Plus: Release 10.2.0.1.0 - Production on ðÃã++² 4È- 30 14:46:54 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
DBAMAN@test> column file_description format A10
DBAMAN@test> select file_number,
file_description,
clob_content,
dbms_lob.getlength(clob_content) as clob_length
from clob_test_table;
FILE_NUMBER FILE_DESCR CLOB_CONTENT CLOB_LENGTH
———– ———- ————————————————— ———–
1 text SecureFiles in Oracle 11g Database Release 1 41638
The SecureFiles functionality is a
2 text SecureFiles in Oracle 11g Database Release 1 69394
The SecureFiles functionality is a
The corresponding files are listed below.
Last 3 posts in OraclePoint
- Upgrade Oracle Database from 10g to 11g with Data Pump - July 28th, 2010
- My Practical Approach to Create Domain Index - May 11th, 2010
- How to Verify Memory Leaks on Unix - May 10th, 2010
Popularity: 6% [?]
Tags:none
















Leave a Reply