Test-Import LOB type data using SQL Lorader

Source: Internet
Author: User
Tags sql loader

1. Prepare the data files that need to be transferred and transfer them to the server

2. Create a new target table in the database

DROP TABLE lob_tab;CREATE TABLE lob_tab (  number_content    NUMBER(10),  varchar2_content  VARCHAR2(100),  date_content      DATE,  clob_content      CLOB,  blob_content      BLOB);

3. Write the control file for SQL loader (named: LOB_TEST.CTL)

LOADDATA INFILE' Lob_test_data.txt '    into TABLELob_tab Fields TERMINATED by ', '(number_contentCHAR(Ten), Varchar2_contentCHAR( -), Date_contentDATE "Dd-mon-yyyy" ":d ate_content", Clob_filename FILLERCHAR( -), Clob_content lobfile (clob_filename) TERMINATED byEOF, Blob_filename FILLERCHAR( -), Blob_content lobfile (blob_filename) TERMINATED byEOF)

It is important to note that the FileName field is defined as the filler type, which serves as the lobfile information during the transfer and does not pass into the database.
4. Use the following command to import data into the database

sqlldr userid=test/test@db10gcontrollog=lob_test.log bad=lob_test.bad

After you use the Tera term to execute the command, the import succeeds.

Test-Import LOB type data using SQL Lorader

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.