Oracle win 下expdp 导出数据出错 ORA-06512: 在 "SYS.UTL_FILE", line 536

场景 windows 的cmd 下面输入

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on 星期二 6月 12 17:06:32 2012

Copyright (c) 1982, 2010, Oracle. All rights reserved.


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> create directory dump_dir as '@d:\';

目录已创建。

SQL> grant read,write on directory dump_dir to ua;

授权成功。

C:\Users\Administrator>expdp "'ua/pwd@orcl'" schemas=ua directory=dump
_dir dumpfile=uachema_20120612.dmp compression=all

Export: Release 11.2.0.1.0 - Production on 星期二 6月 12 17:12:46 2012

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-39002: 操作无效
ORA-39070: 无法打开日志文件。
ORA-29283: 文件操作无效
ORA-06512: 在 "SYS.UTL_FILE", line 536
ORA-29283: 文件操作无效

解决方法:
directory=data_pump_dir 然后在 C:\oracle\product\10.2.0\admin\yingda\dpdump可以找到该文件 。impdp有exist_table_action参数,可以设置为replace。这样可以覆盖导入。 

C:\Users\Administrator>expdp "'ua/pwd@orcl'" schemas=ua directory=data_pump_dir dumpfile=uachema_20120612.dmp compression=all

 

 

posted @ 2012-06-12 17:27  VipSoft  阅读(23089)  评论(2编辑  收藏  举报