ORACLE-FAQ:rman:can't open target

在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 <ASCII|roff|TkMan|Tk|Sections|HTML|XML|MIME|LaTeX|LaTeX2e|RTF|pod>]
   [-S(ource of man page passed in)] [-F(ormatted man page passed in)]
   [-r <man reference printf string>] [-l <title printf string>]
   [-V(olume) <colon-separated list>] [-U(RLs as hyperlinks)]
   [-b (show subsections)] [-k(eep head/foot)]
   [-n(ame of man page) <string>] [-s(ection) <string>]
   [-p(aragraph mode toggle)] [-t(abstops spacing) <number>]
   [-N(ormalize spacing, changebars)] [-y (zap hyphens toggle)]
   [-K (declare that page has no breaks)]
   [-d(iff) <file> (diff of old page source to incorporate)]
   [-M(essage) <text> (included verbatim at end of Name section)]
   [-R(ebus words for TkMan)] [-C (enable Tcl/Tk formatting)]
   [-o (no op)] [-O <arg> (no op with arg)]
   [-q(uiet--don't report warnings)] [-h(elp)] [-v(ersion)]
   [<filename>]

修正這個問題,我們只需要在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


-The End-


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章