RMAN-20505, ORA-0119, ORA-27400 encountered in RMAN recover

Source: Internet
Author: User

RMAN-20505, ORA-0119, ORA-27400 encountered in RMAN recover

This is a RAMN restoration task. The production end is Oracle 11.2.0.4 RAC and the data files are stored in the file system. The disaster recovery end stores data files in the Oracle11.2.0.4 Single Instance + ASM mode. The repair plan requires the production database to be fully prepared for RMAN and then restored on the disaster recovery end. Because the storage methods of the production end and the disaster recovery end are different and the file paths are different, you must use the set newname method to convert the file paths once for recovery of RMAN on the disaster recovery end.

The execution script is as follows:

Run {
Set newname for datafile 1 to '+ data ';
Set newname for datafile 2 to '+ data ';
Set newname for datafile 3 to '+ data ';

... Over 500 data files

Restore database;
Switch datafile all;
Recover database;
}

When an error occurs during the execution of the recover database, the system prompts that the creation of the IDX_S007.dbf data file No. 545th failed.

RMAN-20505: create datafile during recovery
ORA-0119: error in creating database file '/sgpmdb/oradata/u07/cmsdb/IDX_S007.dbf'
ORA-27400: file create error, unable to create file
HPUX-ia Error: 2: No such file or directory
Additional information: 1
RMAN-11003: failure during parse/execution of SQL statement: alter database recover log file '/orabak/arch/2_147320_666569930.arc'
ORA-00283: recovery session canceled due to errors
ORA-01244: unnamed datafile (s) added to control file by media recovery
ORA-01110: data file 545: '/spgmdb/oradata/u07/cmsdb/idx_s007.dbf'

The cause is as follows:
After the production database is fully standby, some DDL operations are performed, such as adding data files. These new operations are recorded in the archive logs after the full backup (/orabak/arch/2_147320_666569930.arc
). The directory of the production environment cannot be found when the data file is created in the repeat archiving log, so an Error is reported (HPUX-ia Error: 2: No such file or directory)
This file is temporarily recorded in/app/oracle/product/11.2.0/db_1/dbs, but it is only a record in the control file and is not found on the disk.

The record of DATA file No. 545th in the control file is as follows, which is not what we expected + DATA
SQL> select name from v $ datafile where name like '% 545%;

NAME
------------------
/App/oracle/product/11.2.0/db_1/dbs/UNAMED00545

Solution

Run the set newname command in RMAN to change the directory address of the DATA file to + DATA/cmsdb/datafile. Restore the data file again and switch the data file.

Run {
Set newname for datafile '/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00545' to '+ DATA/cmsdb/datafile/IDX_S007.dbf ';
Restore datafile '/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00545 ';
Switch datafile '/app/oracle/product/11.2.0/db_1/dbs/UNNAMED00545 ';
}

It can also be written
Run {
Set newname for datafile 545 to '+ data ';
Restore datafile 545;
Switch datafile 545;
}

The output is as follows:
Executing command: SET NEWNAME

Staring restore at 27--14 14
Using channel ORA_DISK1

Creating datafile file number = 545 name = + DATA/cmsdb/datafile/IDX_S007.dbf
Restore not done: all files read only, offline, or already restored
Finished restore at 27--14 14

Datafile 545 switched to datafile copy
Input datafile copy RECID = 3615 STAMP = 862057086 file name = + DATA/cmsdb/datafile/IDX_S007.dbf

The client host used in this operation has a high security level. You cannot use a USB flash drive to copy any files, including secureCRT logs. All error messages and screen outputs are manually typed. If any error occurs, please forgive me.

-------------------------------------- Recommended reading --------------------------------------

RMAN: Configure an archive log deletion policy

Basic Oracle tutorial-copying a database through RMAN

Reference for RMAN backup policy formulation

RMAN backup learning notes

Oracle Database Backup encryption RMAN Encryption

-------------------------------------- Split line --------------------------------------

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.