Import and export without landing data

Source: Internet
Author: User

Import and export without landing data
In this case, the local disk space is insufficient, but some data needs to be migrated. We met such a situation yesterday:

A friend needs to import a GB log table from 10 GB Data to 11 GB, but he wants to export and import it without landing because the disk space of the host where the 10 Gb database is located is insufficient.


Here we will introduce two methods:
1. network_link

2. pipe


First, configure tnsnames. ora and create dblink:

zbdba= (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = zbdba)(PORT = 1521)) ) (CONNECT_DATA = (SID = zbdba) ) ) 

Create dblink:

CREATE DATABASE LINK <database link name> CONNECT TO <remote database user name> IDENTIFIED BY <remote database password> USING '<tnsname connect to remote>' 

Export data:

impdp zbdba/zbdba network_link=zbdba_link remp_schema=source_schema:target:shcema remap_tablespace=source_tablespace:target:tablespace

Impdp with network_link at the same time


Method 2:

Source: mknod/tmp/exp_pipe ptarget: mknod/tmp/imp_pipe p configure mutual trust between the two machines dd if =/tmp/exp_pipe | ssh 192.168.56.42 dd of =/tmp/imp_pipe and then open another window to import: exp zbdba/zbdba file =/tmp/exp_pipe log = zbdba. log tables = zbdba


Note that the first method may contain bugs when multiple tables are specified.





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.