Oracle rman set newname error RMAN-06015

Source: Internet
Author: User

After a database restore, set newname is attempted but the RMAN-06015 is reported. We can manually import the catalog in, in set newname.

See the following test cases:

-- 1. Pure set newname is acceptable

RMAN> run {
2> set newname for datafile 6 to '/u01/oracle11gR2/oracle/oradata/ora11g/U_NOLOB2.dbf222 ';
3>}
 
Executing command: SET NEWNAME
 

 
 
-- 2. But after the switch, No. This is because the information of this file (the file on asm) cannot be found in your current control file.
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
 


-- 3. Use this file as datafilecopy and catalog to the control file:
 
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
 


-- 4. Then you can set newname and 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
 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.