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.