您好,登錄后才能下訂單哦!
oerr可以在Linux和UNIX操作系統(tǒng)上查詢簡(jiǎn)短的報(bào)錯(cuò)信息的含義,可以很好的輔助排查Oracle故障。
1.oerr的使用方法
[oracle@BJS ~]$ oerr ora 12571
12571, 00000, "TNS:packet writer failure"
// *Cause: An error occurred during adatasend.
// *Action: Not normally visible to the user. For further details, turn
// on tracing and reexecute the operation. If error persists, contact
// Oracle Customer Support.
2.使用which命令查詢oerr工具的位置
secooler@testdb /home/oracle$ which oerr
/u01/app/oracle/product/10.2/db10g/bin/oerr
3.看一下這個(gè)腳本文件記錄的內(nèi)容
secooler@testdb /home/oracle$ vi /u01/app/oracle/product/10.2/db10g/bin/oerr
腳本中 82 Msg_File=$ORACLE_HOME/$Component/mesg/${Facility}us.msg
這里似乎暗示著我們,所有的檢索信息都是來(lái)自于這些*.msg文件
4.在ORACLE_HOME目錄中使用find命令查找msg文件
[oracle@NcDbEmulator mesg]$ find $ORACLE_HOME -name mesg
/oracle/app/oracle/dbhome/network/mesg
/oracle/app/oracle/dbhome/has/mesg
/oracle/app/oracle/dbhome/usm/mesg
/oracle/app/oracle/dbhome/nls/mesg
/oracle/app/oracle/dbhome/racg/mesg
/oracle/app/oracle/dbhome/css/mesg
/oracle/app/oracle/dbhome/srvm/mesg
/oracle/app/oracle/dbhome/olap/mesg
/oracle/app/oracle/dbhome/oracore/mesg
/oracle/app/oracle/dbhome/plsql/mesg
/oracle/app/oracle/dbhome/ldap/mesg
/oracle/app/oracle/dbhome/sqlplus/mesg
/oracle/app/oracle/dbhome/ord/mesg
/oracle/app/oracle/dbhome/crs/mesg
/oracle/app/oracle/dbhome/odbc/mesg
/oracle/app/oracle/dbhome/xdk/mesg
/oracle/app/oracle/dbhome/mesg
/oracle/app/oracle/dbhome/precomp/mesg
/oracle/app/oracle/dbhome/slax/mesg
/oracle/app/oracle/dbhome/csmig/mesg
/oracle/app/oracle/dbhome/ctx/mesg
/oracle/app/oracle/dbhome/rdbms/mesg
/oracle/app/oracle/dbhome/opmn/mesg
[oracle@NcDbEmulator mesg]$ cd /oracle/app/oracle/dbhome/rdbms/mesg/
[oracle@NcDbEmulator mesg]$ ls *.msg
amduus.msg dgmus.msg gimus.msg kfodus.msg kopus.msg nidus.msg oraus.msg sbtus.msg udius.msg
asmcmdus.msg diaus.msg impus.msg kfsgus.msg kupus.msg ocius.msg qsmus.msg smgus.msg ulus.msg
dbvus.msg expus.msg kfedus.msg kgpus.msg lcdus.msg opwus.msg rmanus.msg udeus.msg
.msb格式的文件是二進(jìn)制文件。
從以上msg格式的文件,可以看出oerr可以查詢的錯(cuò)誤信息類型。例如:
oraus.msg 對(duì)應(yīng)ORA錯(cuò)誤,
$ 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時(shí)使用directory參數(shù)不當(dāng)時(shí)可能會(huì)產(chǎn)生的錯(cuò)誤。
$ 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時(shí)可能產(chǎn)生的錯(cuò)誤
OERR能檢索的錯(cuò)誤還有很多,包括CLSR、OCI、TNS、UDE等等。但是這些在Oracle官方文檔里并沒(méi)有說(shuō)明。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。