Oracle Bulk Import text files Fast method (Sqlldr implementation) _oracle

Source: Internet
Author: User
Tags oracle database

Objective

Recently do projects need to import a batch of 3000多万条 POI data to Oracle database, simple insert import speed is too slow, use SQLLDR batch import 3000多万条 data spent 20 minutes, speed can also, now share to everyone, the specific methods are as follows:

1. New import Control file Input.ctl, file contents as follows:

Load data
Characterset UTF8
Infile ' H:\POI\baidu.txt '
Append into table Tbl_poi_baidu
fields Terminated by "," optionally enclosed by "" '
trailing nullcols
(Poi_name,class_all,addr,phone,tel, Longitude,latitude,city,citycode,province,district,street,streenumber,class_1,class_2,class_3,class_4)

2. Command Line window Input:

 
 

Note: The file character set should be consistent with the character set such as Oracle service, suggest file Save as UTF-8 without BOM, import file add Characterset UTF8 , resolve Oracle Data import Chinese garbled:export NLS_LANG='SIMPLIFIED CHINESE_CHINA.AL32UTF8'

Fast file Merging in DOS environment: copy *.csv newfile.txt

Summarize

The above is the entire content of this article, I hope to be able to learn or use Oracle database Help, if there is doubt you can message exchange.

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.