Using Oracle SQL Loader to bulk import data

Source: Internet
Author: User
Tags command line sql loader

One of the most important preparations in performance testing is preparing test data. Before performing a performance test, make sure that you have enough data in your test database to test it. For data preparation, sometimes I use LoadRunner to generate the appropriate script to prepare the data, which has one advantage is simple, but it has a big drawback is that the efficiency is too slow, when we need the amount of data, this is very time-consuming, So I think we need to master a variety of different skills to accomplish this task. Here are some of the lessons I learned in a recent test:

Using Oracle SQL Loader to bulk import data is useful when preparing test data! )

Excel file to generate test data, save Excel file as CSV (comma-delimited) (*.csv), control file set to comma separated

Example:

LOAD DATA
INFILE ‘d:\car.csv’
APPEND INTO TABLE t_car_temp
FIELDS TERMINATED BY ","
(phoneno,vip_car)

Save As Input.ctl

At the end of the command line, enter:

C:\>sqlldr Userid=system/manager

Control=input.ctl (same in UNIX environment)

The default log file name is: Input.log

Default bad record file is: Input.bad

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.