Chinaunix首页 | 论坛 | 博客
  • 博客访问: 229521
  • 博文数量: 57
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 674
  • 用 户 组: 普通用户
  • 注册时间: 2013-11-30 22:48
个人简介

2014,换个角度,希望接下来的事情值得期待。

文章分类

全部博文(57)

文章存档

2015年(1)

2014年(55)

2013年(1)

我的朋友

分类: Oracle

2014-01-18 21:34:18

导出测试时,报如下错误:
oracle@pc-centos u01]$ expdp  \'/  as  sysdba\'  directory=backupdir  full=y dumpfile=fullexp.dmp logfile=fullexp.log parallel=2

Export: Release 11.2.0.1.0 - Production on Wed Jan 15 05:03:00 2014

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

Connected to: 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: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation

原因:在操作系统未有实际备份目录,创建并授权。

一、查看备份目录

SQL> select * from dba_directories;
 
OWNER                          DIRECTORY_NAME                 DIRECTORY_PATH
------------------------------ ------------------------------ --------------------------------------------------------------------------------
SYS                            BACKUPDIR                      /u01/backupdir/
SYS                            SQLDR                          /u01/oracle/sqldr
SYS                            EXPDIR                         /u01/expdir
SYS                            SUBDIR                         /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/order_entry//2002/Sep
SYS                            SS_OE_XMLDIR                   /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/order_entry/
SYS                            LOG_FILE_DIR                   /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/log/
SYS                            DATA_FILE_DIR                  /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/sales_history/
SYS                            XMLDIR                         /ade/b/1191423112/oracle/rdbms/xml
SYS                            MEDIA_DIR                      /u01/app/oracle/product/11.2.0/dbhome_1/demo/schema/product_media/
SYS                            DATA_PUMP_DIR                  /u01/app/oracle/admin/orcl/dpdump/
SYS                            ORACLE_OCM_CONFIG_DIR          /u01/app/oracle/product/11.2.0/dbhome_1/ccr/state
 
11 rows selected

二、在操作系统上查看目录
root@pc-centos ~]# cd /u01
[root@pc-centos u01]# ls
app  expdir  temp
三、创建目录
[root@pc-centos u01]# mkdir backupdir
[root@pc-centos u01]# ls
app  backupdir  expdir  temp
[root@pc-centos u01]# ls -rlt
total 16
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2012 app
drwxr-xr-x. 2 oracle oinstall 4096 Jul 26 20:40 temp
drwxr-xr-x. 2 oracle oinstall 4096 Jul 27 12:33 expdir
drwxr-xr-x. 2 root   root     4096 Jan 15 05:04 backupdir

四、授权

root@pc-centos u01]# chown -R oracle:oinstall backupdir
[root@pc-centos u01]# ls -rlt
total 16
drwxr-xr-x. 4 oracle oinstall 4096 May 10  2012 app
drwxr-xr-x. 2 oracle oinstall 4096 Jul 26 20:40 temp
drwxr-xr-x. 2 oracle oinstall 4096 Jul 27 12:33 expdir
drwxr-xr-x. 2 oracle oinstall 4096 Jan 15 05:04 backupdir

再执行导出,正常。


阅读(2850) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~