關於oracle 10G for suse 9 的rman: can't open target

Steven1981發表於2008-03-12
剛在SUSE 9 上裝完ORACLE 10G,並DBCA建了資料庫,想對資料庫作一個全備份.結果
> rman target /
rman: can't open target
[@more@]

這是由於呼叫的是非Oracle的RMAN的緣故:

> which rman
/usr/X11R6/bin/rman


在/usr/X11R6/bin/下存在一個名為rman的命令:

> ./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>]</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了:

> su - oracle
Password:

> which rman
/SERVER/product/bin/rman

> rman target /

Recovery Manager: Release 10.2.0.1.0 - Production on Wed Mar 12 14:57:37 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: ORA10 (DBID=631770879)

RMAN>

再使用就正常了.

-The End-

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

相關文章