oracle11g expdp报错 ORA-06512: at "SYS.UTL_FILE", line 536

1,在linux命令行里面expdp导出数据报错:

[oracle@ocrm ~]$ expdp \'crm_user/crm010209\' directory=DIR_DUMPtables=bis_store dumpfile=bis_store_wubo_bak_$(date +%Y%m%d)_02.dmp

Export: Release 11.2.0.1.0 - Production onFri Jul 1 19:40:09 2016

copyright (c) 1982,2009,Oracle and/or itsaffiliates. All rights reserved.

Connected to: Oracle Database 11gEnterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning,OLAP,Data Miningand 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

[oracle@ocrm ~]$

分析,可能是导出的directory无效,需要重新设置下。

2,查看directory是否存在

sql> select * from dba_directories whereDIRECTORY_NAME='DIR_DUMP';

OWNER DIRECTORY_NAME

------------------------------------------------------------

DIRECTORY_PATH

--------------------------------------------------------------------------------

SYS DIR_DUMP

/oracle/expdir/

sql> exit

disconnected from Oracle Database 11gEnterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning,Data Miningand Real Application Testing options

[oracle@ocrm ~]$ ll /oracle/expdir/

ls: cannot access /oracle/expdir/: No suchfile or directory

[oracle@ocrm ~]$

果然这个目录无效,看了需要重建目录了。

3,重建目录

[oracle@ocrm ~]$ mkdir -p /oracle/expdir/

[oracle@ocrm ~]$

4,再重新导出成功

[oracle@ocrm ~]$ expdp \'crm_user/crm010209\' directory=DIR_DUMPtables=bis_store dumpfile=bis_store_wubo_bak_$(date +%Y%m%d)_02.dmp

Export: Release 11.2.0.1.0 - Production onFri Jul 1 20:04:50 2016

copyright (c) 1982,Data Miningand Real Application Testing options

Starting "CRM_USER"."SYS_EXPORT_TABLE_01": "crm_user/********"directory=DIR_DUMP tables=bis_store dumpfile=bis_store_wubo_bak_20160701_02.dmp

Estimate in progress using BLOCKS method...

Processing object typeTABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 5 MB

Processing object typeTABLE_EXPORT/TABLE/TABLE

Processing object typeTABLE_EXPORT/TABLE/COMMENT

Processing object typeTABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

. . exported "CRM_USER"."BIS_STORE" 4.097 MB 11626 rows

Master table "CRM_USER"."SYS_EXPORT_TABLE_01"successfully loaded/unloaded

******************************************************************************

Dump file set for CRM_USER.SYS_EXPORT_TABLE_01is:

/oracle/expdir/bis_store_wubo_bak_20160701_02.dmp

Job "CRM_USER"."SYS_EXPORT_TABLE_01"successfully completed at 20:05:11

[oracle@ocrm ~]$

相关文章

Java Oracle 结果集是Java语言中处理数据库查询结果的一种方...
Java AES和Oracle AES是现代加密技术中最常使用的两种AES加密...
Java是一种广泛应用的编程语言,具备可靠性、安全性、跨平台...
随着移动互联网的发展,抽奖活动成为了营销活动中不可或缺的...
Java和Oracle都是在计算机领域应用非常广泛的技术,他们经常...
Java 是一门非常流行的编程语言,它可以运行于各种操作系统上...