Use Sql*loader to export Excel data to an Oracle database

Source: Internet
Author: User
Tags log connect oracle database
excel|oracle| Data | Database system environment: 1, operating system: Windows Server, machine memory 128M
2. Database: Oracle 8i R2 (8.1.6) for NT Enterprise Edition
3, Installation path: C:\ORACLE
Implementation steps:
1, open Microsoft Excel 20002, file (f) → New (N) → workbook → 3, enter the following data, save as Test.xls, as shown in figure: 4, file (f) → Save As (A) → Save type is: Tab delimited, named Text.txt, saved to C:\        5, connect to Sql*plus to System/manager user login, sql> conn system/manager CREATE TABLE structure sql> creation table test (ID number,     --Serial number username VARCHAR2 (10),--username password varchar2 (10),--Password SJ VARCHAR2 (20)--date established       6, to create sql*loader input data required by the file, are saved to C:\, with Notepad edit: Control file: Input.ctl, the contents are as follows: Load data--1, control file identification infile ' Test.txt ' --2, the data file to enter is named Test.txt append into table Test--3, append record to table test fields terminated by X ' 09 '--4, field terminated by X ' 09 ', is a tab character (TA b) (ID,USERNAME,PASSWORD,SJ)-----Define column corresponding order A, insert, default method, require table to be empty B, append when data load starts, append new record to table C, replace, delete old record, replace new loaded record D   , Truncate, IBID. 7, use the Sql*loader command in the DOS window to implement data input C:\>sqlldr Userid=system/manager control=input.ctl The default log file name is: Input.log default bad Record file is: Input.bad8, connect to Sql*plus, see if successful input


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.