eygle.com   eygle.com
eygle.com  
 

« 崔健:时代的早上还是晚上 | Blog首页 | 装修日记:安信地板之无商不奸篇 »

RMAN的"rman: can't open target"错误

作者:eygle |【转载时请以超链接形式标明文章和作者信息及本声明
链接:
在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-


历史上的今天...
      >> 2009-01-07文章:
      >> 2006-01-07文章:
             欢迎加入ChinaOracleBlogger地图
             黑客为什么?
             Advertisement Time-现在插播广告
             Oracle bloggers on frappr
      >> 2005-01-07文章:
             一个小小的聚会-Itpub的朋友们
------
这篇 【RMAN的"rman: can't open target"错误】来自 eygle.com | CSDN网摘| del.icio.us|Google订阅 | 鲜果订阅 | 抓虾订阅

By eygle on 2008-01-07 12:21 | Comments (6) | Posted to FAQ | Edit |

相关文章 随机文章
  • RMAN排除备份 Exclude带来的Obsolete影响
  • 如何快速找到备份过最近、最大序号的归档日志
  • RMAN结合Read Only、Exclude的备份策略
  • RAC环境下根据sequence恢复指定日志
  • 使用RMAN进行排除表空间备份
  • EMC Cx500 ATA盘损坏
    首届杰出数据库工程师复选名单公布
    一场即将到来的费解官司-声援Kamus
    spam留言知几何?
    SP的未来与华友世纪的危机
    搜索本站:

    留言 (6)

    我为这个问题搞了好久
    最后还是你告诉我的
    谢谢!

    Posted by: xhy at January 7, 2008 6:18 PM

    呵呵,我上周五恰好遇到这个问题,which一下发现了问题。

    Posted by: 秦一 at January 8, 2008 4:47 PM

    哈,这个问题很早就有了,只是这次遇到写出来。

    秦一最近忙些啥呢?

    Posted by: eygle at January 8, 2008 7:17 PM

    呵呵,我最近没什么大项目,比较闲。想接触接触存储,学习一下。

    Posted by: 秦一 at January 10, 2008 1:54 PM

    我这样做了,做完之后可以正常使用了,但是切换用户之后,就又回到原来的目录了,这是怎么一回事啊

    Posted by: sunlei at March 5, 2009 9:58 PM

    你把

    export PATH=$ORACLE_HOME/bin:${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

    写到用户的 .profile / .bash_profile 文件中就好了

    Posted by: eygle at March 6, 2009 9:03 AM

    发表留言:



    Remember Me?
    (输入验证码后方可评论,谢谢支持)



    CopyRight © 2004~2010 eygle.com, All rights reserved.