首页 > 其他 > 详细

你所不知道的OERR

时间:2015-05-15 02:20:42      阅读:436      评论:0      收藏:0      [点我收藏+]

作为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. 

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

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

 

你所不知道的OERR

原文:http://blog.itpub.net/13885898/viewspace-1651585/

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!