免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 713 | 回复: 0
打印 上一主题 下一主题

RMAN的"rman: can\'t open target"错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-20 09:48 |只看该作者 |倒序浏览
RMAN的"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-
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP