SQL> @ver
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
CREATE PUBLIC DATABASE LINK "TESTB.COM" CONNECT TO scott IDENTIFIED BY xxxx USING 'testb:1521/orcl';
SQL> select * from dual@testb.com;
D
-
X
SQL> select * from v$version where rownum<=1;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
--以scott用户建立一张表:
create table t1 as select rownum id ,'test' name from dual connect by level<=1000;
create unique index pk_t1 on t1(id);
alter table t1 add constraint pk_t1 primary key (id);
create or replace trigger tr_t
before insert on t1
referencing new as new old as old
for each row
declare
begin
null;
end ;
/
var n number;
exec :n := dbms_datapump.open('IMPORT','TABLE','TESTB.COM');exec dbms_datapump.metadata_filter(:n,'SCHEMA_LIST','''SCOTT''');
exec dbms_datapump.metadata_filter(:n,'NAME_LIST','''T1''');
exec dbms_datapump.start_job(:n);
commit ;
--drop table t1 purge ;
$ impdp scott/xxxx DIRECTORY=DATA_PUMP_DIR LOGFILE=t1.log NETWORK_LINK=testb.com TABLES=t1
Import: Release 11.2.0.3.0 - Production on Mon Apr 15 16:51:10 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SCOTT"."SYS_IMPORT_TABLE_01": scott/******** DIRECTORY=DATA_PUMP_DIR LOGFILE=t1.log NETWORK_LINK=testb.com TABLES=t1 */
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 128 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
. . imported "SCOTT"."T1" 1000 rows
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/TRIGGER
Job "SCOTT"."SYS_IMPORT_TABLE_01" successfully completed at 16:51:17
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-758521/ ,如需转载,请注明出处,否则将追究法律责任。