Load XML/CLOB/BLOB using SQLLDR

Say our target table is called XML_REPOSITORY

create table xml_repository
(file_name varchar2(30),
 xml clob);

Create a control file like this

load data
infile *
append into table xml_repository
(
file_name char(30),
xml lobfile (file_name) terminated by eof
)
begindata
file1.xml
file2.xml
file3.xml

Then prepare your xml files as listed above. This can be images or word document, etc (obviously with corresponding BLOB)

Then as usual

sqlldr userid/password@db control=loadxml.ctl

Thursday, February 16th, 2012 at 17:09
No comments yet.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>