When restoring a 0-level backup database to another machine, first encountered a RMAN-06023 and then encountered a ORA-19693 error, the error occurred in the environment and content is roughly as follows:
When restoring a 0-level backup database to another machine, first encountered a RMAN-06023 and then encountered a ORA-19693 error, the error occurred in the environment and content is roughly as follows:
When restoring a 0-level backup database to another machine, first encountered a RMAN-06023 and then encountered a ORA-19693 error, the error occurred in the environment and content is roughly as follows:
Database Version:
Start restoring the database:
SQL> select * from v $ version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
PL/SQL Release 11.2.0.1.0-Production
CORE 11.2.0.1.0 Production
TNS for 64-bit Windows: Version 11.2.0.1.0-Production
NLSRTL Version 11.2.0.1.0-Production
Startup nomount;
RMAN> restore controlfile from 'I: \ backup \ C-2711934557-20150401-02_NSOA_CONTROLFILE_20150401 ';
Start restore on 15:09:01
Use the target database control file to replace the recovery directory
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 129 device type = DISK
Channel ORA_DISK_1: restoring the control file
Channel ORA_DISK_1: restore complete, time: 00:00:08
Output file name = I: \ NSOADP \ CONTROL01.CTL
Restore completed on 15:09:10
RMAN> alter database mount;
RMAN> run
{
Allocate channel dev type disk;
Allocate channel dev1 type disk;
Set newname for datafile 1 to 'd: \ nsoadp \ SYSTEM01.DBF ';
Set newname for datafile 2 to 'd: \ nsoadp \ SYSAUX01.DBF ';
Set newname for datafile 4 to 'd: \ nsoadp \ USERS01.DBF ';
...............
Restore database;
Switch datafile all;
Recover database;
Release channel dev;
Release channel dev1;
}
Executing command: SET NEWNAME
Executing command: SET NEWNAME
.........
Start restore on 15:30:19
Channel dev: restoring the data file backup set
Channel dev: Specifies the data file to be restored from the backup set
RMAN-06026: some targets are not found-Stop restore
RMAN-06023: no copy of data file 4 found to restore
RMAN-06023: no copy of data file 2 found to restore
RMAN-06023: no copy of Data File 1 found to restore
However, the actual 0-level backup contains the data files:
RMAN> list backup of datafile 4, 2, 1;
Backup set list
==============================
BS keyword Type LV Size Device type time completed
-----------------------------------------------------------------
10071 Incr 0 30.29g disk 02:46:53 13:29:12
BP Keyword: 10071 status: AVAILABLE compressed: YES Mark: NSOA_BACKUP_INCR0
Segment name: I: \ BACKUP \ B _NSOA_10193_UHQ39J0B_20150401
Data File List in backup set 10071
File LV type Ckp SCN Ckp time name
-------------------------------------------
4 0 Incr 13625590769939 10:42:20G: \ U09 \ ORADATA \ NSOA \ USERS01.DBF
BS keyword Type LV Size Device type time completed
-----------------------------------------------------------------
10072 Incr 0 29.04g disk 02:47:11 13:29:30
BP Keyword: 10072 status: AVAILABLE compressed: YES Mark: NSOA_BACKUP_INCR0
Segment name: I: \ BACKUP \ B _NSOA_10192_UGQ39J0B_20150401
Data File List in backup set 10072
File LV type Ckp SCN Ckp time name
-------------------------------------------
1 0 Incr 13625590769907 10:42:19G: \ U07 \ ORADATA \ NSOA \ SYSTEM01.DBF
2 0 Incr 13625590769907 10:42:19G: \ U08 \ ORADATA \ NSOA \ SYSAUX01.DBF
Therefore, it can be determined that the backup file itself is correct, and the problem lies in
If we start a RESTORE database with a BACKUP controlfile and Flash Recovery Area is defined, RMAN execute and implicit crosscheck and catalog of all the objects in the Flash Recovery Area.
RMAN will catalog any objects in the Flash Recovery Area that will not be registered in the controlfile and if any of this files belongs to an incarnation different from CURRENT incarnation in the controlfile then changes controlfile CURRENT incarnation to the one found in the file that is being cataloged.
This prevents database from restoring backups that belong to old CURRENT incarnation.
RMAN considers backup availble for being restored if the backup incarnation and CURRENT incarnation in controlfile are the same.
According to the instructions in the document, I have set the db_recovery_file_dest and db_recovery_file_dest_size parameters, restored the control file, and then pointed the catalog to the directory of my backup file during restoration:
RMAN> restore controlfile from 'I: \ backup \ C-2711934557-20150401-02_NSOA_CONTROLFILE_20150401 ';
RMAN> alter database mount;
RMAN> catalog start with 'I: \ backup ';
Start implicit crosscheck backup on 15:09:40
Allocated channel: ORA_DISK_1
Channel ORA_DISK_1: SID = 129 device type = DISK
29 objects that have been cross-checked
Implicit crosscheck backup completed on 15:10:37
Start implicit crosscheck copy on 15:10:37
Use channel ORA_DISK_1
Implicit crosscheck copy completed on 15:10:37
Search all files in the recovery area
Compiling file directory...
No directory for the file
Search for all files matching style I: \ backup