首页 > Linux操作系统 > Linux操作系统 > expdp and impdp
一、EXPDP IMPDP基本用法:
SQL> create directory expdp_dir as 'd:\backup';
目录已创建。
SQL> grant read,write on directory expdp_dir to test;
授权成功。
C:\Documents and Settings\weifengz>expdp test/test schemas=test directory=expdp_
dir dumpfile=test;
Export: Release 10.2.0.1.0 - Production on 星期五, 23 5月, 2008 12:56:07
Copyright (c) 2003, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
启动 "TEST"."SYS_EXPORT_SCHEMA_01": test/******** schemas=test directory=expdp_
dir dumpfile=test;
正在使用 BLOCKS 方法进行估计...
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的总估计: 64 KB
处理对象类型 SCHEMA_EXPORT/USER
处理对象类型 SCHEMA_EXPORT/SYSTEM_GRANT
处理对象类型 SCHEMA_EXPORT/ROLE_GRANT
处理对象类型 SCHEMA_EXPORT/DEFAULT_ROLE
处理对象类型 SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
处理对象类型 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
. . 导出了 "TEST"."TEST" 4.976 KB 10 行
已成功加载/卸载了主表 "TEST"."SYS_EXPORT_SCHEMA_01"
******************************************************************************
TEST.SYS_EXPORT_SCHEMA_01 的转储文件集为:
D:\BACKUP\TEST;.DMP
作业 "TEST"."SYS_EXPORT_SCHEMA_01" 已于 12:56:56 成功完成
C:\Documents and Settings\weifengz>expdp test/test schemas=test directory=expdp_
dir dumpfile=test.dmp
Export: Release 10.2.0.1.0 - Production on 星期五, 23 5月, 2008 13:00:29
Copyright (c) 2003, 2005, Oracle. All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
启动 "TEST"."SYS_EXPORT_SCHEMA_01": test/******** schemas=test directory=expdp_
dir dumpfile=test.dmp
正在使用 BLOCKS 方法进行估计...
处理对象类型 SCHEMA_EXPORT/TABLE/TABLE_DATA
使用 BLOCKS 方法的总估计: 64 KB
处理对象类型 SCHEMA_EXPORT/USER
处理对象类型 SCHEMA_EXPORT/SYSTEM_GRANT
处理对象类型 SCHEMA_EXPORT/ROLE_GRANT
处理对象类型 SCHEMA_EXPORT/DEFAULT_ROLE
处理对象类型 SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
处理对象类型 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
. . 导出了 "TEST"."TEST" 4.976 KB 10 行
已成功加载/卸载了主表 "TEST"."SYS_EXPORT_SCHEMA_01"
******************************************************************************
TEST.SYS_EXPORT_SCHEMA_01 的转储文件集为:
D:\BACKUP\TEST.DMP
作业 "TEST"."SYS_EXPORT_SCHEMA_01" 已于 13:00:51 成功完成
二、在客户端数据库利用expdp导出服务器对象
1、在客户端数据库创建db link和要保存备份文件的目录;
create directory dpump_dir as 'xxxxxx';
create public database db_link_pub connect to USERNAME identified by PASSWORD using 'TNSNAME';
2、在客户端发布命令
expdp USERNAME/PASSWORD tables=test directory=dpump_dir network_link=db_link_pub dumpfile=test.dmp logfile=test.log
三、导出到NFS文件系统:
linux mount parameter: mount -t nfs -o rw,hard,nointr,tcp,noac,vers=3,timeo=600,rsize=32768,wsize=32768
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/756652/viewspace-302669/ ,如需转载,请注明出处,否则将追究法律责任。