Simple method for Oracle to import large data and migrate data between databases

Source: Internet
Author: User
Tags create database sqlplus

Oracle Imports data in a number of ways: it's about two very simple ways to do it (through existing tools).

First, import. csv data through Pl/sql developer.

Ordinary PC, this way generally can only import 20+w data, and then there is the risk of death card.

Tool-> Tool Importer-> Open, select. csv file import: screenshot below:


You can modify the number of "per commit", and you need to be aware of the mapping relationship between the source data and the table field, and then click Import.


Second, if the amount reaches above 100w, it is recommended to use SQL statement Import or other methods.

After reaching the 100w+, it is best to import through the Sqlplus connection on the server, it should be more difficult to complete the import directly on the PC side.

Sqlplus usr/pwd@ ' (DESCRIPTION = (   address_list =	  (address = (PROTOCOL = TCP) (HOST = *.*.*.*) (PORT = 1521))   
   (Connect_data =	  (SERVER = xxxx)  (service_name = xxxx)) '
Then enter the INSERT into SQL statement, and commit after the import completes.


Iii. migrating data between databases.

There is time to migrate data from one database to another, which is bound to be used in DB link. For example, we need to import data from database A to database B.

After the DBA assigns DB link permissions, use the following statement to create DB link on database A.

Create DATABASE link Dblink_atob
  connect to usr identified by pwd
  using ' (DESCRIPTION = (
    address_list =
      ( Address = (PROTOCOL = TCP) (HOST = *.*.*.*) (PORT = 1521))
    (connect_data =
      (SERVER = xxxx)
      (service_name = xxxx)))
  ';

Once created, you can see whether the creation was successful through PL SQL developer, or SQL statements, where we created the DB link named: Dblink_atob.

You can then use an SQL statement similar to the following to complete the import data.

INSERT INTO B_table@dblink_atob select * from USR. a_table;



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.