1. Create a TNS string:
Zqxt =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 132.97.172.186) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = ora11g)
)
)
2. query the tablespace SQL of remote data:
1) select distinct 'select dbms_metadata.get_ddl (''tablespace '', ''' | tablespace_name | ''') from dual; 'from dba_tables; obtain the query SQL for each tablespace.
2) run the SQL statement to find the tablespace.
3. Create a tablespace based on the result of step 1.
4. query the role permissions and tablespace of a remote user:
Select * from user_role_privs;
Select username, default_tablespace from user_users;
5. Create a user based on the 4th results and grant permissions, roles, and tablespaces to the user.
Create user ityy_z1_w
Identified by zjww123 default tablespace TBS_ITYY
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
Account unlock;
Grant connect, CTXAPP, DBA, resource to ityy_zw.w;
Grant read, write on directory DATA_PUMP_DIR to ityy_z1_w;
6. Create DB_LINK
Create public database link zqxt connect to ityy_zw.w identified by zw.w123 using 'zqxt ';
7. Use the NETWORK_LINK of IMPDP for Migration
Impdp ityy_z1_w/z1_w123 directory = DATA_PUMP_DIR network_link = zqxt logfile = ityy. log
The execution result is as follows:
Import: Release 11.2.0.1.0-Production on Friday June 28 16:52:03 2013
Copyright (c) 1982,200 9, Oracle and/or its affiliates. All rights reserved.
Connect to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Produc
Tion
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Start "ityy_z1_w". "SYS_IMPORT_SCHEMA_01": ityy_z1_w/******** directory = DATA_PUMP
_ DIR network_link = zqxt logfile = ityy. log
Using the BLOCKS Method for estimation...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using the BLOCKS method: 24.50 GB
Processing object type SCHEMA_EXPORT/USER
ORA-31684: Object Type USER: "ityy_z1_w" already exists
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SYNONYM
Processing object TYPE SCHEMA_EXPORT/TYPE/TYPE_SPEC
Processing object type SCHEMA_EXPORT/DB_LINK
Processing object type SCHEMA_EXPORT/SEQUENCE
Processing object type SCHEMA_EXPORT/TABLE
.. Imported "ityy_z1_w". "X_CUSTOMER" line 12878088
Another article: Oracle 11g remote database export: