ORACLE SQLLDR Import

Source: Internet
Author: User

Recently, because of the need to create a lot of similar data, so studied the Sqlloader this tool.

This tool is very helpful for a large number of data insertions.

Specific usage:

Frequently used keywords:

UserID-ORACLE Username/password
Control--Control file name
Log--Log file name
Bad-Bad file name
Data--Data file name
  skip  --   number    of   logical   records   to   skip   ( default 0)   
  load  --   number   of    logical   records   to   load   ( all default )   
  errors  --    number   of   errors   to   allow   ( default 50)   

How to use:

    

Generate Control File = Result.ctl

The structure of the table is stored in the control file. As follows:

    

LoadDatainfile'TEST. CSV'    into   TableTEST APPEND (PNAMECHARTerminated by   ',', AgeCHARTerminated by   ',', ADDRCHARTerminated by   ',', PIDCHARTerminated by   ',', PHONECHARTerminated bywhitespace)

Where infile represents the data store file, here is a comma delimiter file, into table represents the table to be inserted, APPEND is inserted by appending, other ways: Insert---> Default mode, but only if the table must be empty, Replace---> Delete old data, insert new,truncate----> Clear table First, then insert.

General error:

For example: column not found before logical record ends (using TRAILING nullcols)

Indicates the number of columns in your control file that do not match the number of columns in the data file , and has not specified < Span style= "FONT-SIZE:9PT;" >trailing nullcols parameter, which prevents some columns from being inserted, first check the control file and data file, and then consider whether you need to add < Span class= "Link_title" >trailing nullcols Parameters. (Added to the control file)

ORACLE Sqlldr Import

Related Article

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.