sys@HUIYI(192.168.1.100)> create public database link huiyi_lnk
2connect to system identified by oracle
3using 'huiyi';
Database link created.
Elapsed: 00:00:00.02
sys@HUIYI(192.168.1.100)> select username
2from dba_users
3 where username like 'SCOTT%';
USERNAME
------------------------------
SCOTT
Elapsed: 00:00:00.06
[oracle@huiyi ~]$ impdp system/oracle network_link=huiyi_lnk schemas=scott remap_schema=scott:scott2 remap_tablespace=users:tbs01
Import: Release 10.2.0.4.0 - Production on Tuesday, 10 June, 2008 3:34:25
Copyright (c) 2003, 2007, Oracle.All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYS"."SYS_IMPORT_SCHEMA_01": network_link=huiyi_lnk schemas=scott remap_schema=scott:scott2 remap_tablespace=users:tbs01
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 192 KB
Processing object type SCHEMA_EXPORT/USER
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/TABLE/TABLE
. . imported "SCOTT2"."DEPT"
4 rows
. . imported "SCOTT2"."EMP"
14 rows
. . imported "SCOTT2"."SALGRADE"
5 rows
. . imported "SCOTT2"."BONUS"
0 rows
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYS"."SYS_IMPORT_SCHEMA_01" successfully completed at 03:35:36
sys@HUIYI(192.168.1.100)> select username
2from dba_users
3 where username like 'SCOTT%';
USERNAME
------------------------------
SCOTT
SCOTT2
Elapsed: 00:00:00.07
sys@HUIYI(192.168.1.100)> select table_name
2from dba_tables
3 where owner='SCOTT2';
TABLE_NAME
------------------------------
DEPT
EMP
BONUS
SALGRADE
Elapsed: 00:00:00.13
|