天天看点

ORA-39005 inconsistent arguments报错处理

--在某个11g库执行导出操作时,报错ORA-39055

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production

With the Partitioning, Real Application Clusters, Oracle Label Security, OLAP,

Data Mining and Real Application Testing options

ORA-39005: inconsistent arguments

ORA-39055: The COMPRESSION feature is not supported in version 10.2.0.5.0.

--这是由于数据库中设置了参数compatible为10.2.0.5.0

SQL> Show parameters comp

NAME                                 TYPE        VALUE

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

cell_offload_compaction              string      ADAPTIVE

compatible                           string      10.2.0.5.0

--数据库版本为11.2.0.4

--导出语句

expdp  '/ as sysdba'  directory=DUMP_DIR DUMPFILE=fullbak.dmp full=y logfile=fullbak.log COMPRESSION=ALL 

没有制定版本,默认沿用了数据库中设置的compatible,导致compression这个参数对于10g的数据库是没有的,所以报错

--解决办法

1、按照10g的参数导出,去掉压缩参数,但会导致导出文件较大

expdp  '/ as sysdba'  directory=DUMP_DIR DUMPFILE=fullbak.dmp full=y logfile=fullbak.log 

2、加入version参数,制定导出时的版本参数为11g

expdp  '/ as sysdba'  directory=DUMP_DIR DUMPFILE=fullbak.dmp full=y logfile=fullbak.log version=11.2.0.4.0 COMPRESSION=ALL