龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > 数据库类 > Oracle 技术 >

Oracle数据泵(Data Dump)使用过程当中经常会遇到一些奇奇怪怪的错误案例(2)

时间:2014-09-11 02:21来源:网络整理 作者:网络 点击:
分享到:
如下所示: etl@NMS_ODS_NDB1[/jkfile/work/klb]#expdp userid=etl/sunrise@wgods1 dumpfile=ref.dmp directory=DUMP_DIR schemas=ref content=all logfile=ref.log Export: Release 10.2.0.3.0 - 64bit Produc

如下所示:

etl@NMS_ODS_NDB1[/jkfile/work/klb]#expdp userid=etl/sunrise@wgods1 dumpfile=ref.dmp directory=DUMP_DIR schemas=ref content=all logfile=ref.log 

Export: Release 10.2.0.3.0 - 64bit Production on Saturday, 02 March, 2013 10:50:25 

Copyright (c) 2003, 2005, Oracle. All rights reserved. 

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production 

With the Partitioning, Real Application Clusters, OLAP and Data Mining options 

ORA-31631: privileges are required 

ORA-39109: Unprivileged users may not operate upon other users' schemas 

解决方法:

主要是etl账号缺少exp_full_database 权限,给etl账号授予exp_full_database 权限后,上述问题解决。

# su - oracle 

$ sqlplus / as sysdba 

SQL*Plus: Release 10.2.0.3.0 - Production on Sat Mar 2 10:58:37 2013 

Copyright (c) 1982, 2006, Oracle. All Rights Reserved. 

Connected to: 

Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production 

With the Partitioning, Real Application Clusters, OLAP and Data Mining options 

SQL> grant exp_full_database to etl; 

Grant succeeded. 

错误案例5:

etl@NMS_ODS_NDB1[/etl1_cx/etl]expdp etl/sunrise@wgods1 dumpfile=DM.TM_ALARM_LOG.dmp directory=DUMP_DIR tables=DM.TM_ALARM_LOG query='DATE_CD >=20121201 AND DATE_CD <=20130131'; 

LRM-00101: unknown parameter name '>' 

解决方法:

etl@NMS_ODS_NDB1[/etl1_cx/etl]expdp etl/sunrise@wgods1 dumpfile=DM.TM_ALARM_LOG.dmp directory=DUMP_DIR tables=DM.TM_ALARM_LOG query="DATE_CD \>\=20121201 AND DATE_CD \<\=20130131"; 

错误案例6:

LRM-00121: 'DATA_ONLY' is not an allowable value for 'compression'。如下所示:

etl@NMS_ODS_NDB1[/etl1_cx/etl]#expdp etl/sunrise@wgods1 dumpfile=ref.dmp directory=DUMP_DIR dumpfile=DM.TM_ALARM_LOG201212.dmp tables=DM.TM_ALARM_LOG COMPRESSION=DATA_ONLY query='DATE_CD >=20121201 AND DATE_CD <=20130131'; 

LRM-00121: 'DATA_ONLY' is not an allowable value for 'compression' 

解决方法:

首先查看EXPDP工具的版本,如下所示:

etl@NMS_ODS_NDB1[/etl1_cx/etl]#expdp version 

Export: Release 10.2.0.3.0 - 64bit Production on Monday, 04 March, 2013 14:46:47 

Copyright (c) 2003, 2005, Oracle. All rights reserved. 

Password: 

请注意,在ORACLE 10g下 COMPRESSION只有METADATA_ONLY和NONE两个选项,ORACLE 11g下才有DATA_ONLY选项。所以报如上错误。所以在使用前,请注意一下EXPDP工具的版本。

错误案例7:

[oracle@DB-Server]$ expdp system/***** TABLES=INVENRTY.INV_STK_HD dumpfile=INV_STK_HD.dmp logfile=1.log DIRECTORY=CUR_DUMP_DIR 

Export: Release 10.2.0.4.0 - Production on Sunday, 14 July, 2013 8:27:16 

Copyright (c) 2003, 2007, Oracle. All rights reserved. 

Connected to: Oracle Database 10g Release 10.2.0.4.0 - Production 

ORA-31626: job does not exist 

ORA-31637: cannot create job SYS_EXPORT_TABLE_01 for user SYSTEM 

ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95 

ORA-06512: at "SYS.KUPV$FT_INT", line 600 

ORA-39080: failed to create queues "KUPC$C_1_20130714082716" and "KUPC$S_1_20130714082716" for Data Pump job 

ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95 

ORA-06512: at "SYS.KUPC$QUE_INT", line 1606 

ORA-00832: no streams pool created and cannot automatically create one 

解决方法:

这个案例我以前已经介绍过,具体参考我的博客 Expdp 导数错误 ORA-00832

错误案例8:

[oracle@testlnx01 u03]$ cd tmp/ 

[oracle@testlnx01 tmp]$ expdp system/***** directory=DUMPDIR dumpfile=ESCMUSER.dmp schemas=ESCMUSER logfile=ESCMUSER.log 

Export: Release 10.2.0.4.0 - 64bit Production on Wednesday, 27 August, 2014 16:30:46 

Copyright (c) 2003, 2007, Oracle. All rights reserved. 

Connected to: Oracle Database 10g Release 10.2.0.4.0 - 64bit Production 

ORA-31626: job does not exist 

ORA-31633: unable to create master table "SYSTEM.SYS_EXPORT_SCHEMA_05" 

ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95 

ORA-06512: at "SYS.KUPV$FT", line 871 

ORA-00959: tablespace 'TOOLS' does not exist 

解决方法:

这个案例有点特别,刚遇到的时候,确实有点莫名其妙,经过苦苦求索、求证后才发现,本来有一个TOOLS的表空间,不知道是哪位头脑发热的人,居然指定SYSTEM用户的默认表空间为TOOLS,但是这个表空间又被人删除了。于是便有了这样一个案例。

精彩图集

赞助商链接