oracle rman set newname時報錯RMAN-06015

來源:互聯網
上載者:User

某資料庫restore之後,嘗試set newname但是報錯RMAN-06015。我們可以先手工catalog進去,在set newname。

可以看如下的測試案例:

--1.純粹的set newname是可以的

RMAN> run{
2> set newname for datafile 6 to '/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222';
3> }
 
executing command: SET NEWNAME
 
RMAN>
 
RMAN>
 
RMAN>
 
RMAN>
 
RMAN>
 
 
--2. 但是switch之後,就不可以。這是因為在你當前控制檔案中,找不到該檔案(asm上的檔案)的資訊
RMAN> run{
2> set newname for datafile 6 to '/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222';
3> switch datafile 6;
4> }
 
executing command: SET NEWNAME
 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of switch command at 11/12/2014 10:36:09
RMAN-20230: datafile copy not found in the repository
RMAN-06015: error while looking up datafile copy name: /u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222
 
RMAN>
 
RMAN>
 
RMAN> -- 3.將該檔案作為datafilecopy,catalog到控制檔案中:
 
RMAN> catalog datafilecopy '/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222';
 
cataloged datafile copy
datafile copy file name=/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222 RECID=1 STAMP=863433432
 
RMAN> --4. 然後就可以順利set newname後switch了。
 
RMAN> run{
2> set newname for datafile 6 to '/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222';
3> switch datafile 6;
4> }
 
executing command: SET NEWNAME
 
datafile 6 switched to datafile copy
input datafile copy RECID=1 STAMP=863433432 file name=/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222
 
RMAN>
 
RMAN>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.