ITPub博客

首页 > 数据库 > Oracle > 你所不知道的OERR

你所不知道的OERR

原创 Oracle 作者:Jet_Zhang 时间:2015-05-12 23:25:46 1 删除 编辑

作为Oracle用户,你应该对OERR工具不陌生。这是一个非常实用的工具,利用该工具可以迅速获取Oracle的错误信息,帮助解决问题。如:

$ oerr ora 1652

01652, 00000, "unable to extend temp segment by %s in tablespace %s"

// *Cause:  Failed to allocate an extent of the required number of blocks for

//          a temporary segment in the tablespace indicated.

// *Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more

//          files to the tablespace indicated.

Cause描述的是导致错误的原因,Action描述的是错误解决方案。对于ORA-XXXXX错误,当你不知道如何解决时,我相信你都会去使用OERR工具来帮助解决。但是,你可能不知道,OERR的用途不仅仅在于ORA错误,它还能用于其它类型的错误。如:

$ oerr lrm 112

112, 0, "multiple values not allowed for parameter '%.*s'"

// *Cause: An attempt was made to specify multiple values for a parameter which

//         can take only one value.

// *Action: Do not specify more than one value for this parameter.

这是在使用expdp时使用directory参数不当时可能会产生的错误。你同样也可以使用OERR工具来获取详细的错误信息。再比如:

$ oerr exp 91

00091, 00000, "Exporting questionable statistics."

// *Cause:  Export was able export statistics, but the statistics may not be

//          usuable. The statistics are questionable because one or more of

//          the following happened during export: a row error occurred, client

//          character set or NCHARSET does not match with the server, a query

//          clause was specified on export, only certain partitions or

//          subpartitions were exported, or a fatal error occurred while

//          processing a table.

// *Action: To export non-questionable statistics, change the client character

//          set or NCHARSET to match the server, export with no query clause,

//          export complete tables. If desired, import parameters can be

//          supplied so that only non-questionable statistics will be imported,

//          and all questionable statistics will be recalculated.

$ oerr imp 17

00017, 00000, "following statement failed with ORACLE error %lu:"

// *Cause:  Import failed to execute the statement from the export file 

//          because of an Oracle error. 

// *Action: Look up the accompanying Oracle message in the ORA message 

//          chapters of this manual and take appropriate action. 

这是在使用EXP和IMP时可能产生的错误,同样的,我们也可以使用OERR工具来检索错误信息。

以上只是举例,OERR能检索的错误还有很多,包括CLSR、OCI、TNS、UDE等等。但是这些在Oracle官方文档里并没有说明,还需要各位自己去多多实践。

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/13885898/viewspace-1651585/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: EXP-00091错误解决
请登录后发表评论 登录
全部评论
中国南方Oracle用户组(SOUG)联合创始人,Oracle ACE,曾服务于国外某大型银行,曾担任国内某中型保险公司的技术经理,现为易景科技合伙人、首席架构师、CTO。主要研究方向数据库内核。

注册时间:2024-06-26

  • 博文量
    124
  • 访问量
    542493