I need to assign a very large xml data of around 30,000 lines to a CLOB data type in oracle database 11g r2. I am using this command in Oracle Sql Developer.
When I
One approach is to use sqlldr. First, create a small holding table:
create table tstclob
(
id number,
doc clob
);
Assuming your large document is the file "c:\data\test_doc.txt", create a sqlldr control file ("test_doc.ctl") to load it:
load data
infile *
replace
into table tstclob
fields terminated by ','
(
ID char(1),
lob_file FILLER char,
DOC LOBFILE(lob_file) TERMINATED BY EOF
)
begindata
1,c:\data\test_doc.txt
Then run sqlldr (in this case, from c:\data directory):
sqlldr control=test_doc.ctl userid=someuser@somedb/somepass
You can then update whatever table you want using tstclob table.