RMAN備份、恢復實驗室 之 備份篇 【rman: can't open target】

jackson198574發表於2013-12-13
  
在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> <br> <br> <br> 修正這個問題,我們只需要在Oracle使用者的環境變數下,將$ORACLE_HOME/bin放在PATH變數前就可以了:<br> <span style="color:#003399;"><strong>export PATH=$ORACLE_HOME/bin:${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin</strong></span><br> <br> <br> 重新登入使環境變數生效,現在Oracle能找到正確的rman了:<br> [oracle@smsdbrac1 oracle]$ <span style="color:#003399;"><strong>su - oracle</strong></span><br> Password: <br> [oracle@smsdbrac1 oracle]$ <span style="color:#003399;"><strong>which rman</strong></span><br> ~/product/10.2.0/db/bin/rman<br> <br> <strong><span style="color:#FF9900;">接下來去登陸一下,看看成功了沒有?<img alt="" src="http://blog.chinaunix.net/kindeditor/plugins/emoticons/images/0.gif" border="0" width="640" height="360"></span></strong> </filename></arg></text></file></number></string></string></colon-separated>

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

相關文章