RMAN的“rman: can't open target”错误

2015-02-02 15:59:37 · 作者: · 浏览: 29

Linux上,安装完成之后,在测试RMAN时可能会遇到如下错误:


rman: can't open target


?


这是由于调用的是非OracleRMAN的缘故:


[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 ]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-V(olume) <colon-separated list>] [-U(RLs as hyperlinks)]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-b (show subsections)] [-k(eep head/foot)]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-n(ame of man page) <string>] [-s(ection) <string>]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-p(aragraph mode toggle)] [-t(abstops spacing) <number>]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-N(ormalize spacing, changebars)] [-y (zap hyphens toggle)]</span></span></span></p><div class="article-middle-ad" style="margin: 30px 0; padding: 20px 0; text-align: center; clear: both;"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3873923678443673" crossorigin="anonymous"></script> <!-- cppentry文章内广告 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3873923678443673" data-ad-slot="5723320063" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-K (declare that page has no breaks)]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-d(iff) <file> (diff of old page source to incorporate)]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-M(essage) <text> (included verbatim at end of Name section)]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-R(ebus words for TkMan)] [-C (enable Tcl/Tk formatting)]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-o (no op)] [-O <arg> (no op with arg)]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[-q(uiet--don't report warnings)] [-h(elp)] [-v(ersion)]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial"><span style="mso-spacerun: yes">??? </span>[<filename>]</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b; FONT-FAMILY: Arial">?</span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span style="COLOR: #103e7b"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">修正这个问题,我们只需要在</span><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="FONT-FAMILY: Arial">Oracle</span></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">用户的</span></span><span style="FONT-SIZE: 9pt; COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">环境变量</span><span style="COLOR: #103e7b"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">下,将</span><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="FONT-FAMILY: Arial">$ORACLE_HOME/bin</span></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">放在</span><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="FONT-FAMILY: Arial">PATH</span></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">变量前就可以了:</span><span lang="EN-US" style="FONT-SIZE: 9pt"></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial">export PATH=$ORACLE_HOME/bin:${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b; FONT-FAMILY: Arial">?</span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span style="COLOR: #103e7b"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">重新登录使环境变量生效,现在</span><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="FONT-FAMILY: Arial">Oracle</span></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">能找到正确的</span><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="FONT-FAMILY: Arial">rman</span></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial">了:</span><span lang="EN-US" style="FONT-SIZE: 9pt"></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial">[oracle@smsdbrac1 oracle]$ su - oracle</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial">Password: </span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial">[oracle@smsdbrac1 oracle]$ which rman</span></span></span></p><br/><p class="a" style="MARGIN: 0cm 0cm 0pt; mso-char-indent-count: 1.11"><span lang="EN-US" style="FONT-SIZE: 9pt"><span style="COLOR: #103e7b"><span style="FONT-FAMILY: Arial">~/product/10.2.0/db/bin/rman</span></span></span></p><br/></span> </div> <div class="pagination mt-40"> </div> <div class="article-footer mt-60 pt-40"> <div class="share-box"> <!-- Baidu Share Code Simplified or Removed if not needed. Keeping basic structure --> <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":"24"},"share":{}};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 class="prev-next mt-20"> <div class="prev"> <span class="label">上一篇</span> <a href="bencandy.php?fid=57&id=93939" onclick="" class="link">ORA-01950: 对表空间 'USERS&..</a> </div> <div class="next"> <span class="label">下一篇</span> <a href="bencandy.php?fid=57&id=93937" onclick="" class="link">MongoDB Primary---->编译Mong..</a> </div> </div> </div> </div> </div> </div> </div><!-- End .container.main-content --> <footer class="container mt-20 site-footer"> <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> </div> </footer> <script> // Logic for double click admin editing </script> <script> if(typeof clickEdit !== 'undefined') clickEdit.init(); </script> </body> </html>