(10G)ORA-31693、ORA-00920

在用数据泵导出emp表工资高于 2500 那些记录的时候报

ORA-31693: Table data object "SCOTT"."EMP" failed to load/unload and is being skipped due to error:

ORA-00920: invalid relational operator

的错误

出现此错误的命令为

[oracle@zhang u02]$ expdp scott/tiger directory=dump_dir dumpfile=sal.dmp tables=emp query=\'emp:\"where sal >= 2500\"\'

将上述命令更改为

[oracle@zhang u02]$ expdp scott/tiger directory=dump_dir dumpfile=sal.dmp tables=emp query=\'emp:\"where sal \>= 2500\"\'

 

Export: Release 10.2.0.1.0 - Production on Monday, 07 April, 2014 0:01:21

 

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

 

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, OLAP and Data Mining options

Starting "SCOTT"."SYS_EXPORT_TABLE_01":  scott/******** directory=dump_dir dumpfile=sal.dmp tables=emp query='emp:"where sal >= 2500"'

Estimate in progress using BLOCKS method...

Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 64 KB

Processing object type TABLE_EXPORT/TABLE/TABLE

Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX

Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT

Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS

Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT

Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS

. . exported "SCOTT"."EMP"                               7.453 KB       5 rows

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

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

Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is:

  /u02/expdp/sal.dmp

Job "SCOTT"."SYS_EXPORT_TABLE_01" successfully completed at 00:01:28

 

[oracle@zhang u02]$

即可

不过在11G中貌似这样也可不会报错

请使用浏览器的分享功能分享到微信等