设为首页 加入收藏

TOP

RMAN的"rman: can't open target"错误解决
2015-07-24 10:38:59 来源: 作者: 【 】 浏览:1
Tags:RMAN " rman: can' open target" 错误 解决
RMAN的"rman: can't open target"错误解决
?
在Linux上,安装完成之后,在测试RMAN时可能会遇到如下错误:
?
[oracle@oracle10g ~]$ rman target /
rman: can't open target

?

?
这是由于调用的是非 Oracle的RMAN的缘故:
[oracle@oracle10g ~]$ which rman
/usr/X11R6/bin/rman

?

?
在X11R6下存在一个名为rman的命令:
?
[oracle@oracle10g bin]$ ./rman -help
rman
    [-f ]
    [-S(ource of man page passed in)] [-F(ormatted man page passed in)]
    [-r ] [-l ]
    [-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>]</pre> 
  <p>?</p> 
 </div> 
 <div>
  ?
 </div> 
 <div>
  ?
 </div> 
 <div>
  修正这个问题,我们只需要在Oracle用户的环境变量下,将$ORACLE_HOME/bin放在PATH变量前就可以了:
 </div> 
 <div>
  ?
 </div> 
 <div> 
  <pre class="brush:sql;">
export PATH=$ORACLE_HOME/bin:$PATH

或export PATH=$ORACLE_HOME/bin:${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin</pre> 
  <p>?</p> 
 </div> 
 <div>
  ?
 </div> 
 <div>
  重新登录使环境变量生效,现在Oracle能找到正确的rman了:
 </div> 
 <div>
  ?
 </div> 
 <div> 
  <pre class="brush:sql;">
[oracle@oracle10g ~]$ su - oracle
Password: 
[oracle@oracle10g ~]$ which rman
~/product/10.2.0/db/bin/rman</pre> 
  <p>?</p> 
 </div> 
 <br /> 
</dd></span></font></td>
              </tr>
            </table>
            <!--//投票-->
            <table width="98%" border="0" cellspacing="0" cellpadding="0" style='TABLE-LAYOUT: fixed;WORD-WRAP: break-word;' align="center">
              <tr> 
              </tr>
              <tr> 
                <td colspan="2" align="center" class="page" height="25"></td>
              </tr>
              <tr align="right"> 
                <td colspan="2" height="25"  > 
                  <SCRIPT LANGUAGE="JavaScript" src="https://www.cppentry.com/images/default/bencandy.js"></SCRIPT>
                  【<a 
            href="javascript:doZoom(18)">大</a> <a 
            href="javascript:doZoom(14)">中</a> <a 
            href="javascript:doZoom(12)">小</a>】【<a 
            href="javascript:doPrint()">打印</a>】 
                  <input type=hidden value=1 name="h1" id="h1">
                  【<a href="javascript:ft(1)" id="Maiweb1">繁体</a>】【<a href="https://www.cppentry.com/member/post.php?job=postnew&fid=57" target=_blank>投稿</a>】【<a href="https://www.cppentry.com/do/job.php?job=collect&fid=57&id=103244">收藏</a>】 
                  【<a href="https://www.cppentry.com/do/job.php?job=recommend&fid=57&id=103244" target=_blank>推荐</a>】【<a href="https://www.cppentry.com/do/job.php?job=report&fid=57&id=103244" target=_blank>举报</a>】【<a href="https://www.cppentry.com/do/comment.php?fid=57&id=103244" target=_blank>评论</a>】 
                  【<a 
            href="javascript:window.close()">关闭</a>】 【<a 
            href="javascript:window.close()"></a><a 
            href="#">返回顶部</a>】</td>
              </tr>
              <tr>
              <td colspan="2" style="text-align:right">
              <div>
              <div style="float:right">
              <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"32"},"share":{},"image":{"viewList":["qzone","tsina","tqq","renren","weixin"],"viewText":"分享到:","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["qzone","tsina","tqq","renren","weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
              </div>
              <div style="float:right; font-size:14px">分享到: </div>
              </div>
              </td>
              </tr>
              <tr class="nextpage"> 
                <td width="50%" align="left"><a href="bencandy.php?fid=57&id=103245" onclick="">上一篇</a>:<a href="bencandy.php?fid=57&id=103245" onclick="" title="sqlserver点滴累计">sqlserver点滴累计</a></td>
                <td width="50%" align="right" height="25"><a href="bencandy.php?fid=57&id=103243" onclick="">下一篇</a>:<a href="bencandy.php?fid=57&id=103243" onclick="" title="Oracle学习(五):多表查询">Oracle学习(五):多表查询</a></td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td class="foot"> 
            <h3 class="L"></h3>
            <h3 class="R"></h3>
          </td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" class="dragTable" id="view_article_bbs">
        
        <tr> 
          <td class="head"> 
            <h3 class="L"></h3>
            <span class="TAG">
</span> 
            <h3 class="R"></h3>
          </td>
        </tr>
        <tr> 
          <td class="middle"> <script type="text/javascript" id="wumiiRelatedItems"></script><div style="display:none"><!--访问统计,这段代码,会加快内容的打开速度,但是会影响右边列表的打开速度,<script src='http://pw.cnzz.com/c.php?id=80674837' language='JavaScript' charset='gb2312'></script>--></div></td>
        </tr>
        <tr> 
          <td class="foot"> 
            <h3 class="L"></h3>
            <h3 class="R"></h3>
          </td>
        </tr>
        
      </table>
      <!--
--> 
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable" id="commentTable">
  <tr> 
    <td class="head"> 
      <h3 class="L"></h3>
      <span class="TAG">评论</span> 
      <h3 class="R"></h3>
    </td>
  </tr>
  <tr> 
    <td class="middle"> 
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write('<span id="comment_show"><img alt="内容加载中,请稍候..." src="https://www.cppentry.com/images/default/ico_loading3.gif"></span>');
document.write('<div style="display:none;"><iframe src="https://www.cppentry.com/do/comment_ajax.php?fid=57&aid=103244&iframeID=comment_show" width=0 height=0 name="comment_show"></iframe></div>');
//-->
</SCRIPT>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <form name="form_comment" id="form_comment" method="post" target="comment_show" action="https://www.cppentry.com/do/comment_ajax.php?fid=57&aid=103244&iframeID=comment_show">
        
		<tr style="display:" id="comment_username_tr"> 
          <td width="16%"><span class="L">帐  号:</span></td>
            <td width="84%"><span class="R"> 
              <input type="text" name="username" id="comment_username" size="12">
              密码:
              <input type="password" name="password" id="comment_password" size="12">
              (<a href="https://www.cppentry.com/do/reg.php" target="_blank"><u>新用户注册</u></a>)</span></td>
        </tr>
        
        <tr style="display:" id="comment_yzimg_tr"> 
          <td width="16%"><span class="L">验 证 码:</span></td>
          <td width="84%"> 
              <input id="yzImgNum" type="text" name="yzimg" size="8">
            
         <SCRIPT LANGUAGE="JavaScript">
<!--
document.write('<img border="0" id="yz_Img" name="imageField" onclick="this.src=this.src+Math.random();" src="https://www.cppentry.com/do/yzimg.php?'+Math.random()+'">');
//-->
</SCRIPT> </td>
        </tr>
 
        <tr> 
          <td width="16%"><span class="L">表  情:</span></td>
          <td width="84%"> 
            <style type="text/css">
<!--
.selected {filter:Alpha(opacity=100);border:1px solid #FF9900}
.unselected {filter:Alpha(opacity=50);border:1px solid #EDF8DD}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
 <!--
 var prevIcon;
function icon(num){
num.className="selected";
if(typeof(prevIcon)!="undefined"){
prevIcon.className="unselected";
}else{
document.all.firstface.className="unselected";
}
if(num.className=="unselected"){
num.className="selected";
}
prevIcon=num;
document.getElementById("commentface").value=num.childNodes(0).id ;
}
 //-->
 </SCRIPT>
            <table border=0 cellspacing=0 cellpadding=0>
              <tr> 
                <td class="selected" onClick="icon(this)" id="firstface" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/1.gif" width="20" height="20" id="1"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/2.gif" width="20" height="20" id="2"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/3.gif" width="20" height="20" id="3"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/4.gif" width="20" height="20" id="4"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/5.gif" width="20" height="20" id="5"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/6.gif" width="20" height="20" id="6"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/7.gif" width="20" height="20" id="7"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/8.gif" width="20" height="20" id="8"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/9.gif" width="20" height="20" id="9"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/10.gif" width="20" height="20" id="10"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/11.gif" width="20" height="20" id="11"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/12.gif" width="20" height="20" id="12"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/13.gif" width="20" height="20" id="13"></td>
                
                <td class="unselected" onClick="icon(this)" style="cursor:hand"><img src="https://www.cppentry.com/images/default/faceicon/14.gif" width="20" height="20" id="14"></td>
                
                <td align="center" valign="top"> 
                  <input name="commentface" type="hidden" value="1">
                </td>
              </tr>
            </table>
          </td>
        </tr>
        <tr> 
          <td width="16%"><span class="L">内  容:</span></td>
          <td width="84%"><span class="R"> 
              <textarea name="content" cols="50" rows="5" id="comment_content" onKeyDown="quickpost(event)"></textarea>
            </span></td>
        </tr>
        <tr> 
          <td width="16%"> 
<script language="JavaScript">
<!--
cnt = 0;
function quickpost(event){
	if((event.ctrlKey && event.keyCode == 13)||(event.altKey && event.keyCode == 83)){
		cnt++;
		if (cnt==1){
			post_comment();
		}else{
			alert('内容正在提交...');
		}
	}	
}
function post_comment(){
	if(document.getElementById("comment_yzimg_tr").style.display==''){
		if(document.getElementById("yzImgNum").value==''){
			alert('验证码不能为空!');
			return false;
		}
	}
	if(document.getElementById("comment_content").value==''){
		alert('内容不能为空!');
		return false;
	}
	document.getElementById("form_comment").submit();
	document.getElementById("comment_content").value='';
	if(document.getElementById("yzImgNum")!=null){
		document.getElementById("yzImgNum").value='';
		document.getElementById("yz_Img").src="https://www.cppentry.com/do/yzimg.php?"+Math.random();;
	}
	limitTime=parseInt('5');
	limitComment();
	
}
//-->
</script>
          </td>
            <td width="84%"><span class="R"> 
              <input type="button" id="comment_submit" onclick="post_comment()" name="Submit" value="提交" class="button">
              <input type="hidden" name="action" value="post">
              </span></td>
        </tr></form>
      </table>

    </td>
  </tr>
  <tr> 
    <td class="foot"> 
      <h3 class="L"></h3>
      <h3 class="R"></h3>
    </td>
  </tr>
</table>


    </div>
    <div class="Side"> 
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable" id="sonSortName">
		<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3873923678443673"
     crossorigin="anonymous"></script>
<ins class="adsbygoogle"
     style="display:block"
     data-ad-format="autorelaxed"
     data-ad-client="ca-pub-3873923678443673"
     data-ad-slot="4891716010"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" >
	  <script>document.write(unescape('%3Cdiv id="hm_t_45532"%3E%3C/div%3E%3Cscript charset="utf-8" src="http://crs.baidu.com/t.js?siteId=238ce0d9669a08cae1971b03e0b2931a&planId=45532&async=0&referer=') + encodeURIComponent(document.referrer) + '&title=' + encodeURIComponent(document.title) + '&rnd=' + (+new Date) + unescape('"%3E%3C/script%3E'));</script>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable">
	  
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable">
	  <script type="text/javascript">
        document.write('<a style="display:none!important" id="tanx-a-mm_16790798_2355298_35944706"></a>');
        tanx_s = document.createElement("script");
        tanx_s.type = "text/javascript";
        tanx_s.charset = "gbk";
        tanx_s.id = "tanx-s-mm_16790798_2355298_35944706";
        tanx_s.async = true;
        tanx_s.src = "http://p.tanx.com/ex?i=mm_16790798_2355298_35944706";
        tanx_h = document.getElementsByTagName("head")[0];
        if(tanx_h)tanx_h.insertBefore(tanx_s,tanx_h.firstChild);
</script>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable">
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="line-height:180%;">·<A HREF="https://www.cppentry.com/do/bencandy.php?fid=45&id=111836" target='_blank' style=";">请问c语言刚入门,该</a></td>
    <td align="right" style="line-height:180%;">(2025-12-26 10:21:04)</td>
  </tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="line-height:180%;">·<A HREF="https://www.cppentry.com/do/bencandy.php?fid=45&id=111835" target='_blank' style=";">python 编程怎么定义</a></td>
    <td align="right" style="line-height:180%;">(2025-12-26 10:21:01)</td>
  </tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="line-height:180%;">·<A HREF="https://www.cppentry.com/do/bencandy.php?fid=45&id=111834" target='_blank' style=";">09-指 针 (一)-c语言</a></td>
    <td align="right" style="line-height:180%;">(2025-12-26 10:20:58)</td>
  </tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="line-height:180%;">·<A HREF="https://www.cppentry.com/do/bencandy.php?fid=57&id=111825" target='_blank' style=";">About - Redis</a></td>
    <td align="right" style="line-height:180%;">(2025-12-26 08:20:56)</td>
  </tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="line-height:180%;">·<A HREF="https://www.cppentry.com/do/bencandy.php?fid=57&id=111824" target='_blank' style=";">Redis: A Comprehens</a></td>
    <td align="right" style="line-height:180%;">(2025-12-26 08:20:53)</td>
  </tr>
</table>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="dragTable">
	  
      </table>
	  </div>
    </div>
<div class="cleardiv"></div>

<!--
-->
<SCRIPT LANGUAGE="JavaScript">
<!--//目的是为了做风格方便
document.write('</div>');
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
clickEdit.init();
//-->
</SCRIPT>
<div id="copyright">
    Copyright@https://www.cppentry.com all rights reserved <a href="http://www.miibeian.gov.cn" target="_blank">粤ICP备13067022号-3</a><br>
    Powered by <a href="http://www.qibosoft.com" target="_blank">qibosoft V7.0</a> 
    Code © 2003-11 <a href="http://bbs.qibosoft.com/" target="_blank">qibosoft</a> <br>
    
</div>

</body>
</html>