oracle 10g 使用expdp network_link导出远程数据库到本地文件 【转载】
文章不错,解除疑惑,oracle10G0204可以实现远程导入导出,不过就是需要用到db link oracle 10g 使用expdp network_link导出远程数据库到本地文件
2012-09-06 14:57:57| 分类: oracle |字号 订阅 远程: IP:192.168.10.55,OS:RHEL4.8 64bit,Oracle:10.2.0.5 64bit 被导出用户:monitor 本地: ip: 172.*,WINDOWS XP,oracle 10.2.0.4。 本地tns :cheniwo 本地配置的联系到远程的tns:lobom55 1)确定本地可访问远程 F:\oracle\product\10.2.0\db_2\network\admin\sqlnet.ora
已使用 TNSNAMES 适配器来解析别名 Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP (HOST = 192.168.10.55)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = lobomb))) OK (40 毫秒)
2)在本地建立dblink到远程 F:\Documents and Settings\Administrator>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on 星期四 9月 6 14:25:44 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create database link dl_monitor connect to monitor identified by monitor us ing 'lobom55';
数据库链接已创建。 SQL> select sysdate from dual@dl_monitor;
SYSDATE
06-9月 -12 3)数据泵导出 F:\Documents and Settings\Administrator>expdp network_link=dl_monitor dumpfile=n etwork_monitor.dmp /-------------------------------------------------- 说明:network_link是你建立的到远程的database link 下边输入的用户名是你本地数据库的认证 dumpfile 将放在data_pump_dir目录定义的本地目录下 -------------------------------/ Export: Release 10.2.0.4.0 - Production on 星期四, 06 9月, 2012 14:40:17
Copyright (c) 2003, 2007, Oracle. All rights reserved.
用户名: / as sysdba
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 启动 "SYS"."SYS_EXPORT_SCHEMA_01": /******** AS SYSDBA network_link=dl_monitor dumpfile=network_monitor.dmp 正在使用 BLOCKS 方法进行估计... 处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA 使用 BLOCKS 方法的总估计: 81.68 MB 处理对象类型 SCHEMA_EXPORT/USER 处理对象类型 SCHEMA_EXPORT/SYSTEM_GRANT 处理对象类型 SCHEMA_EXPORT/ROLE_GRANT 处理对象类型 SCHEMA_EXPORT/DEFAULT_ROLE 处理对象类型 SCHEMA_EXPORT/TABLESPACE_QUOTA 处理对象类型 SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA 处理对象类型 SCHEMA_EXPORT/SEQUENCE/SEQUENCE 处理对象类型 SCHEMA_EXPORT/TABLE/TABLE 处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/INDEX 处理对象类型 SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT 处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS 处理对象类型 SCHEMA_EXPORT/TABLE/COMMENT 处理对象类型 SCHEMA_EXPORT/FUNCTION/FUNCTION 处理对象类型 SCHEMA_EXPORT/PROCEDURE/PROCEDURE 处理对象类型 SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION 处理对象类型 SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE 处理对象类型 SCHEMA_EXPORT/VIEW/VIEW 处理对象类型 SCHEMA_EXPORT/VIEW/COMMENT 处理对象类型 SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT 处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/FUNCTIONAL_AND_BITMAP/INDEX 处理对象类型 SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_ST ATISTICS 已成功加载/卸载了主表 "SYS"."SYS_EXPORT_SCHEMA_01"
SYS.SYS_EXPORT_SCHEMA_01 的转储文件集为: F:\ORACLE\PRODUCT\10.2.0\ADMIN\CHENIWO\DPDUMP\NETWORK_MONITOR.DMP 作业 "SYS"."SYS_EXPORT_SCHEMA_01" 已于 14:51:41 成功完成 4)检查结果: SQL> set head off SQL> select * from dba_directories where directory_name='DATA_PUMP_DIR';
SYS DATA_PUMP_DIR F:\oracle\product\10.2.0\admin\cheniwo\dpdump\
SQL> F:\Documents and Settings\Administrator>cd F:\oracle\product\10.2.0\admin\cheniw o\dpdump
F:\oracle\product\10.2.0\admin\cheniwo\dpdump>dir/w 驱动器 F 中的卷是 新加卷 卷的序列号是 88F0-A421
F:\oracle\product\10.2.0\admin\cheniwo\dpdump 的目录
cheniwo.sql
CHENIWO_DP.DMP dp.log EXPDAT.DMP export.log FULL_CHENIWO.DMP import.log NETWORK_MONITOR.DMP TABLES_CHENIWO.DMP TABLES_CHENIWO2.DMP TS_CHENIWO.DMP USER_CHENIWO.DMP 12 个文件 128,977,860 字节 2 个目录 155,032,698,880 可用字节
F:\oracle\product\10.2.0\admin\cheniwo\dpdump>