admin 管理员组文章数量: 1184232
2024年4月24日发(作者:sadie)
Data Pump
一、 Data Pump Export
要求:实现将scott用户的所有数据导出来
1.在操作系统的文件系统中创建文件夹
在oracle目录下创建导出位置的目录:
在目录D:oracleproduct10.2.0下创建TempDataPumpXfer目录
2.在oracle数据库创建目录,以system身份执行命令:
SQL> create directory DataDumpDir as
'D:oracleproduct10.2.0TempDataPumpDir';
3. 为目录授权,以system身份执行命令:
SQL> grant read, write on directory DataDumpDir to scott;
4. 执行命令:
cmd>expdp scott/xing directory=DataPumpDir dumpfile=dp_
logfile=dp_ schemas=scott;
或者:
新建D:oracleproduct10.2.0TempDataPumpDirdp_文件;
新建D:oracleproduct10.2.0TempDataPumpDirdp_文件,内容为:
directory= DataPumpDir
dumpfile=dp_
logfile=dp_
#schemas=scott (注:默认执行的是schemas类型,且执行的默认对象是
expdp命令中scott/xing对象。)
然后使用命令:
cmd>expdp scott/xing parfile =
D:oracleproduct10.2.0TempDataPumpDirdp_
以上四步为基本步骤。
注:可以使用network_link
编辑D:oracleproduct10.2.0TempDataPumpDirdp_文件:
directory=DataPumpDir
dumpfile=dp_
logfile=dp_
#schemas=scott
network_link=(事先要在Net Manage配置好)
然后使用命令:
cmd>expdp scott/xing@ parfile=E:appxingTempDataPump
Dirdp_
本人是把远程(10g)中的scott数据导入到本地(11g)的文件
目录中,结果在执行命令时提示:
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
UDE-00018: 数据泵客户机与数据库版本 10.2.0.1.0 不兼容
二、 Data Pump Import
注:执行Data Pump Import需先完成前面Data Pump Export的四个步骤;
另外执行Data Pump Import一般是在另外一台oracle数据库上,本人是在
(11g)上执行Data Pump Import的。
1. 以system身份创建新用户scott并授权:
SQL>grant resource, connect to scott identified by xing;
2. 执行命令:
cmd>impdp
parfile=E:appxingTempDataPumpDirdp_
system/xing
版权声明:本文标题:Oracle Data Pump 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1713965584a659649.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论