原创  使用 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

发表于 @ 2007年10月29日 18:05:00 | 评论( loading... ) | 编辑| 举报| 收藏

旧一篇:SQL*Loader 导入大文本数据 | 新一篇:pl/sql 终于出现 continue 在 11g 里了

  • 发表评论
  • 评论内容:
  •  
Copyright © chanet
Powered by CSDN Blog