$ 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
本文介绍了Oracle数据库中使用expdp和impdp命令进行数据导出与导入的过程。解决因目录不存在或权限不足导致的问题,并提供了具体的命令示例。
2万+

被折叠的 条评论
为什么被折叠?



