RMAN的"rman: can't open target"錯誤

foxmile發表於2008-07-24
在Linux上,安裝完成之後,在測試RMAN時可能會遇到如下錯誤:
[oracle@smsdbrac1 oracle]$ rman target /
rman: can't open target

這是由於呼叫的是非Oracle的RMAN的緣故:
[oracle@smsdbrac1 oracle]$ which rman
/usr/X11R6/bin/rman

在X11R6下存在一個名為rman的命令:
[oracle@smsdbrac1 bin]$ ./rman -help
rman
    [-f ]
    [-S(ource of man page passed in)] [-F(ormatted man page passed in)]
    [-r ] [-l ]<br>    [-V(olume) <colon-separated list="">] [-U(RLs as hyperlinks)]<br>    [-b (show subsections)] [-k(eep head/foot)]<br>    [-n(ame of man page) <string>] [-s(ection) <string>]<br>    [-p(aragraph mode toggle)] [-t(abstops spacing) <number>]<br>    [-N(ormalize spacing, changebars)] [-y (zap hyphens toggle)]<br>    [-K (declare that page has no breaks)]<br>    [-d(iff) <file> (diff of old page source to incorporate)]<br>    [-M(essage) <text> (included verbatim at end of Name section)]<br>    [-R(ebus words for TkMan)] [-C (enable Tcl/Tk formatting)]<br>    [-o (no op)] [-O <arg> (no op with arg)]<br>    [-q(uiet--don't report warnings)] [-h(elp)] [-v(ersion)]<br>    [<filename>]<br></filename></arg></text></file></number></string></string></colon-separated>
修正這個問題,我們只需要在Oracle使用者的環境變數下,將$ORACLE_HOME/bin放在PATH變數前就可以了:
export PATH=$ORACLE_HOME/bin:${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

重新登入使環境變數生效,現在Oracle能找到正確的rman了:
[oracle@smsdbrac1 oracle]$ su - oracle
Password:
[oracle@smsdbrac1 oracle]$ which rman
~/product/10.2.0/db/bin/rman

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/79499/viewspace-409913/,如需轉載,請註明出處,否則將追究法律責任。

相關文章