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, OLAP, 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, 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

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 ~]$

 

 


你可能感兴趣的:(oracle11g expdp报错 ORA-06512: at "SYS.UTL_FILE", line 536)