使用 expdp 的前提

$ expdp hub/hub dumpfile=scott.dmp logfile=scott.dmp directory=infouser_backup schemas=scott

Export: Release 10.2.0.1.0 - 64bit Production on Thursday, 25 October, 2007 10:19:17

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation

-- 目录是否存在

SELECT   *   FROM  dba_directories

没的话,通下如下语句创建一个:

create  directory  backup   as   ' /home/oracle/backup ' ;
grant   read , write  on  directory  backup   to  scott;

-- 目录是否有操作系统权限

ls  - l

 

导出与导入:

$expdp stage_two / stage_two@oralocal dumpfile = scott.dmp directory = dir_expdp logfile = scott.log schemas = scott
$impdp stage_two / stage_two@oralocal dumpfile = scott.dmp directory = dir_expdp logfile = imp_scott.log schemas = scott

如果想导到其它用户里,还可以这样:

impdp scott2 / tiger @oradw  directory = TMP dumpfile = scott.dp remap_schema = scott:scott2
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值