oracle 10g impdp导入命令使用总结(2)
发布时间:2021-06-07
发布时间:2021-06-07
oracle 10g impdp导入命令使用总结
5) 通过DBLINK的方式直接从远程数据库导入数据, 省去生成中间文件的步骤
--创建Directory
SQL> connect u_test/xxx
SQL> !mkdir /u02/backup
SQL> create or replace directory dir_dpdump as '/u02/backup';
--创建DBLINK
SQL> create database link connect to u_test identified by "xxx" using 'db_esuite';
SQL> select count(*) from tab@;
--利用IMPDP导入数据
$ impdp 'u_test/"xxx"' SCHEMAS=(u_test) directory=dir_dpdump network_link="" logfile=impdp.log
$ impdp 'u_test/"xxx"' TABLES=LOG_RECORD_DETAIL_20090422 directory=dir_dpdump network_link=""
6) 实例
SQL> conn /as sysdba
SQL> CREATE OR REPLACE DIRECTORY dir_dump AS '/u01/backup/';
SQL> GRANT read,write ON DIRECTORY dir_dump TO public;
SQL> grant connect, resource to trial_wending identified by 'xxx';
SQL> CREATE TABLESPACE WENDING_LOG01 DATAFILE '/orahome/oradata/WENDING/wending_log01.dbf' SIZE 100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED;