Importing data to Oracle using Sql*loader

Source: Internet
Author: User
Tags log
oracle| Import Data


Use the Oracle Sqlldr tool to import the data from the Sdss.csv file into the database.

SDSS. CSV placed in E:\ The contents are as follows:

2.3757291096910399e-4,-8.9490277843631194,20.302597, 0.00023851549291556,-0.88450365314434698,20.098101, 2.5 168890447969299e-4,7.7169029946908094e-2,18.762859, 2.9486118387225802e-4,-9.8447540892170409,19.943598, 2.9 4865362739442e-4,-9.8447540642891909,19.944597,

Operation Steps:

1. Create an empty table in Oracle according to the format of the imported data

Types of large and small numbers RA number 8 MAG 6

2, the preparation of a Loader.ctl document, the contents are as follows

Load data infile ' e:dss.csv ' into the table Sdss_stars fields terminated by "," (RA, DEC, MAG )

3. Execute the following statement in CMD:

Sqlldr Scott/tiger Control=loader.ctl

4. Automatically generate two files in current directory

The default log file name is: Loader.log default bad Record file is: Sdss.bad

Precautions:

1, must operate on the server, can not be used only on the machine to install Oracle clients. 2, the content of the CSV file is "," separated, if the data at the end without a comma import error. You can use a text editor like UltraEdit to handle it, and replace ^p with, ^p can add a comma at the end of each line. 3, data import takes a long time.


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.